Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rundxdi authored Oct 13, 2024
2 parents 5ddc2a0 + 870dfc6 commit a877ed0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 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
11 changes: 6 additions & 5 deletions gtep/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@
from pyomo.contrib.appsi.solvers.gurobi import Gurobi


data_path = "./gtep/data/5bus_viz_demo"

data_path = "./data/5bus"
data_object = ExpansionPlanningData()
data_object.load_prescient(data_path)

mod_object = ExpansionPlanningModel(
stages=4,
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
4 changes: 3 additions & 1 deletion 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 @@ -15,8 +15,10 @@
from pyomo.repn.linear import LinearRepnVisitor
import json
import numpy as np

import math


from math import ceil
from config_options import _get_model_config

Expand Down

0 comments on commit a877ed0

Please sign in to comment.