Skip to content

Commit

Permalink
initial prescient validation commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Skolfield committed Oct 17, 2024
1 parent 32bb5ed commit da353fe
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gtep/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
from pyomo.core import TransformationFactory
from pyomo.contrib.appsi.solvers.highs import Highs
from pyomo.contrib.appsi.solvers.gurobi import Gurobi
import gurobipy as gp



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

Expand All @@ -23,8 +22,8 @@
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)

Expand Down
20 changes: 20 additions & 0 deletions gtep/tests/unit/test_validation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pyomo.common.unittest as unittest
from gtep.gtep_model import ExpansionPlanningModel
from gtep.gtep_data import ExpansionPlanningData
from gtep.gtep_solution import ExpansionPlanningSolution
import logging

input_data_source = "./gtep/data/5bus"

class TestValidation(unittest.TestCase):
def test_populate_generators(self):
pass

def test_populate_transmission(self):
pass

def test_filter_pointers(self):
pass

def test_clone_timeseries(self):
pass
19 changes: 19 additions & 0 deletions gtep/validation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from pyomo.environ import *
from gtep.gtep_model import ExpansionPlanningModel
import logging

import pandas as pd

logger = logging.getLogger(__name__)

def populate_generators(data_input_path, sol_object, data_output_path):
pass

def populate_transmission(data_input_path, sol_object, data_output_path):
pass

def filter_pointers(data_input_path, sol_object, data_output_path):
pass

def clone_timeseries(data_input_path, sol_object, data_output_path):
pass

0 comments on commit da353fe

Please sign in to comment.