simopt package¶
Subpackages¶
- simopt.models package
- Submodules
- simopt.models.amusementpark module
- Summary
AmusementPark
AmusementPark.name
AmusementPark.n_rngs
AmusementPark.n_responses
AmusementPark.factors
AmusementPark.specifications
AmusementPark.check_factor_list
AmusementPark.check_arrival_gammas()
AmusementPark.check_depart_probabilities()
AmusementPark.check_erlang_scale()
AmusementPark.check_erlang_shape()
AmusementPark.check_number_attractions()
AmusementPark.check_park_capacity()
AmusementPark.check_queue_capacities()
AmusementPark.check_simulatable_factors()
AmusementPark.check_time_open()
AmusementPark.check_transition_probabilities()
AmusementPark.replicate()
AmusementParkMinDepart
AmusementParkMinDepart.name
AmusementParkMinDepart.dim
AmusementParkMinDepart.n_objectives
AmusementParkMinDepart.n_stochastic_constraints
AmusementParkMinDepart.minmax
AmusementParkMinDepart.constraint_type
AmusementParkMinDepart.variable_type
AmusementParkMinDepart.gradient_available
AmusementParkMinDepart.optimal_value
AmusementParkMinDepart.optimal_solution
AmusementParkMinDepart.model
AmusementParkMinDepart.model_default_factors
AmusementParkMinDepart.model_fixed_factors
AmusementParkMinDepart.model_decision_factors
AmusementParkMinDepart.rng_list
AmusementParkMinDepart.factors
AmusementParkMinDepart.specifications
AmusementParkMinDepart.check_deterministic_constraints()
AmusementParkMinDepart.deterministic_objectives_and_gradients()
AmusementParkMinDepart.deterministic_stochastic_constraints_and_gradients()
AmusementParkMinDepart.factor_dict_to_vector()
AmusementParkMinDepart.get_random_solution()
AmusementParkMinDepart.response_dict_to_objectives()
AmusementParkMinDepart.response_dict_to_stoch_constraints()
AmusementParkMinDepart.vector_to_factor_dict()
- simopt.models.chessmm module
- Summary
ChessAvgDifference
ChessAvgDifference.name
ChessAvgDifference.dim
ChessAvgDifference.n_objectives
ChessAvgDifference.n_stochastic_constraints
ChessAvgDifference.minmax
ChessAvgDifference.constraint_type
ChessAvgDifference.variable_type
ChessAvgDifference.lower_bounds
ChessAvgDifference.upper_bounds
ChessAvgDifference.gradient_available
ChessAvgDifference.optimal_value
ChessAvgDifference.optimal_solution
ChessAvgDifference.model
ChessAvgDifference.model_default_factors
ChessAvgDifference.model_fixed_factors
ChessAvgDifference.rng_list
ChessAvgDifference.factors
ChessAvgDifference.specifications
ChessAvgDifference.check_deterministic_constraints()
ChessAvgDifference.check_upper_time()
ChessAvgDifference.deterministic_objectives_and_gradients()
ChessAvgDifference.deterministic_stochastic_constraints_and_gradients()
ChessAvgDifference.factor_dict_to_vector()
ChessAvgDifference.get_random_solution()
ChessAvgDifference.response_dict_to_objectives()
ChessAvgDifference.response_dict_to_stoch_constraints()
ChessAvgDifference.vector_to_factor_dict()
ChessMatchmaking
ChessMatchmaking.name
ChessMatchmaking.n_rngs
ChessMatchmaking.n_responses
ChessMatchmaking.factors
ChessMatchmaking.specifications
ChessMatchmaking.check_factor_list
ChessMatchmaking.check_allowable_diff()
ChessMatchmaking.check_elo_mean()
ChessMatchmaking.check_elo_sd()
ChessMatchmaking.check_num_players()
ChessMatchmaking.check_poisson_rate()
ChessMatchmaking.replicate()
- simopt.models.cntnv module
- Summary
CntNV
CntNV.name
CntNV.n_rngs
CntNV.n_responses
CntNV.factors
CntNV.specifications
CntNV.check_factor_list
CntNV.check_Burr_c()
CntNV.check_Burr_k()
CntNV.check_order_quantity()
CntNV.check_purchase_price()
CntNV.check_sales_price()
CntNV.check_salvage_price()
CntNV.check_simulatable_factors()
CntNV.replicate()
CntNVMaxProfit
CntNVMaxProfit.name
CntNVMaxProfit.dim
CntNVMaxProfit.n_objectives
CntNVMaxProfit.n_stochastic_constraints
CntNVMaxProfit.minmax
CntNVMaxProfit.constraint_type
CntNVMaxProfit.variable_type
CntNVMaxProfit.lower_bounds
CntNVMaxProfit.upper_bounds
CntNVMaxProfit.gradient_available
CntNVMaxProfit.optimal_value
CntNVMaxProfit.optimal_solution
CntNVMaxProfit.model
CntNVMaxProfit.model_default_factors
CntNVMaxProfit.model_fixed_factors
CntNVMaxProfit.model_decision_factors
CntNVMaxProfit.rng_list
CntNVMaxProfit.factors
CntNVMaxProfit.specifications
CntNVMaxProfit.check_deterministic_constraints()
CntNVMaxProfit.deterministic_objectives_and_gradients()
CntNVMaxProfit.deterministic_stochastic_constraints_and_gradients()
CntNVMaxProfit.factor_dict_to_vector()
CntNVMaxProfit.get_random_solution()
CntNVMaxProfit.response_dict_to_objectives()
CntNVMaxProfit.response_dict_to_stoch_constraints()
CntNVMaxProfit.vector_to_factor_dict()
- simopt.models.contam module
- Summary
Contamination
Contamination.name
Contamination.n_rngs
Contamination.n_responses
Contamination.factors
Contamination.specifications
Contamination.check_factor_list
Contamination.check_contam_rate_alpha()
Contamination.check_contam_rate_beta()
Contamination.check_initial_rate_alpha()
Contamination.check_initial_rate_beta()
Contamination.check_prev_cost()
Contamination.check_prev_decision()
Contamination.check_restore_rate_alpha()
Contamination.check_restore_rate_beta()
Contamination.check_simulatable_factors()
Contamination.check_stages()
Contamination.replicate()
ContaminationTotalCostCont
ContaminationTotalCostCont.name
ContaminationTotalCostCont.dim
ContaminationTotalCostCont.n_objectives
ContaminationTotalCostCont.n_stochastic_constraints
ContaminationTotalCostCont.minmax
ContaminationTotalCostCont.constraint_type
ContaminationTotalCostCont.variable_type
ContaminationTotalCostCont.lower_bounds
ContaminationTotalCostCont.upper_bounds
ContaminationTotalCostCont.gradient_available
ContaminationTotalCostCont.optimal_value
ContaminationTotalCostCont.optimal_solution
ContaminationTotalCostCont.model
ContaminationTotalCostCont.model_default_factors
ContaminationTotalCostCont.model_fixed_factors
ContaminationTotalCostCont.rng_list
ContaminationTotalCostCont.factors
ContaminationTotalCostCont.specifications
ContaminationTotalCostCont.check_budget()
ContaminationTotalCostCont.check_deterministic_constraints()
ContaminationTotalCostCont.check_error_prob()
ContaminationTotalCostCont.check_initial_solution()
ContaminationTotalCostCont.check_prev_cost()
ContaminationTotalCostCont.check_simulatable_factors()
ContaminationTotalCostCont.check_upper_thres()
ContaminationTotalCostCont.deterministic_objectives_and_gradients()
ContaminationTotalCostCont.deterministic_stochastic_constraints_and_gradients()
ContaminationTotalCostCont.factor_dict_to_vector()
ContaminationTotalCostCont.factor_dict_to_vector_gradients()
ContaminationTotalCostCont.get_random_solution()
ContaminationTotalCostCont.response_dict_to_objectives()
ContaminationTotalCostCont.response_dict_to_objectives_gradients()
ContaminationTotalCostCont.response_dict_to_stoch_constraints()
ContaminationTotalCostCont.vector_to_factor_dict()
ContaminationTotalCostDisc
ContaminationTotalCostDisc.name
ContaminationTotalCostDisc.dim
ContaminationTotalCostDisc.n_objectives
ContaminationTotalCostDisc.n_stochastic_constraints
ContaminationTotalCostDisc.minmax
ContaminationTotalCostDisc.constraint_type
ContaminationTotalCostDisc.variable_type
ContaminationTotalCostDisc.lower_bounds
ContaminationTotalCostDisc.upper_bounds
ContaminationTotalCostDisc.gradient_available
ContaminationTotalCostDisc.optimal_value
ContaminationTotalCostDisc.optimal_solution
ContaminationTotalCostDisc.model
ContaminationTotalCostDisc.model_default_factors
ContaminationTotalCostDisc.model_fixed_factors
ContaminationTotalCostDisc.rng_list
ContaminationTotalCostDisc.factors
ContaminationTotalCostDisc.specifications
ContaminationTotalCostDisc.check_deterministic_constraints()
ContaminationTotalCostDisc.check_error_prob()
ContaminationTotalCostDisc.check_prev_cost()
ContaminationTotalCostDisc.check_upper_thres()
ContaminationTotalCostDisc.deterministic_objectives_and_gradients()
ContaminationTotalCostDisc.deterministic_stochastic_constraints_and_gradients()
ContaminationTotalCostDisc.factor_dict_to_vector()
ContaminationTotalCostDisc.factor_dict_to_vector_gradients()
ContaminationTotalCostDisc.get_random_solution()
ContaminationTotalCostDisc.response_dict_to_objectives()
ContaminationTotalCostDisc.response_dict_to_objectives_gradients()
ContaminationTotalCostDisc.response_dict_to_stoch_constraints()
ContaminationTotalCostDisc.vector_to_factor_dict()
- simopt.models.dualsourcing module
- Summary
DualSourcing
DualSourcing.name
DualSourcing.n_rngs
DualSourcing.n_responses
DualSourcing.factors
DualSourcing.specifications
DualSourcing.check_factor_list
DualSourcing.check_cost_exp()
DualSourcing.check_cost_reg()
DualSourcing.check_holding_cost()
DualSourcing.check_initial_inv()
DualSourcing.check_lead_exp()
DualSourcing.check_lead_reg()
DualSourcing.check_mu()
DualSourcing.check_n_days()
DualSourcing.check_order_level_exp()
DualSourcing.check_order_level_reg()
DualSourcing.check_penalty_cost()
DualSourcing.check_simulatable_factors()
DualSourcing.check_st_dev()
DualSourcing.replicate()
DualSourcingMinCost
DualSourcingMinCost.name
DualSourcingMinCost.dim
DualSourcingMinCost.n_objectives
DualSourcingMinCost.n_stochastic_constraints
DualSourcingMinCost.minmax
DualSourcingMinCost.constraint_type
DualSourcingMinCost.variable_type
DualSourcingMinCost.gradient_available
DualSourcingMinCost.optimal_value
DualSourcingMinCost.optimal_solution
DualSourcingMinCost.model
DualSourcingMinCost.model_default_factors
DualSourcingMinCost.model_fixed_factors
DualSourcingMinCost.model_decision_factors
DualSourcingMinCost.rng_list
DualSourcingMinCost.factors
DualSourcingMinCost.specifications
DualSourcingMinCost.check_deterministic_constraints()
DualSourcingMinCost.deterministic_objectives_and_gradients()
DualSourcingMinCost.deterministic_stochastic_constraints_and_gradients()
DualSourcingMinCost.factor_dict_to_vector()
DualSourcingMinCost.get_random_solution()
DualSourcingMinCost.response_dict_to_objectives()
DualSourcingMinCost.response_dict_to_stoch_constraints()
DualSourcingMinCost.vector_to_factor_dict()
- simopt.models.dynamnews module
- Summary
DynamNews
DynamNews.name
DynamNews.n_rngs
DynamNews.n_responses
DynamNews.factors
DynamNews.specifications
DynamNews.check_factor_list
DynamNews.check_c_utility()
DynamNews.check_cost()
DynamNews.check_init_level()
DynamNews.check_mu()
DynamNews.check_num_customer()
DynamNews.check_num_prod()
DynamNews.check_price()
DynamNews.check_simulatable_factors()
DynamNews.replicate()
DynamNewsMaxProfit
DynamNewsMaxProfit.name
DynamNewsMaxProfit.dim
DynamNewsMaxProfit.n_objectives
DynamNewsMaxProfit.n_stochastic_constraints
DynamNewsMaxProfit.minmax
DynamNewsMaxProfit.constraint_type
DynamNewsMaxProfit.variable_type
DynamNewsMaxProfit.lower_bounds
DynamNewsMaxProfit.upper_bounds
DynamNewsMaxProfit.gradient_available
DynamNewsMaxProfit.optimal_value
DynamNewsMaxProfit.optimal_solution
DynamNewsMaxProfit.model
DynamNewsMaxProfit.model_default_factors
DynamNewsMaxProfit.model_fixed_factors
DynamNewsMaxProfit.model_decision_factors
DynamNewsMaxProfit.rng_list
DynamNewsMaxProfit.factors
DynamNewsMaxProfit.specifications
DynamNewsMaxProfit.check_deterministic_constraints()
DynamNewsMaxProfit.deterministic_objectives_and_gradients()
DynamNewsMaxProfit.deterministic_stochastic_constraints_and_gradients()
DynamNewsMaxProfit.factor_dict_to_vector()
DynamNewsMaxProfit.get_random_solution()
DynamNewsMaxProfit.response_dict_to_objectives()
DynamNewsMaxProfit.response_dict_to_stoch_constraints()
DynamNewsMaxProfit.vector_to_factor_dict()
- simopt.models.example module
- Summary
ExampleModel
ExampleProblem
ExampleProblem.name
ExampleProblem.dim
ExampleProblem.n_objectives
ExampleProblem.n_stochastic_constraints
ExampleProblem.minmax
ExampleProblem.constraint_type
ExampleProblem.variable_type
ExampleProblem.lower_bounds
ExampleProblem.upper_bounds
ExampleProblem.gradient_available
ExampleProblem.optimal_value
ExampleProblem.optimal_solution
ExampleProblem.model
ExampleProblem.model_default_factors
ExampleProblem.model_fixed_factors
ExampleProblem.model_decision_factors
ExampleProblem.rng_list
ExampleProblem.factors
ExampleProblem.specifications
ExampleProblem.check_deterministic_constraints()
ExampleProblem.deterministic_objectives_and_gradients()
ExampleProblem.deterministic_stochastic_constraints_and_gradients()
ExampleProblem.factor_dict_to_vector()
ExampleProblem.get_random_solution()
ExampleProblem.response_dict_to_objectives()
ExampleProblem.response_dict_to_stoch_constraints()
ExampleProblem.vector_to_factor_dict()
- simopt.models.facilitysizing module
- Summary
FacilitySize
FacilitySize.name
FacilitySize.n_rngs
FacilitySize.n_responses
FacilitySize.factors
FacilitySize.specifications
FacilitySize.check_factor_list
FacilitySize.check_capacity()
FacilitySize.check_cov()
FacilitySize.check_mean_vec()
FacilitySize.check_n_fac()
FacilitySize.check_simulatable_factors()
FacilitySize.replicate()
FacilitySizingMaxService
FacilitySizingMaxService.name
FacilitySizingMaxService.dim
FacilitySizingMaxService.n_objectives
FacilitySizingMaxService.n_stochastic_constraints
FacilitySizingMaxService.minmax
FacilitySizingMaxService.constraint_type
FacilitySizingMaxService.variable_type
FacilitySizingMaxService.lower_bounds
FacilitySizingMaxService.upper_bounds
FacilitySizingMaxService.gradient_available
FacilitySizingMaxService.optimal_value
FacilitySizingMaxService.optimal_solution
FacilitySizingMaxService.model
FacilitySizingMaxService.model_default_factors
FacilitySizingMaxService.model_fixed_factors
FacilitySizingMaxService.model_decision_factors
FacilitySizingMaxService.rng_list
FacilitySizingMaxService.factors
FacilitySizingMaxService.specifications
FacilitySizingMaxService.check_deterministic_constraints()
FacilitySizingMaxService.check_installation_budget()
FacilitySizingMaxService.check_installation_costs()
FacilitySizingMaxService.deterministic_objectives_and_gradients()
FacilitySizingMaxService.deterministic_stochastic_constraints_and_gradients()
FacilitySizingMaxService.factor_dict_to_vector()
FacilitySizingMaxService.get_random_solution()
FacilitySizingMaxService.response_dict_to_objectives()
FacilitySizingMaxService.response_dict_to_stoch_constraints()
FacilitySizingMaxService.vector_to_factor_dict()
FacilitySizingTotalCost
FacilitySizingTotalCost.name
FacilitySizingTotalCost.dim
FacilitySizingTotalCost.n_objectives
FacilitySizingTotalCost.n_stochastic_constraints
FacilitySizingTotalCost.minmax
FacilitySizingTotalCost.constraint_type
FacilitySizingTotalCost.variable_type
FacilitySizingTotalCost.lower_bounds
FacilitySizingTotalCost.upper_bounds
FacilitySizingTotalCost.gradient_available
FacilitySizingTotalCost.optimal_value
FacilitySizingTotalCost.optimal_solution
FacilitySizingTotalCost.model
FacilitySizingTotalCost.model_default_factors
FacilitySizingTotalCost.model_fixed_factors
FacilitySizingTotalCost.model_decision_factors
FacilitySizingTotalCost.rng_list
FacilitySizingTotalCost.factors
FacilitySizingTotalCost.specifications
FacilitySizingTotalCost.check_deterministic_constraints()
FacilitySizingTotalCost.check_epsilon()
FacilitySizingTotalCost.check_installation_costs()
FacilitySizingTotalCost.deterministic_objectives_and_gradients()
FacilitySizingTotalCost.deterministic_stochastic_constraints_and_gradients()
FacilitySizingTotalCost.factor_dict_to_vector()
FacilitySizingTotalCost.factor_dict_to_vector_gradients()
FacilitySizingTotalCost.get_random_solution()
FacilitySizingTotalCost.response_dict_to_objectives()
FacilitySizingTotalCost.response_dict_to_objectives_gradients()
FacilitySizingTotalCost.response_dict_to_stoch_constraints()
FacilitySizingTotalCost.vector_to_factor_dict()
- simopt.models.fixedsan module
- Summary
FixedSAN
FixedSANLongestPath
FixedSANLongestPath.name
FixedSANLongestPath.dim
FixedSANLongestPath.n_objectives
FixedSANLongestPath.n_stochastic_constraints
FixedSANLongestPath.minmax
FixedSANLongestPath.constraint_type
FixedSANLongestPath.variable_type
FixedSANLongestPath.lower_bounds
FixedSANLongestPath.upper_bounds
FixedSANLongestPath.gradient_available
FixedSANLongestPath.optimal_value
FixedSANLongestPath.optimal_solution
FixedSANLongestPath.model
FixedSANLongestPath.model_default_factors
FixedSANLongestPath.model_fixed_factors
FixedSANLongestPath.model_decision_factors
FixedSANLongestPath.rng_list
FixedSANLongestPath.factors
FixedSANLongestPath.specifications
FixedSANLongestPath.check_arc_costs()
FixedSANLongestPath.check_deterministic_constraints()
FixedSANLongestPath.deterministic_objectives_and_gradients()
FixedSANLongestPath.deterministic_stochastic_constraints_and_gradients()
FixedSANLongestPath.factor_dict_to_vector()
FixedSANLongestPath.get_random_solution()
FixedSANLongestPath.response_dict_to_objectives()
FixedSANLongestPath.response_dict_to_stoch_constraints()
FixedSANLongestPath.vector_to_factor_dict()
- simopt.models.hotel module
- Summary
Hotel
Hotel.name
Hotel.n_rngs
Hotel.n_responses
Hotel.factors
Hotel.specifications
Hotel.check_factor_list
Hotel.check_booking_limits()
Hotel.check_discount_rate()
Hotel.check_lambda()
Hotel.check_num_products()
Hotel.check_num_rooms()
Hotel.check_product_incidence()
Hotel.check_rack_rate()
Hotel.check_runlength()
Hotel.check_time_before()
Hotel.check_time_limit()
Hotel.replicate()
HotelRevenue
HotelRevenue.name
HotelRevenue.dim
HotelRevenue.n_objectives
HotelRevenue.n_stochastic_constraints
HotelRevenue.minmax
HotelRevenue.constraint_type
HotelRevenue.variable_type
HotelRevenue.lower_bounds
HotelRevenue.upper_bounds
HotelRevenue.gradient_available
HotelRevenue.optimal_value
HotelRevenue.optimal_solution
HotelRevenue.model
HotelRevenue.model_default_factors
HotelRevenue.model_fixed_factors
HotelRevenue.model_decision_factors
HotelRevenue.rng_list
HotelRevenue.factors
HotelRevenue.specifications
HotelRevenue.check_budget()
HotelRevenue.check_deterministic_constraints()
HotelRevenue.check_initial_solution()
HotelRevenue.check_simulatable_factors()
HotelRevenue.deterministic_objectives_and_gradients()
HotelRevenue.deterministic_stochastic_constraints_and_gradients()
HotelRevenue.factor_dict_to_vector()
HotelRevenue.get_random_solution()
HotelRevenue.response_dict_to_objectives()
HotelRevenue.response_dict_to_stoch_constraints()
HotelRevenue.vector_to_factor_dict()
- simopt.models.ironore module
- Summary
IronOre
IronOre.name
IronOre.n_rngs
IronOre.n_responses
IronOre.factors
IronOre.specifications
IronOre.check_factor_list
IronOre.check_capacity()
IronOre.check_holding_cost()
IronOre.check_inven_stop()
IronOre.check_max_price()
IronOre.check_max_prod_perday()
IronOre.check_mean_price()
IronOre.check_min_price()
IronOre.check_n_days()
IronOre.check_price_prod()
IronOre.check_price_sell()
IronOre.check_price_stop()
IronOre.check_prod_cost()
IronOre.check_simulatable_factors()
IronOre.check_st_dev()
IronOre.replicate()
IronOreMaxRev
IronOreMaxRev.name
IronOreMaxRev.dim
IronOreMaxRev.n_objectives
IronOreMaxRev.n_stochastic_constraints
IronOreMaxRev.minmax
IronOreMaxRev.constraint_type
IronOreMaxRev.variable_type
IronOreMaxRev.gradient_available
IronOreMaxRev.optimal_value
IronOreMaxRev.optimal_solution
IronOreMaxRev.model
IronOreMaxRev.model_default_factors
IronOreMaxRev.model_fixed_factors
IronOreMaxRev.model_decision_factors
IronOreMaxRev.rng_list
IronOreMaxRev.factors
IronOreMaxRev.specifications
IronOreMaxRev.check_deterministic_constraints()
IronOreMaxRev.deterministic_objectives_and_gradients()
IronOreMaxRev.deterministic_stochastic_constraints_and_gradients()
IronOreMaxRev.factor_dict_to_vector()
IronOreMaxRev.get_random_solution()
IronOreMaxRev.response_dict_to_objectives()
IronOreMaxRev.response_dict_to_stoch_constraints()
IronOreMaxRev.vector_to_factor_dict()
IronOreMaxRevCnt
IronOreMaxRevCnt.name
IronOreMaxRevCnt.dim
IronOreMaxRevCnt.n_objectives
IronOreMaxRevCnt.n_stochastic_constraints
IronOreMaxRevCnt.minmax
IronOreMaxRevCnt.constraint_type
IronOreMaxRevCnt.variable_type
IronOreMaxRevCnt.gradient_available
IronOreMaxRevCnt.optimal_value
IronOreMaxRevCnt.optimal_solution
IronOreMaxRevCnt.model
IronOreMaxRevCnt.model_default_factors
IronOreMaxRevCnt.model_fixed_factors
IronOreMaxRevCnt.model_decision_factors
IronOreMaxRevCnt.rng_list
IronOreMaxRevCnt.factors
IronOreMaxRevCnt.specifications
IronOreMaxRevCnt.check_deterministic_constraints()
IronOreMaxRevCnt.deterministic_objectives_and_gradients()
IronOreMaxRevCnt.deterministic_stochastic_constraints_and_gradients()
IronOreMaxRevCnt.factor_dict_to_vector()
IronOreMaxRevCnt.get_random_solution()
IronOreMaxRevCnt.response_dict_to_objectives()
IronOreMaxRevCnt.response_dict_to_stoch_constraints()
IronOreMaxRevCnt.vector_to_factor_dict()
- simopt.models.mm1queue module
- Summary
MM1MinMeanSojournTime
MM1MinMeanSojournTime.name
MM1MinMeanSojournTime.dim
MM1MinMeanSojournTime.n_objectives
MM1MinMeanSojournTime.n_stochastic_constraints
MM1MinMeanSojournTime.minmax
MM1MinMeanSojournTime.constraint_type
MM1MinMeanSojournTime.variable_type
MM1MinMeanSojournTime.lower_bounds
MM1MinMeanSojournTime.upper_bounds
MM1MinMeanSojournTime.gradient_available
MM1MinMeanSojournTime.optimal_value
MM1MinMeanSojournTime.optimal_solution
MM1MinMeanSojournTime.model
MM1MinMeanSojournTime.model_default_factors
MM1MinMeanSojournTime.model_fixed_factors
MM1MinMeanSojournTime.model_decision_factors
MM1MinMeanSojournTime.rng_list
MM1MinMeanSojournTime.factors
MM1MinMeanSojournTime.specifications
MM1MinMeanSojournTime.check_deterministic_constraints()
MM1MinMeanSojournTime.deterministic_objectives_and_gradients()
MM1MinMeanSojournTime.deterministic_stochastic_constraints_and_gradients()
MM1MinMeanSojournTime.factor_dict_to_vector()
MM1MinMeanSojournTime.get_random_solution()
MM1MinMeanSojournTime.response_dict_to_objectives()
MM1MinMeanSojournTime.response_dict_to_stoch_constraints()
MM1MinMeanSojournTime.vector_to_factor_dict()
MM1Queue
- simopt.models.network module
- Summary
Network
Network.name
Network.n_rngs
Network.n_responses
Network.factors
Network.specifications
Network.check_factor_list
Network.check_arrival_rate()
Network.check_cost_process()
Network.check_cost_time()
Network.check_lower_limits_transit_time()
Network.check_mode_transit_time()
Network.check_n_messages()
Network.check_n_networks()
Network.check_process_prob()
Network.check_simulatable_factors()
Network.check_upper_limits_transit_time()
Network.replicate()
NetworkMinTotalCost
NetworkMinTotalCost.name
NetworkMinTotalCost.dim
NetworkMinTotalCost.n_objectives
NetworkMinTotalCost.n_stochastic_constraints
NetworkMinTotalCost.minmax
NetworkMinTotalCost.constraint_type
NetworkMinTotalCost.variable_type
NetworkMinTotalCost.lower_bounds
NetworkMinTotalCost.upper_bounds
NetworkMinTotalCost.gradient_available
NetworkMinTotalCost.optimal_value
NetworkMinTotalCost.optimal_solution
NetworkMinTotalCost.model
NetworkMinTotalCost.model_default_factors
NetworkMinTotalCost.model_fixed_factors
NetworkMinTotalCost.model_decision_factors
NetworkMinTotalCost.rng_list
NetworkMinTotalCost.factors
NetworkMinTotalCost.specifications
NetworkMinTotalCost.check_deterministic_constraints()
NetworkMinTotalCost.deterministic_objectives_and_gradients()
NetworkMinTotalCost.deterministic_stochastic_constraints_and_gradients()
NetworkMinTotalCost.factor_dict_to_vector()
NetworkMinTotalCost.get_random_solution()
NetworkMinTotalCost.response_dict_to_objectives()
NetworkMinTotalCost.response_dict_to_stoch_constraints()
NetworkMinTotalCost.vector_to_factor_dict()
- simopt.models.paramesti module
- Summary
ParamEstiMaxLogLik
ParamEstiMaxLogLik.name
ParamEstiMaxLogLik.dim
ParamEstiMaxLogLik.n_objectives
ParamEstiMaxLogLik.n_stochastic_constraints
ParamEstiMaxLogLik.minmax
ParamEstiMaxLogLik.constraint_type
ParamEstiMaxLogLik.variable_type
ParamEstiMaxLogLik.lower_bounds
ParamEstiMaxLogLik.upper_bounds
ParamEstiMaxLogLik.gradient_available
ParamEstiMaxLogLik.optimal_value
ParamEstiMaxLogLik.optimal_solution
ParamEstiMaxLogLik.model
ParamEstiMaxLogLik.model_default_factors
ParamEstiMaxLogLik.model_fixed_factors
ParamEstiMaxLogLik.rng_list
ParamEstiMaxLogLik.factors
ParamEstiMaxLogLik.specifications
ParamEstiMaxLogLik.check_deterministic_constraints()
ParamEstiMaxLogLik.deterministic_objectives_and_gradients()
ParamEstiMaxLogLik.factor_dict_to_vector()
ParamEstiMaxLogLik.get_random_solution()
ParamEstiMaxLogLik.response_dict_to_objectives()
ParamEstiMaxLogLik.vector_to_factor_dict()
ParameterEstimation
ParameterEstimation.name
ParameterEstimation.n_rngs
ParameterEstimation.n_responses
ParameterEstimation.factors
ParameterEstimation.specifications
ParameterEstimation.check_factor_list
ParameterEstimation.check_simulatable_factors()
ParameterEstimation.check_x()
ParameterEstimation.check_xstar()
ParameterEstimation.replicate()
- simopt.models.rmitd module
- Summary
RMITD
RMITD.name
RMITD.n_rngs
RMITD.n_responses
RMITD.factors
RMITD.specifications
RMITD.check_factor_list
RMITD.check_cost()
RMITD.check_demand_means()
RMITD.check_gamma_scale()
RMITD.check_gamma_shape()
RMITD.check_initial_inventory()
RMITD.check_prices()
RMITD.check_reservation_qtys()
RMITD.check_simulatable_factors()
RMITD.check_time_horizon()
RMITD.replicate()
RMITDMaxRevenue
RMITDMaxRevenue.name
RMITDMaxRevenue.dim
RMITDMaxRevenue.n_objectives
RMITDMaxRevenue.n_stochastic_constraints
RMITDMaxRevenue.minmax
RMITDMaxRevenue.constraint_type
RMITDMaxRevenue.variable_type
RMITDMaxRevenue.lower_bounds
RMITDMaxRevenue.upper_bounds
RMITDMaxRevenue.gradient_available
RMITDMaxRevenue.optimal_value
RMITDMaxRevenue.optimal_solution
RMITDMaxRevenue.model
RMITDMaxRevenue.model_default_factors
RMITDMaxRevenue.model_fixed_factors
RMITDMaxRevenue.model_decision_factors
RMITDMaxRevenue.rng_list
RMITDMaxRevenue.factors
RMITDMaxRevenue.specifications
RMITDMaxRevenue.check_deterministic_constraints()
RMITDMaxRevenue.factor_dict_to_vector()
RMITDMaxRevenue.get_random_solution()
RMITDMaxRevenue.response_dict_to_objectives()
RMITDMaxRevenue.vector_to_factor_dict()
- simopt.models.san module
- Summary
SAN
SANLongestPath
SANLongestPath.name
SANLongestPath.dim
SANLongestPath.n_objectives
SANLongestPath.n_stochastic_constraints
SANLongestPath.minmax
SANLongestPath.constraint_type
SANLongestPath.variable_type
SANLongestPath.lower_bounds
SANLongestPath.upper_bounds
SANLongestPath.gradient_available
SANLongestPath.optimal_value
SANLongestPath.optimal_solution
SANLongestPath.model
SANLongestPath.model_default_factors
SANLongestPath.model_fixed_factors
SANLongestPath.model_decision_factors
SANLongestPath.rng_list
SANLongestPath.factors
SANLongestPath.specifications
SANLongestPath.check_arc_costs()
SANLongestPath.check_deterministic_constraints()
SANLongestPath.deterministic_objectives_and_gradients()
SANLongestPath.deterministic_stochastic_constraints_and_gradients()
SANLongestPath.factor_dict_to_vector()
SANLongestPath.get_random_solution()
SANLongestPath.response_dict_to_objectives()
SANLongestPath.response_dict_to_stoch_constraints()
SANLongestPath.vector_to_factor_dict()
- simopt.models.sscont module
- Summary
SSCont
SSCont.name
SSCont.n_rngs
SSCont.n_responses
SSCont.factors
SSCont.specifications
SSCont.check_factor_list
SSCont.check_S()
SSCont.check_backorder_cost()
SSCont.check_demand_mean()
SSCont.check_fixed_cost()
SSCont.check_holding_cost()
SSCont.check_lead_mean()
SSCont.check_n_days()
SSCont.check_s()
SSCont.check_simulatable_factors()
SSCont.check_variable_cost()
SSCont.check_warmup()
SSCont.replicate()
SSContMinCost
SSContMinCost.name
SSContMinCost.dim
SSContMinCost.n_objectives
SSContMinCost.n_stochastic_constraints
SSContMinCost.minmax
SSContMinCost.constraint_type
SSContMinCost.variable_type
SSContMinCost.lower_bounds
SSContMinCost.upper_bounds
SSContMinCost.gradient_available
SSContMinCost.optimal_value
SSContMinCost.optimal_solution
SSContMinCost.model
SSContMinCost.model_default_factors
SSContMinCost.model_fixed_factors
SSContMinCost.model_decision_factors
SSContMinCost.rng_list
SSContMinCost.factors
SSContMinCost.specifications
SSContMinCost.check_deterministic_constraints()
SSContMinCost.deterministic_objectives_and_gradients()
SSContMinCost.deterministic_stochastic_constraints_and_gradients()
SSContMinCost.factor_dict_to_vector()
SSContMinCost.get_random_solution()
SSContMinCost.response_dict_to_objectives()
SSContMinCost.response_dict_to_stoch_constraints()
SSContMinCost.vector_to_factor_dict()
- simopt.models.tableallocation module
- Summary
TableAllocation
TableAllocation.name
TableAllocation.n_rngs
TableAllocation.n_responses
TableAllocation.factors
TableAllocation.specifications
TableAllocation.check_factor_list
TableAllocation.check_capacity()
TableAllocation.check_lambda()
TableAllocation.check_n_hours()
TableAllocation.check_num_tables()
TableAllocation.check_service_time_means()
TableAllocation.check_simulatable_factors()
TableAllocation.check_table_cap()
TableAllocation.check_table_revenue()
TableAllocation.replicate()
TableAllocationMaxRev
TableAllocationMaxRev.name
TableAllocationMaxRev.dim
TableAllocationMaxRev.n_objectives
TableAllocationMaxRev.n_stochastic_constraints
TableAllocationMaxRev.minmax
TableAllocationMaxRev.constraint_type
TableAllocationMaxRev.variable_type
TableAllocationMaxRev.gradient_available
TableAllocationMaxRev.optimal_value
TableAllocationMaxRev.optimal_solution
TableAllocationMaxRev.model
TableAllocationMaxRev.model_default_factors
TableAllocationMaxRev.model_fixed_factors
TableAllocationMaxRev.model_decision_factors
TableAllocationMaxRev.rng_list
TableAllocationMaxRev.factors
TableAllocationMaxRev.specifications
TableAllocationMaxRev.check_deterministic_constraints()
TableAllocationMaxRev.deterministic_objectives_and_gradients()
TableAllocationMaxRev.deterministic_stochastic_constraints_and_gradients()
TableAllocationMaxRev.factor_dict_to_vector()
TableAllocationMaxRev.get_random_solution()
TableAllocationMaxRev.response_dict_to_objectives()
TableAllocationMaxRev.response_dict_to_stoch_constraints()
TableAllocationMaxRev.vector_to_factor_dict()
- Module contents
- simopt.solvers package
- Submodules
- simopt.solvers.adam module
- simopt.solvers.aloe module
- Summary
ALOE
ALOE.name
ALOE.objective_type
ALOE.constraint_type
ALOE.variable_type
ALOE.gradient_needed
ALOE.factors
ALOE.specifications
ALOE.rng_list
ALOE.check_alpha_0()
ALOE.check_alpha_max()
ALOE.check_epsilon_f()
ALOE.check_gamma()
ALOE.check_lambda()
ALOE.check_r()
ALOE.check_sensitivity()
ALOE.check_theta()
ALOE.finite_diff()
ALOE.solve()
- simopt.solvers.astrodf module
- Summary
ASTRODF
ASTRODF.name
ASTRODF.objective_type
ASTRODF.constraint_type
ASTRODF.variable_type
ASTRODF.gradient_needed
ASTRODF.factors
ASTRODF.specifications
ASTRODF.rng_list
ASTRODF.check_eta_1()
ASTRODF.check_eta_2()
ASTRODF.check_gamma_1()
ASTRODF.check_gamma_2()
ASTRODF.check_lambda_min()
ASTRODF.construct_model()
ASTRODF.evaluate_model()
ASTRODF.get_coordinate_basis_interpolation_points()
ASTRODF.get_coordinate_vector()
ASTRODF.get_model_coefficients()
ASTRODF.get_rotated_basis()
ASTRODF.get_rotated_basis_interpolation_points()
ASTRODF.get_stopping_time()
ASTRODF.iterate()
ASTRODF.solve()
- simopt.solvers.neldmd module
- Summary
NelderMead
NelderMead.name
NelderMead.objective_type
NelderMead.constraint_type
NelderMead.variable_type
NelderMead.gradient_needed
NelderMead.factors
NelderMead.specifications
NelderMead.rng_list
NelderMead.check_alpha()
NelderMead.check_betap()
NelderMead.check_const()
NelderMead.check_delta()
NelderMead.check_gammap()
NelderMead.check_initial_spread()
NelderMead.check_r()
NelderMead.check_sensitivity()
NelderMead.solve()
NelderMead.sort_and_end_update()
- simopt.solvers.randomsearch module
- simopt.solvers.spsa module
- Summary
SPSA
SPSA.name
SPSA.objective_type
SPSA.constraint_type
SPSA.variable_type
SPSA.gradient_needed
SPSA.factors
SPSA.specifications
SPSA.rng_list
SPSA.check_alpha()
SPSA.check_eval_pct()
SPSA.check_gamma()
SPSA.check_gavg()
SPSA.check_iter_pct()
SPSA.check_n_loss()
SPSA.check_n_reps()
SPSA.check_problem_factors()
SPSA.check_step()
SPSA.gen_simul_pert_vec()
SPSA.solve()
check_cons()
- simopt.solvers.strong module
- Summary
STRONG
STRONG.name
STRONG.objective_type
STRONG.constraint_type
STRONG.variable_type
STRONG.gradient_needed
STRONG.factors
STRONG.specifications
STRONG.rng_list
STRONG.cauchy_point()
STRONG.check_cons()
STRONG.check_delta_T()
STRONG.check_delta_threshold()
STRONG.check_eta_0()
STRONG.check_eta_1()
STRONG.check_gamma_1()
STRONG.check_gamma_2()
STRONG.check_lambda()
STRONG.check_n_r()
STRONG.check_sensitivity()
STRONG.finite_diff()
STRONG.solve()
- Module contents
Submodules¶
simopt.GUI module¶
- class simopt.GUI.Cross_Design_Window(master, main_widow, forced_creation=False)¶
Bases:
object
- confirm_cross_design_function()¶
- get_crossdesign_MetaExperiment()¶
- test_function(*args)¶
- class simopt.GUI.Experiment_Window(master)¶
Bases:
Tk
Main window of the GUI
- self.frame¶
- Type
Tkinter frame that contains the GUI widgets
- self.experiment_master_list¶
- Type
2D array list that contains queue of experiment object arguments
- self.widget_list¶
this functionality is currently not enabled, possible contraint of the GUI framework
- Type
Current method to clear, view/edit, and run individual experiments
- self.experiment_object_list¶
- Type
List that contains matching experiment objects to every sublist from self.experiment_master_list
- self.problem_var¶
- Type
Variable that contains selected problem (use .get() method to obtain value for)
- self.solver_var¶
- Type
Variable that contains selected solver (use .get() method to obtain value for)
- self.maco_var¶
- Type
Variable that contains inputted number of macroreplications (use .get() method to obtain value for)
- Functions¶
- ---------
- show_problem_factors(self, \*args)¶
connected to : self.problem_menu <- ttk.OptionMenu
- Type
displays additional information on problem and oracle factors
- show_solver_factors(self, \*args)¶
connected to : self.solver_menu <- ttk.OptionMenu
- Type
displays additional information on solver factors
- run_single_function(self, \*args)¶
connected to : self.run_button <- ttk.Button
- Type
completes single-object experiment and invokes Post_Processing_Window class
- crossdesign_function(self)¶
connected to : self.crossdesign_button <- ttk.Button
- Type
invokes Cross_Design_Window class
- clearRow_function(self)¶
connected to : self.clear_button_added <- ttk.Button, within self.add_experiment
- Type
~not functional~ meant to clear a single row of the experiment queue
- clear_queue(self)¶
connected to : self.clear_queue_button <- ttk.Button
- Type
clears entire experiment queue and resets all lists containing experiment data
- add_experiment(self)¶
connected to : self.add_button <- ttk.Button
- Type
adds experiment to experiment queue
- confirm_problem_factors(self)¶
return : problem_factors_return | type = list | contains = [problem factor dictionary, None or problem rename]
- Type
used within run_single_function, stores all problem factors in a dictionary
- confirm_oracle_factors(self)¶
return : oracle_factors_return | type = list | contains = [oracle factor dictionary]
- Type
used within run_single_function, stores all oracle factors in a dictionary
- confirm_solver_factors(self)¶
return : solver_factors_return | type = list | contains = [solver factor dictionary, None or solver rename]
- Type
used within run_single_function, stores all solver factors in a dictionary
- onFrameConfigure_queue(self, event)¶
- Type
creates scrollbar for the queue notebook
- onFrameConfigure_factor_problem(self, event)¶
- Type
creates scrollbar for the problem factors notebook
- onFrameConfigure_factor_solver(self, event)¶
- Type
creates scrollbar for the solver factors notebook
- onFrameConfigure_factor_oracle(self, event)¶
- Type
creates scrollbar for the oracle factor notebook
- test_function(self, \*args)¶
- Type
placeholder function to make sure buttons, OptionMenus, etc are connected properly
- add_experiment(*args)¶
- add_meta_exp_to_frame(n_macroreps=None, input_meta_experiment=None)¶
- checkbox_function2(exp, rowNum)¶
- clearRow_function(integer)¶
- clear_meta_function(integer)¶
- clear_queue()¶
- confirm_oracle_factors()¶
- confirm_problem_factors()¶
- confirm_solver_factors()¶
- crossdesign_function()¶
- exit_meta_view(row_num)¶
- load_pickle_file_function()¶
- make_meta_experiment_func()¶
- meta_experiment_problem_solver_list(metaExperiment)¶
- onFrameConfigure_factor_oracle(event)¶
- onFrameConfigure_factor_problem(event)¶
- onFrameConfigure_factor_solver(event)¶
- onFrameConfigure_queue(event)¶
- plot_meta_function(integer)¶
- post_norm_return_func()¶
- post_norm_setup()¶
- post_normal_all_function()¶
- post_process_disable_button(meta=False)¶
- post_rep_function(integer)¶
- post_rep_meta_function(integer)¶
- progress_bar_test()¶
- run_meta_function(integer)¶
- run_row_function(integer)¶
- save_edit_function(integer)¶
- select_pickle_file_fuction(*args)¶
- show_problem_factors(*args)¶
- show_problem_factors2(row_index, *args)¶
- show_solver_factors(*args)¶
- show_solver_factors2(row_index, *args)¶
- update_problem_list_compatability()¶
- viewEdit_function(integer)¶
- view_meta_function(row_num)¶
- class simopt.GUI.Plot_Window(master, main_window, experiment_list=None, metaList=None)¶
Bases:
object
Plot Window Page of the GUI
- Parameters
- add_plot()¶
- changeOnHover(button, colorOnHover, colorOnLeave)¶
- clear_row(place)¶
- get_parameters_and_settings(a, plot_choice)¶
- plot_button()¶
- solver_select_function(a)¶
- view_one_pot(path_name)¶
- class simopt.GUI.Post_Normal_Window(master, experiment_list, main_window, meta=False)¶
Bases:
object
Post-Normalization Page of the GUI
- Parameters
- post_norm_run_function()¶
- test_function2(*args)¶
- class simopt.GUI.Post_Processing_Window(master, myexperiment, experiment_list, main_window, meta=False)¶
Bases:
object
Postprocessing Page of the GUI
- Parameters
- post_processing_run_function()¶
- test_function2(*args)¶
- simopt.GUI.main()¶
- simopt.GUI.problem_solver_abbreviated_name_to_unabbreviated(problem_or_solver, abbreviated_dictionary, unabbreviated_dictionary)¶
- simopt.GUI.problem_solver_unabbreviated_to_object(problem_or_solver, unabbreviated_dictionary)¶
simopt.base module¶
Summary¶
Provide base classes for solvers, problems, and models.
- class simopt.base.Model(fixed_factors)¶
Bases:
object
Base class to implement simulation models (models) featured in simulation-optimization problems.
- Parameters
fixed_factors (dict) – Dictionary of user-specified model factors.
- check_factor_datatype(factor_name)¶
Determine if a factor’s data type matches its specification.
- Returns
is_right_type – True if factor is of specified data type, otherwise False.
- Return type
- check_simulatable_factor(factor_name)¶
Determine if a simulation replication can be run with the given factor.
- check_simulatable_factors()¶
Determine if a simulation replication can be run with the given factors.
Notes
Each subclass of
base.Model
has its own customcheck_simulatable_factors
method.- Returns
is_simulatable – True if model specified by factors is simulatable, otherwise False.
- Return type
- replicate(rng_list)¶
Simulate a single replication for the current model factors.
- Parameters
rng_list (list [
mrg32k3a.mrg32k3a.MRG32k3a
]) – RNGs for model to use when simulating a replication.- Returns
responses (dict) – Performance measures of interest.
gradients (dict [dict]) – Gradient estimate for each response.
- class simopt.base.Problem(fixed_factors, model_fixed_factors)¶
Bases:
object
Base class to implement simulation-optimization problems.
- constraint_type¶
Description of constraints types: “unconstrained”, “box”, “deterministic”, “stochastic”.
- Type
- gradient_available¶
True if direct gradient of objective function is available, otherwise False.
- Type
- model¶
Associated simulation model that generates replications.
- Type
base.Model
- rng_list¶
List of RNGs used to generate a random initial solution or a random problem instance.
- Type
list [
mrg32k3a.mrg32k3a.MRG32k3a
]
- factors¶
- Changeable factors of the problem:
- initial_solutiontuple
Default initial solution from which solvers start.
- budgetint
Max number of replications (fn evals) for a solver to take.
- Type
- Parameters
- attach_rngs(rng_list)¶
Attach a list of random-number generators to the problem.
- Parameters
rng_list (list [
mrg32k3a.mrg32k3a.MRG32k3a
]) – List of random-number generators used to generate a random initial solution or a random problem instance.
- check_budget()¶
Check if budget is strictly positive.
- Returns
True if budget is strictly positive, otherwise False.
- Return type
- check_deterministic_constraints(x)¶
Check if a solution x satisfies the problem’s deterministic constraints.
- check_factor_datatype(factor_name)¶
Determine if a factor’s data type matches its specification.
- check_initial_solution()¶
Check if initial solution is feasible and of correct dimension.
- Returns
True if initial solution is feasible and of correct dimension, otherwise False.
- Return type
- check_problem_factor(factor_name)¶
Determine if the setting of a problem factor is permissible.
- check_problem_factors()¶
Determine if the joint settings of problem factors are permissible.
Notes
Each subclass of
base.Problem
has its own customcheck_problem_factors
method.- Returns
is_simulatable – True if problem factors are permissible, otherwise False.
- Return type
- deterministic_objectives_and_gradients(x)¶
Compute deterministic components of objectives for a solution x.
- Parameters
x (tuple) – Vector of decision variables.
- Returns
det_objectives (tuple) – Vector of deterministic components of objectives.
det_objectives_gradients (tuple) – Vector of gradients of deterministic components of objectives.
- deterministic_stochastic_constraints_and_gradients(x)¶
Compute deterministic components of stochastic constraints for a solution x.
- Parameters
x (tuple) – Vector of decision variables.
- Returns
det_stoch_constraints (tuple) – Vector of deterministic components of stochastic constraints.
det_stoch_constraints_gradients (tuple) – Vector of gradients of deterministic components of stochastic constraints.
- factor_dict_to_vector(factor_dict)¶
Convert a dictionary with factor keys to a vector of variables.
Notes
Each subclass of
base.Problem
has its own customfactor_dict_to_vector
method.
- factor_dict_to_vector_gradients(factor_dict)¶
Convert a dictionary with factor keys to a gradient vector.
Notes
A subclass of
base.Problem
can have its own customfactor_dict_to_vector_gradients
method if the objective is deterministic.
- get_random_solution(rand_sol_rng)¶
Generate a random solution for starting or restarting solvers.
- Parameters
rand_sol_rng (
mrg32k3a.mrg32k3a.MRG32k3a
) – Random-number generator used to sample a new random solution.- Returns
x – vector of decision variables
- Return type
- response_dict_to_objectives(response_dict)¶
Convert a dictionary with response keys to a vector of objectives.
Notes
Each subclass of
base.Problem
has its own customresponse_dict_to_objectives
method.
- response_dict_to_objectives_gradients(response_dict)¶
Convert a dictionary with response keys to a vector of gradients.
Notes
A subclass of
base.Problem
can have its own customresponse_dict_to_objectives_gradients
method if the objective is deterministic.
- response_dict_to_stoch_constraints(response_dict)¶
Convert a dictionary with response keys to a vector of left-hand sides of stochastic constraints: E[Y] <= 0.
Notes
Each subclass of
base.Problem
has its own customresponse_dict_to_stoch_constraints
method.
- simulate(solution, m=1)¶
Simulate m i.i.d. replications at solution x.
Notes
Gradients of objective function and stochastic constraint LHSs are temporarily commented out. Under development.
- Parameters
solution (
base.Solution
) – Solution to evalaute.m (int) – Number of replications to simulate at x.
- simulate_up_to(solutions, n_reps)¶
Simulate a set of solutions up to a given number of replications.
- Parameters
solutions (set [
base.Solution
]) – A set ofbase.Solution
objects.n_reps (int) – Common number of replications to simulate each solution up to.
- vector_to_factor_dict(vector)¶
Convert a vector of variables to a dictionary with factor keys.
Notes
Each subclass of
base.Problem
has its own customvector_to_factor_dict
method.
- class simopt.base.Solution(x, problem)¶
Bases:
object
Base class for solutions represented as vectors of decision variables and dictionaries of decision factors.
- rng_list¶
RNGs for model to use when running replications at the solution.
- Type
list [
mrg32k3a.mrg32k3a.MRG32k3a
]
- det_objectives_gradients¶
Gradients of deterministic components added to objectives; # objectives x dimension.
- det_stoch_constraints_gradients¶
Gradients of deterministics components added to LHS stochastic constraints; # stochastic constraints x dimension.
- objectives¶
Objective(s) estimates from each replication; # replications x # objectives.
- Type
numpy array
- objectives_gradients¶
Gradient estimates of objective(s) from each replication; # replications x # objectives x dimension.
- Type
numpy array
- stochastic_constraints¶
Stochastic constraint estimates from each replication; # replications x # stochastic constraints.
- Type
numpy array
- stochastic_constraints_gradients¶
Gradient estimates of stochastic constraints from each replication; # replications x # stochastic constraints x dimension.
- Type
numpy array
- Parameters
x (tuple) – Vector of decision variables.
problem (
base.Problem
) – Problem to which x is a solution.
- attach_rngs(rng_list, copy=True)¶
Attach a list of random-number generators to the solution.
- Parameters
rng_list (list [
mrg32k3a.mrg32k3a.MRG32k3a
]) – List of random-number generators used to run simulation replications.copy (bool, default=True) – True if we want to copy the
mrg32k3a.mrg32k3a.MRG32k3a
objects, otherwise False.
- pad_storage(m)¶
Append zeros to numpy arrays for summary statistics.
- Parameters
m (int) – Number of replications to simulate.
- recompute_summary_statistics()¶
Recompute summary statistics of the solution.
Notes
Statistics for gradients of objectives and stochastic constraint LHSs are temporarily commented out. Under development.
- class simopt.base.Solver(fixed_factors)¶
Bases:
object
Base class to implement simulation-optimization solvers.
- constraint_type¶
Description of constraints types: “unconstrained”, “box”, “deterministic”, “stochastic”.
- Type
- rng_list¶
List of RNGs used for the solver’s internal purposes.
- Type
list [
mrg32k3a.mrg32k3a.MRG32k3a
]
- solution_progenitor_rngs¶
List of RNGs used as a baseline for simulating solutions.
- Type
list [
mrg32k3a.mrg32k3a.MRG32k3a
]
- Parameters
fixed_factors (dict) – Dictionary of user-specified solver factors.
- attach_rngs(rng_list)¶
Attach a list of random-number generators to the solver.
- Parameters
rng_list (list [
mrg32k3a.mrg32k3a.MRG32k3a
]) – List of random-number generators used for the solver’s internal purposes.
- check_crn_across_solns()¶
Check solver factor crn_across_solns.
Notes
Currently implemented to always return True. This factor must be a bool.
- check_factor_datatype(factor_name)¶
Determine if a factor’s data type matches its specification.
- check_solver_factor(factor_name)¶
Determine if the setting of a solver factor is permissible.
- check_solver_factors()¶
Determine if the joint settings of solver factors are permissible.
Notes
Each subclass of
base.Solver
has its own customcheck_solver_factors
method.- Returns
is_simulatable – True if the solver factors are permissible, otherwise False.
- Return type
- create_new_solution(x, problem)¶
Create a new solution object with attached RNGs primed to simulate replications.
- Parameters
x (tuple) – Vector of decision variables.
problem (
base.Problem
) – Problem being solved by the solvers.
- Returns
new_solution – New solution.
- Return type
base.Solution
- rebase(n_reps)¶
Rebase the progenitor rngs to start at a later subsubstream index.
- Parameters
n_reps (int) – Substream index to skip to.
- solve(problem)¶
Run a single macroreplication of a solver on a problem.
Notes
Each subclass of
base.Solver
has its own customsolve
method.- Parameters
problem (
base.Problem
) – Simulation-optimization problem to solve.- Returns
recommended_solns (list [
Solution
]) – List of solutions recommended throughout the budget.intermediate_budgets (list [int]) – List of intermediate budgets when recommended solutions changes.
simopt.data_farming_base module¶
- class simopt.data_farming_base.DataFarmingExperiment(model_name, factor_settings_filename, factor_headers, design_filename=None, model_fixed_factors={})¶
Bases:
object
Base class for data-farming experiments consisting of an model and design of associated factors.
- model¶
Model on which the experiment is run.
- Type
base.Model
- design¶
List of design points forming the design.
- Type
list [
data_farming_base.DesignPoint
]
- Parameters
model_name (str) – Name of model on which the experiment is run.
factor_settings_filename (str) – Name of .txt file containing factor ranges and # of digits.
factor_headers (list [str]) – Ordered list of factor names appearing in factor settings/design file.
design_filename (str) – Name of .txt file containing design matrix.
model_fixed_factors (dict) – Non-default values of model factors that will not be varied.
- print_to_csv(csv_filename='raw_results')¶
Extract observed responses from simulated design points and publish to .csv output file.
- Parameters
csv_filename (str, default="raw_results") – Name of .csv file to print output to.
- run(n_reps=10, crn_across_design_pts=True)¶
Run a fixed number of macroreplications at each design point.
- class simopt.data_farming_base.DataFarmingMetaExperiment(solver_name, problem_name, solver_factor_headers, solver_factor_settings_filename=None, design_filename=None, solver_fixed_factors=None, problem_fixed_factors=None, model_fixed_factors=None)¶
Bases:
object
Base class for data-farming meta experiments consisting of problem-solver pairs and a design of associated factors.
- design¶
List of design points forming the design.
- Type
list [
experiment_base.ProblemSolver
]
- Parameters
solver_name (str) – Name of solver.
problem_name (str) – Name of problem.
solver_factor_headers (list [str]) – Ordered list of solver factor names appearing in factor settings/design file.
solver_factor_settings_filename (str, default=None) – Name of .txt file containing solver factor ranges and # of digits.
design_filename (str, default=None) – Name of .txt file containing design matrix.
solver_fixed_factors (dict, default=None) – Dictionary of user-specified solver factors that will not be varied.
problem_fixed_factors (dict, default=None) – Dictionary of user-specified problem factors that will not be varied.
model_fixed_factors (dict, default=None) – Dictionary of user-specified model factors that will not be varied.
- post_normalize(n_postreps_init_opt, crn_across_init_opt=True)¶
Post-normalize problem-solver pairs.
- post_replicate(n_postreps, crn_across_budget=True, crn_across_macroreps=False)¶
For each design point, run postreplications at solutions recommended by the solver on each macroreplication.
- Parameters
n_postreps (int) – Number of postreplications to take at each recommended solution.
crn_across_budget (bool, default=True) – True if CRN are to be used for post-replications at solutions recommended at different times, otherwise False.
crn_across_macroreps (bool, default=False) – True if CRN are to be used for post-replications at solutions recommended on different macroreplications, otherwise False.
- report_statistics(solve_tols=[0.05, 0.1, 0.2, 0.5], csv_filename='df_solver_results')¶
For each design point, calculate statistics from each macoreplication and print to csv.
- class simopt.data_farming_base.DesignPoint(model)¶
Bases:
object
Base class for design points represented as dictionaries of factors.
- model¶
Model to simulate.
- Type
base.Model
- rng_list¶
Rngs for model to use when running replications at the solution.
- Type
list [
mrg32k3a.mrg32k3a.MRG32k3a
]
- gradients¶
Gradients of responses (w.r.t. model factors) observed from replications.
- Parameters
model (
base.Model
) – Model with factors model_factors.
- attach_rngs(rng_list, copy=True)¶
Attach a list of random-number generators to the design point.
- Parameters
rng_list (list [
mrg32k3a.mrg32k3a.MRG32k3a
]) – List of random-number generators used to run simulation replications.
simopt.directory module¶
Summary¶
Provide dictionary directories listing solvers, problems, and models.
simopt.experiment_base module¶
Summary¶
Provide base classes for problem-solver pairs and helper functions for reading/writing data and plotting.
- class simopt.experiment_base.Curve(x_vals, y_vals)¶
Bases:
object
Base class for all curves.
- Parameters
- compute_area_under_curve()¶
Compute the area under a curve.
- Returns
area – Area under the curve.
- Return type
- compute_crossing_time(threshold)¶
Compute the first time at which a curve drops below a given threshold.
- curve_to_full_curve()¶
Create a curve with duplicate x- and y-values to indicate steps.
- Returns
full_curve – Curve with duplicate x- and y-values.
- Return type
experiment_base.Curve
- curve_to_mesh(mesh)¶
Create a curve defined at equally spaced x values.
- Parameters
mesh (list of floats) – List of uniformly spaced x-values.
- Returns
mesh_curve – Curve with equally spaced x-values.
- Return type
experiment_base.Curve
- lookup(x)¶
Lookup the y-value of the curve at an intermediate x-value.
- plot(color_str='C0', curve_type='regular')¶
Plot a curve.
- class simopt.experiment_base.ProblemSolver(solver_name=None, problem_name=None, solver_rename=None, problem_rename=None, solver=None, problem=None, solver_fixed_factors=None, problem_fixed_factors=None, model_fixed_factors=None, file_name_path=None)¶
Bases:
object
Base class for running one solver on one problem.
- solver¶
Simulation-optimization solver.
- Type
base.Solver
- problem¶
Simulation-optimization problem.
- Type
base.Problem
- all_recommended_xs¶
Sequences of recommended solutions from each macroreplication.
- all_intermediate_budgets¶
Sequences of intermediate budgets from each macroreplication.
- crn_across_budget¶
True if CRN used for post-replications at solutions recommended at different times, otherwise False.
- Type
- crn_across_macroreps¶
True if CRN used for post-replications at solutions recommended on different macroreplications, otherwise False.
- Type
- all_post_replicates¶
All post-replicates from all solutions from all macroreplications.
- all_est_objectives¶
Estimated objective values of all solutions from all macroreplications.
- Type
numpy array [numpy array]
- n_postreps_init_opt¶
Number of postreplications to take at initial solution (x0) and optimal solution (x*).
- Type
- crn_across_init_opt¶
True if CRN used for post-replications at solutions x0 and x*, otherwise False.
- Type
- objective_curves¶
Curves of estimated objective function values, one for each macroreplication.
- Type
list [
experiment_base.Curve
]
- progress_curves¶
Progress curves, one for each macroreplication.
- Type
list [
experiment_base.Curve
]
- Parameters
solver_name (str, optional) – Name of solver.
problem_name (str, optional) – Name of problem.
solver_rename (str, optional) – User-specified name for solver.
problem_rename (str, optional) – User-specified name for problem.
solver (
base.Solver
, optional) – Simulation-optimization solver.problem (
base.Problem
, optional) – Simulation-optimization problem.solver_fixed_factors (dict, optional) – Dictionary of user-specified solver factors.
problem_fixed_factors (dict, optional) – Dictionary of user-specified problem factors.
model_fixed_factors (dict, optional) – Dictionary of user-specified model factors.
file_name_path (str, optional) – Path of .pickle file for saving
experiment_base.ProblemSolver
objects.
- bootstrap_sample(bootstrap_rng, normalize=True)¶
Generate a bootstrap sample of estimated objective curves or estimated progress curves.
- Parameters
bootstrap_rng (
mrg32k3a.mrg32k3a.MRG32k3a
) – Random number generator to use for bootstrapping.normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
- Returns
bootstrap_curves – Bootstrapped estimated objective curves or estimated progress curves of all solutions from all bootstrapped macroreplications.
- Return type
list [
experiment_base.Curve
]
- check_compatibility()¶
Check whether the experiment’s solver and problem are compatible.
- Returns
error_str – Error message in the event problem and solver are incompatible.
- Return type
- check_postnormalize()¶
Check if the experiment has been postnormalized.
- Returns
postnormalized – True if the experiment has been postnormalized, otherwise False.
- Return type
- check_postreplicate()¶
Check if the experiment has been postreplicated.
- Returns
postreplicated – True if the experiment has been postreplicated, otherwise False.
- Return type
- check_run()¶
Check if the experiment has been run.
- Returns
ran – True if the experiment been run, otherwise False.
- Return type
- clear_postnorm()¶
Delete results from
post_normalize()
associated with experiment.
- clear_postreplicate()¶
Delete results from
post_replicate()
method and any downstream results.
- clear_run()¶
Delete results from
run()
method and any downstream results.
- log_experiment_results(print_solutions=True)¶
Create readable .txt file from a problem-solver pair’s .pickle file.
- post_replicate(n_postreps, crn_across_budget=True, crn_across_macroreps=False)¶
Run postreplications at solutions recommended by the solver.
- Parameters
n_postreps (int) – Number of postreplications to take at each recommended solution.
crn_across_budget (bool, default=True) – True if CRN used for post-replications at solutions recommended at different times, otherwise False.
crn_across_macroreps (bool, default=False) – True if CRN used for post-replications at solutions recommended on different macroreplications, otherwise False.
- record_experiment_results()¶
Save
experiment_base.ProblemSolver
object to .pickle file.
- class simopt.experiment_base.ProblemsSolvers(solver_names=None, problem_names=None, solver_renames=None, problem_renames=None, fixed_factors_filename=None, solvers=None, problems=None, experiments=None, file_name_path=None)¶
Bases:
object
Base class for running one or more solver on one or more problem.
- solvers¶
List of solvers.
- Type
list [
base.Solver
]
- problems¶
List of problems.
- Type
list [
base.Problem
]
- all_solver_fixed_factors¶
- Fixed solver factors for each solver:
outer key is solver name; inner key is factor name.
- all_problem_fixed_factors¶
- Fixed problem factors for each problem:
outer key is problem name; inner key is factor name.
- all_model_fixed_factors¶
- Fixed model factors for each problem:
outer key is problem name; inner key is factor name.
- experiments¶
All problem-solver pairs.
- Type
list [list [
experiment_base.ProblemSolver
]]
- Parameters
problem_names (list [str], optional) – List of problem names.
solver_renames (list [str], optional) – User-specified names for solvers.
problem_renames (list [str], optional) – User-specified names for problems.
fixed_factors_filename (str, optional) – Name of .py file containing dictionaries of fixed factors for solvers/problems/models.
solvers (list [
base.Solver
], optional) – List of solvers.problems (list [
base.Problem
], optional) – List of problems.experiments (list [list [
experiment_base.ProblemSolver
]], optional) – All problem-solver pairs.file_name_path (str) – Path of .pickle file for saving
experiment_base.ProblemsSolvers
object.
- check_compatibility()¶
Check whether all experiments’ solvers and problems are compatible.
- Returns
error_str – Error message in the event any problem and solver are incompatible.
- Return type
- log_group_experiment_results()¶
Create readable .txt file describing the solvers and problems that make up the ProblemSolvers object.
- post_normalize(n_postreps_init_opt, crn_across_init_opt=True)¶
Construct objective curves and (normalized) progress curves for all collections of experiments on all given problem.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on a common problem.n_postreps_init_opt (int) – Number of postreplications to take at initial x0 and optimal x*.
crn_across_init_opt (bool, default=True) – True if CRN used for post-replications at solutions x0 and x*, otherwise False.
- post_replicate(n_postreps, crn_across_budget=True, crn_across_macroreps=False)¶
For each problem-solver pair, run postreplications at solutions recommended by the solver on each macroreplication.
- Parameters
n_postreps (int) – Number of postreplications to take at each recommended solution.
crn_across_budget (bool, default=True) – True if CRN used for post-replications at solutions recommended at different times, otherwise False.
crn_across_macroreps (bool, default=False) – True if CRN used for post-replications at solutions recommended on different macroreplications, otherwise False.
- record_group_experiment_results()¶
Save
experiment_base.ProblemsSolvers
object to .pickle file.
- simopt.experiment_base.bootstrap_procedure(experiments, n_bootstraps, conf_level, plot_type, beta=None, solve_tol=None, estimator=None, normalize=True)¶
Obtain bootstrap sample and compute confidence intervals.
- Parameters
experiments (list [list [
experiment_base.ProblemSolver
]]) – Problem-solver pairs of different solvers and/or problems.n_bootstraps (int) – Number of times to generate a bootstrap sample of estimated progress curves.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
plot_type (str) –
- String indicating which type of plot to produce:
”mean” : estimated mean progress curve;
”quantile” : estimated beta quantile progress curve;
”area_mean” : mean of area under progress curve;
”area_std_dev” : standard deviation of area under progress curve;
”solve_time_quantile” : beta quantile of solve time;
”solve_time_cdf” : cdf of solve time;
”cdf_solvability” : cdf solvability profile;
”quantile_solvability” : quantile solvability profile;
”diff_cdf_solvability” : difference of cdf solvability profiles;
”diff_quantile_solvability” : difference of quantile solvability profiles.
beta (float, optional) – Quantile to plot, e.g., beta quantile; in (0, 1).
solve_tol (float, optional) – Relative optimality gap definining when a problem is solved; in (0, 1].
estimator (float or
experiment_base.Curve
, optional) – Main estimator, e.g., mean convergence curve from an experiment.normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
- Returns
Lower and upper bound(s) of bootstrap CI(s), as floats or curves.
- Return type
bs_CI_lower_bounds, bs_CI_upper_bounds = float or
experiment_base.Curve
- simopt.experiment_base.bootstrap_sample_all(experiments, bootstrap_rng, normalize=True)¶
Generate bootstrap samples of estimated progress curves (normalized and unnormalized) from a set of experiments.
- Parameters
experiments (list [list [
experiment_base.ProblemSolver
]]) – Problem-solver pairs of different solvers and/or problems.bootstrap_rng (
mrg32k3a.mrg32k3a.MRG32k3a
) – Random number generator to use for bootstrapping.normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
- Returns
bootstrap_curves – Bootstrapped estimated objective curves or estimated progress curves of all solutions from all macroreplications.
- Return type
list [list [list [
experiment_base.Curve
]]]
- simopt.experiment_base.cdf_of_curves_crossing_times(curves, threshold)¶
Compute the cdf of crossing times of curves.
- Parameters
curves (list [
experiment_base.Curve
]) – Collection of curves to aggregate.threshold (float) – Value for which to find first crossing time.
- Returns
cdf_curve – CDF of crossing times.
- Return type
experiment_base.Curve
- simopt.experiment_base.check_common_problem_and_reference(experiments)¶
Check if a collection of experiments have the same problem, x0, and x*.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on a common problem.
- simopt.experiment_base.compute_bootstrap_CI(observations, conf_level, bias_correction=True, overall_estimator=None)¶
Construct a bootstrap confidence interval for an estimator.
- Parameters
observations (list) – Estimators from all bootstrap instances.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
bias_correction (bool, default=True) – True if bias-corrected bootstrap CIs (via percentile method) are to be used, otherwise False.
overall_estimator (float, optional) – Estimator to compute bootstrap confidence interval of; required for bias corrected CI.
- Returns
bs_CI_lower_bound (float) – Lower bound of bootstrap CI.
bs_CI_upper_bound (float) – Upper bound of bootstrap CI.
- simopt.experiment_base.difference_of_curves(curve1, curve2)¶
Compute the difference of two curves (Curve 1 - Curve 2).
- Parameters
curve1 (
experiment_base.Curve
) – Curves to take the difference of.curve2 (
experiment_base.Curve
) – Curves to take the difference of.
- Returns
difference_curve – Difference of curves.
- Return type
experiment_base.Curve
- simopt.experiment_base.find_missing_experiments(experiments)¶
Identify problem-solver pairs that are not part of a list of experiments.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on different problems.- Returns
unique_solvers (list [
base.Solver
]) – List of solvers present in the list of experimentsunique_problems (list [
base.Problem
]) – List of problems present in the list of experiments.missing (list [tuple [
base.Solver
,base.Problem
]]) – List of names of missing problem-solver pairs.
- simopt.experiment_base.find_unique_solvers_problems(experiments)¶
Identify the unique problems and solvers in a collection of experiments.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – ProblemSolver pairs of different solvers on different problems.- Returns
unique_solvers (list [
base.Solver
]) – Unique solvers.unique_problems (list [
base.Problem
]) – Unique problems.
- simopt.experiment_base.functional_of_curves(bootstrap_curves, plot_type, beta=0.5, solve_tol=0.1)¶
Compute a functional of the bootstrapped objective/progress curves.
- Parameters
bootstrap_curves (list [list [list [
experiment_base.Curve
]]]) – Bootstrapped estimated objective curves or estimated progress curves of all solutions from all macroreplications.plot_type (str) –
- String indicating which type of plot to produce:
”mean” : estimated mean progress curve;
”quantile” : estimated beta quantile progress curve;
”area_mean” : mean of area under progress curve;
”area_std_dev” : standard deviation of area under progress curve;
”solve_time_quantile” : beta quantile of solve time;
”solve_time_cdf” : cdf of solve time;
”cdf_solvability” : cdf solvability profile;
”quantile_solvability” : quantile solvability profile;
”diff_cdf_solvability” : difference of cdf solvability profiles;
”diff_quantile_solvability” : difference of quantile solvability profiles;
beta (float, default=0.5) – Quantile to plot, e.g., beta quantile; in (0, 1).
solve_tol (float, default=0.1) – Relative optimality gap definining when a problem is solved; in (0, 1].
- Returns
functional – Functional of bootstrapped curves, e.g, mean progress curves, mean area under progress curve, quantile of crossing time, etc.
- Return type
- simopt.experiment_base.make_full_metaexperiment(existing_experiments, unique_solvers, unique_problems, missing_experiments)¶
Create experiment objects for missing problem-solver pairs and run them.
- Parameters
existing_experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on different problems.unique_solvers (list [
base.Solver objects
]) – List of solvers present in the list of experiments.unique_problems (list [
base.Problem
]) – List of problems present in the list of experiments.missing_experiments (list [tuple [
base.Solver
,base.Problem
]]) – List of missing problem-solver pairs.
- Returns
metaexperiment – New ProblemsSolvers object.
- Return type
experiment_base.ProblemsSolvers
- simopt.experiment_base.max_difference_of_curves(curve1, curve2)¶
Compute the maximum difference of two curves (Curve 1 - Curve 2).
- Parameters
curve1 (
experiment_base.Curve
) – Curves to take the difference of.curve2 (
experiment_base.Curve
) – Curves to take the difference of.
- Returns
max_diff – Maximum difference of curves.
- Return type
- simopt.experiment_base.mean_of_curves(curves)¶
Compute pointwise (w.r.t. x-values) mean of curves. Starting and ending x-values must coincide for all curves.
- Parameters
curves (list [
experiment_base.Curve
]) – Collection of curves to aggregate.- Returns
mean_curve – Mean curve.
- Return type
experiment_base.Curve object
- simopt.experiment_base.plot_area_scatterplots(experiments, all_in_one=True, n_bootstraps=100, conf_level=0.95, plot_CIs=True, print_max_hw=True)¶
Plot a scatter plot of mean and standard deviation of area under progress curves. Either one plot for each solver or one plot for all solvers.
Notes
TO DO: Add the capability to compute and print the max halfwidth of the bootstrapped CI intervals.
- Parameters
experiments (list [list [
experiment_base.ProblemSolver
]]) – Problem-solver pairs used to produce plots.all_in_one (bool, default=True) – True if curves are to be plotted together, otherwise False.
n_bootstraps (int, default=100) – Number of bootstrap samples.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
plot_CIs (bool, default=True) – True if bootstrapping confidence intervals are to be plotted, otherwise False.
print_max_hw (bool, default=True) – True if caption with max half-width is to be printed, otherwise False.
- Returns
file_list – List compiling path names for plots produced.
- Return type
- simopt.experiment_base.plot_bootstrap_CIs(bs_CI_lower_bounds, bs_CI_upper_bounds, color_str='C0')¶
Plot bootstrap confidence intervals.
- Parameters
bs_CI_lower_bounds (
experiment_base.Curve
) – Lower and upper bounds of bootstrap CIs, as curves.bs_CI_upper_bounds (
experiment_base.Curve
) – Lower and upper bounds of bootstrap CIs, as curves.color_str (str, default="C0") – String indicating line color, e.g., “C0”, “C1”, etc.
- simopt.experiment_base.plot_progress_curves(experiments, plot_type, beta=0.5, normalize=True, all_in_one=True, n_bootstraps=100, conf_level=0.95, plot_CIs=True, print_max_hw=True)¶
Plot individual or aggregate progress curves for one or more solvers on a single problem.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on a common problem.plot_type (str) –
- String indicating which type of plot to produce:
”all” : all estimated progress curves;
”mean” : estimated mean progress curve;
”quantile” : estimated beta quantile progress curve.
beta (float, default=0.50) – Quantile to plot, e.g., beta quantile; in (0, 1).
normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
all_in_one (bool, default=True) – True if curves are to be plotted together, otherwise False.
n_bootstraps (int, default=100) – Number of bootstrap samples.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
plot_CIs (bool, default=True) – True if bootstrapping confidence intervals are to be plotted, otherwise False.
print_max_hw (bool, default=True) – True if caption with max half-width is to be printed, otherwise False.
- Returns
file_list – List compiling path names for plots produced.
- Return type
- simopt.experiment_base.plot_solvability_cdfs(experiments, solve_tol=0.1, all_in_one=True, n_bootstraps=100, conf_level=0.95, plot_CIs=True, print_max_hw=True)¶
Plot the solvability cdf for one or more solvers on a single problem.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on a common problem.solve_tol (float, default=0.1) – Relative optimality gap definining when a problem is solved; in (0, 1].
all_in_one (bool, default=True) – True if curves are to be plotted together, otherwise False.
n_bootstraps (int, default=100) – Number of bootstrap samples.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
plot_CIs (bool, default=True) – True if bootstrapping confidence intervals are to be plotted, otherwise False.
print_max_hw (bool, default=True) – True if caption with max half-width is to be printed, otherwise False.
- Returns
file_list – List compiling path names for plots produced.
- Return type
- simopt.experiment_base.plot_solvability_profiles(experiments, plot_type, all_in_one=True, n_bootstraps=100, conf_level=0.95, plot_CIs=True, print_max_hw=True, solve_tol=0.1, beta=0.5, ref_solver=None)¶
Plot the (difference of) solvability profiles for each solver on a set of problems.
- Parameters
experiments (list [list [
experiment_base.ProblemSolver
]]) – Problem-solver pairs used to produce plots.plot_type (str) –
- String indicating which type of plot to produce:
”cdf_solvability” : cdf-solvability profile;
”quantile_solvability” : quantile-solvability profile;
”diff_cdf_solvability” : difference of cdf-solvability profiles;
”diff_quantile_solvability” : difference of quantile-solvability profiles.
all_in_one (bool, default=True) – True if curves are to be plotted together, otherwise False.
n_bootstraps (int, default=100) – Number of bootstrap samples.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
plot_CIs (bool, default=True) – True if bootstrapping confidence intervals are to be plotted, otherwise False.
print_max_hw (bool, default=True) – True if caption with max half-width is to be printed, otherwise False.
solve_tol (float, default=0.1) – Relative optimality gap definining when a problem is solved; in (0, 1].
beta (float, default=0.5) – Quantile to compute, e.g., beta quantile; in (0, 1).
ref_solver (str, optional) – Name of solver used as benchmark for difference profiles.
- Returns
file_list – List compiling path names for plots produced.
- Return type
- simopt.experiment_base.plot_terminal_progress(experiments, plot_type='violin', normalize=True, all_in_one=True)¶
Plot individual or aggregate terminal progress for one or more solvers on a single problem.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – ProblemSolver pairs of different solvers on a common problem.plot_type (str, default="violin") –
String indicating which type of plot to produce:
”box” : comparative box plots;
”violin” : comparative violin plots.
normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
all_in_one (bool, default=True) – True if curves are to be plotted together, otherwise False.
- Returns
file_list – List compiling path names for plots produced.
- Return type
- simopt.experiment_base.plot_terminal_scatterplots(experiments, all_in_one=True)¶
Plot a scatter plot of mean and standard deviation of terminal progress. Either one plot for each solver or one plot for all solvers.
- simopt.experiment_base.post_normalize(experiments, n_postreps_init_opt, crn_across_init_opt=True, proxy_init_val=None, proxy_opt_val=None, proxy_opt_x=None)¶
Construct objective curves and (normalized) progress curves for a collection of experiments on a given problem.
- Parameters
experiments (list [
experiment_base.ProblemSolver
]) – Problem-solver pairs of different solvers on a common problem.n_postreps_init_opt (int) – Number of postreplications to take at initial x0 and optimal x*.
crn_across_init_opt (bool, default=True) – True if CRN used for post-replications at solutions x0 and x*, otherwise False.
proxy_init_val (float, optional) – Known objective function value of initial solution.
proxy_opt_val (float, optional) – Proxy for or bound on optimal objective function value.
proxy_opt_x (tuple, optional) – Proxy for optimal solution.
- simopt.experiment_base.quantile_cross_jump(curves, threshold, beta)¶
Compute a simple curve with a jump at the quantile of the crossing times.
- Parameters
- Returns
jump_curve – Piecewise-constant curve with a jump at the quantile crossing time (if finite).
- Return type
experiment_base.Curve
- simopt.experiment_base.quantile_of_curves(curves, beta)¶
Compute pointwise (w.r.t. x values) quantile of curves. Starting and ending x values must coincide for all curves.
- Parameters
curves (list [
experiment_base.Curve
]) – Collection of curves to aggregate.beta (float) – Quantile level.
- Returns
quantile_curve – Quantile curve.
- Return type
experiment_base.Curve
- simopt.experiment_base.read_experiment_results(file_name_path)¶
Read in
experiment_base.ProblemSolver
object from .pickle file.- Parameters
file_name_path (str) – Path of .pickle file for reading
experiment_base.ProblemSolver
object.- Returns
experiment – Problem-solver pair that has been run or has been post-processed.
- Return type
experiment_base.ProblemSolver
- simopt.experiment_base.read_group_experiment_results(file_name_path)¶
Read in
experiment_base.ProblemsSolvers
object from .pickle file.- Parameters
file_name_path (str) – Path of .pickle file for reading
experiment_base.ProblemsSolvers
object.- Returns
groupexperiment – Problem-solver group that has been run or has been post-processed.
- Return type
experiment_base.ProblemsSolvers
- simopt.experiment_base.report_max_halfwidth(curve_pairs, normalize, conf_level, difference=False)¶
Compute and print caption for max halfwidth of one or more bootstrap CI curves.
- Parameters
curve_pairs (list [list [
experiment_base.Curve
]]) – List of paired bootstrap CI curves.normalize (bool) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
conf_level (float) – Confidence level for confidence intervals, i.e., 1-gamma; in (0, 1).
difference (bool) – True if the plot is for difference profiles, otherwise False.
- simopt.experiment_base.save_plot(solver_name, problem_name, plot_type, normalize, extra=None)¶
Create new figure. Add labels to plot and reformat axes.
- Parameters
solver_name (str) – Name of solver.
problem_name (str) – Name of problem.
plot_type (str) –
- String indicating which type of plot to produce:
”all” : all estimated progress curves;
”mean” : estimated mean progress curve;
”quantile” : estimated beta quantile progress curve;
”solve_time_cdf” : cdf of solve time;
”cdf_solvability” : cdf solvability profile;
”quantile_solvability” : quantile solvability profile;
”diff_cdf_solvability” : difference of cdf solvability profiles;
”diff_quantile_solvability” : difference of quantile solvability profiles;
”area” : area scatterplot;
”terminal_scatter” : scatterplot of mean and std dev of terminal progress.
normalize (bool) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
extra (float or list [float], optional) – Extra number(s) specifying quantile (e.g., beta) and/or solve tolerance.
- Returns
path_name – Path name pointing to location where plot will be saved.
- Return type
- simopt.experiment_base.setup_plot(plot_type, solver_name='SOLVER SET', problem_name='PROBLEM SET', normalize=True, budget=None, beta=None, solve_tol=None)¶
Create new figure. Add labels to plot and reformat axes.
- Parameters
plot_type (str) –
- String indicating which type of plot to produce:
”all” : all estimated progress curves;
”mean” : estimated mean progress curve;
”quantile” : estimated beta quantile progress curve;
”solve_time_cdf” : cdf of solve time;
”cdf_solvability” : cdf solvability profile;
”quantile_solvability” : quantile solvability profile;
”diff_cdf_solvability” : difference of cdf solvability profiles;
”diff_quantile_solvability” : difference of quantile solvability profiles;
”area” : area scatterplot;
”box” : box plot of terminal progress;
”violin” : violin plot of terminal progress;
”terminal_scatter” : scatterplot of mean and std dev of terminal progress.
solver_name (str, default="SOLVER_SET") – Name of solver.
problem_name (str, default="PROBLEM_SET") – Name of problem.
normalize (bool, default=True) – True if progress curves are to be normalized w.r.t. optimality gaps, otherwise False.
budget (int, optional) – Budget of problem, measured in function evaluations.
beta (float, optional) – Quantile to compute, e.g., beta quantile; in (0, 1).
solve_tol (float, optional) – Relative optimality gap definining when a problem is solved; in (0, 1].
- simopt.experiment_base.trim_solver_results(problem, recommended_solns, intermediate_budgets)¶
Trim solutions recommended by solver after problem’s max budget.