Skip to content

Commit

Permalink
rename build_cstrs to build_model
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedongPeng committed Aug 3, 2024
1 parent 35c8c8a commit e212c4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions gdplib/cstr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .gdp_reactor import build_model

__all__ = ['build_model']
4 changes: 2 additions & 2 deletions gdplib/cstr/gdp_reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pyomo.opt.base.solvers import SolverFactory


def build_cstrs(NT: int = 5) -> pyo.ConcreteModel():
def build_model(NT: int = 5) -> pyo.ConcreteModel():
"""
Build the CSTR superstructure model of size NT.
NT is the number of reactors in series.
Expand Down Expand Up @@ -915,7 +915,7 @@ def obj_rule(m):


if __name__ == "__main__":
m = build_cstrs()
m = build_model()
pyo.TransformationFactory("core.logical_to_linear").apply_to(m)
pyo.TransformationFactory("gdp.bigm").apply_to(m)
pyo.SolverFactory("gams").solve(
Expand Down

0 comments on commit e212c4d

Please sign in to comment.