Skip to content

Commit

Permalink
mild tweaks for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Skolfield committed Oct 13, 2024
1 parent 961eb75 commit 870dfc6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ cython_debug/

# ignore "data"
*.csv
*.xlsx
*.xlsx
10 changes: 5 additions & 5 deletions gtep/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
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,
num_commit=24,
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)
Expand Down
3 changes: 1 addition & 2 deletions gtep/gtep_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand All @@ -16,7 +16,6 @@
import json
import numpy as np

import numpy as np

from math import ceil

Expand Down

0 comments on commit 870dfc6

Please sign in to comment.