From 2bea9e85fbe90e3d291680a617f99c017db1be23 Mon Sep 17 00:00:00 2001 From: Kyle Skolfield Date: Tue, 22 Oct 2024 11:08:08 -0600 Subject: [PATCH 1/2] updating config options --- gtep/config_options.py | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/gtep/config_options.py b/gtep/config_options.py index 77feceb..a0ade2a 100644 --- a/gtep/config_options.py +++ b/gtep/config_options.py @@ -7,7 +7,7 @@ NonNegativeFloat, NonNegativeInt, PositiveInt, - Bool + Bool, ) from pyomo.common.deprecation import deprecation_warning @@ -41,10 +41,36 @@ def _add_common_configs(CONFIG): def _add_investment_configs(CONFIG): - CONFIG.declare("thermal_generation", ConfigValue(default=False, domain=Bool, description="Include thermal generation investment options")) - CONFIG.declare("renewable_generation", ConfigValue(default=False, domain=Bool, description="Include renewable generation investment options")) - CONFIG.declare("storage", ConfigValue(default=False, domain=Bool, description="Include storage investment options")) - CONFIG.declare("transmission", ConfigValue(default=False, domain=Bool, description="Include transmission investment options")) + CONFIG.declare( + "thermal_generation", + ConfigValue( + default=False, + domain=Bool, + description="Include thermal generation investment options", + ), + ) + CONFIG.declare( + "renewable_generation", + ConfigValue( + default=False, + domain=Bool, + description="Include renewable generation investment options", + ), + ) + CONFIG.declare( + "storage", + ConfigValue( + default=False, domain=Bool, description="Include storage investment options" + ), + ) + CONFIG.declare( + "transmission", + ConfigValue( + default=False, + domain=Bool, + description="Include transmission investment options", + ), + ) pass From 3b4987d16420a722232d616c6cf21d43bd7725a3 Mon Sep 17 00:00:00 2001 From: Kyle Skolfield Date: Wed, 23 Oct 2024 14:06:30 -0600 Subject: [PATCH 2/2] setting smaller defaults for driver.py --- gtep/driver.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gtep/driver.py b/gtep/driver.py index c50e7e9..dcd9867 100644 --- a/gtep/driver.py +++ b/gtep/driver.py @@ -6,8 +6,7 @@ from pyomo.contrib.appsi.solvers.gurobi import Gurobi - -data_path = "./data/5bus" +data_path = "./gtep/data/5bus" data_object = ExpansionPlanningData() data_object.load_prescient(data_path) @@ -16,17 +15,17 @@ data=data_object.md, num_reps=2, len_reps=1, - num_commit=24, + num_commit=6, num_dispatch=4, ) mod_object.create_model() -TransformationFactory("gdp.bound_pretransformation").apply_to(mod_object.model) -TransformationFactory("gdp.bigm").apply_to(mod_object.model) +TransformationFactory("gdp.bound_pretransformation").apply_to(mod_object.model) +TransformationFactory("gdp.bigm").apply_to(mod_object.model) # opt = SolverFactory("gurobi") -opt = Gurobi() -# opt = Highs() +# opt = Gurobi() +opt = Highs() # # mod_object.results = opt.solve(mod_object.model, tee=True) -mod_object.results = opt.solve(mod_object.model) +mod_object.results = opt.solve(mod_object.model) sol_object = ExpansionPlanningSolution() sol_object.load_from_model(mod_object)