diff --git a/.gitignore b/.gitignore index df971ad..b6fa2c1 100644 --- a/.gitignore +++ b/.gitignore @@ -172,4 +172,4 @@ cython_debug/ # ignore "data" *.csv -*.xlsx \ No newline at end of file +*.xlsx diff --git a/gtep/driver.py b/gtep/driver.py index 15f7411..cab941d 100644 --- a/gtep/driver.py +++ b/gtep/driver.py @@ -6,12 +6,12 @@ from pyomo.contrib.appsi.solvers.gurobi import Gurobi -data_path = "./gtep/data/5bus" +data_path = "./data/5bus" data_object = ExpansionPlanningData() data_object.load_prescient(data_path) mod_object = ExpansionPlanningModel( - stages=6, + stages=2, data=data_object.md, num_reps=2, len_reps=1, @@ -19,13 +19,13 @@ 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() # # 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) diff --git a/gtep/gtep_model.py b/gtep/gtep_model.py index faadb86..bd41ccc 100644 --- a/gtep/gtep_model.py +++ b/gtep/gtep_model.py @@ -4,7 +4,7 @@ # date: 01/04/2024 # Model available at http://www.optimization-online.org/DB_FILE/2017/08/6162.pdf -from pyomo.environ import * +from pyomo.environ import * from pyomo.environ import units as u # from pyomo.gdp import * @@ -16,7 +16,6 @@ import json import numpy as np -import numpy as np from math import ceil