Skip to content

Commit

Permalink
fixing and breaking, mixed bag
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Skolfield committed Jul 6, 2024
1 parent b3c96ec commit 3592e83
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 143 deletions.
18 changes: 10 additions & 8 deletions gtep/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@
data_object = ExpansionPlanningData()
data_object.load_prescient(data_path)
mod_object = ExpansionPlanningModel(
stages=2,
stages=4,
data=data_object.md,
num_reps=2,
len_reps=1,
num_commit=24,
num_dispatch=12,
num_commit=12,
num_dispatch=4,
)
mod_object.create_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)


sol_object = ExpansionPlanningSolution()
sol_object.load_from_model(mod_object)
sol_object.dump_json()
sol_object.import_data_object(data_object)

# sol_object.read_json("./gtep_lots_of_buses_solution.json") # "./gtep/data/WECC_USAEE"
sol_object.read_json("./gtep_11bus_solution.json") # "./gtep/data/WECC_Reduced_USAEE"
# sol_object.read_json("./gtep_solution.json")
# sol_object.read_json("./gtep_11bus_solution.json") # "./gtep/data/WECC_Reduced_USAEE"
sol_object.read_json("./gtep_solution.json")
# sol_object.read_json("./updated_gtep_solution_test.json")
# sol_object.read_json("./gtep_wiggles.json")
sol_object.plot_levels(save_dir="./plots/")
Expand Down
Loading

0 comments on commit 3592e83

Please sign in to comment.