Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
jialuw96 committed May 5, 2024
1 parent e253de7 commit 5f852d5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pyomo/contrib/doe/examples/reactor_kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def create_model(
t_range=[0.0, 1],
CA_init=1,
C_init=0.1,
design_var_as_param = True
design_var_as_param=True,
):
"""
This is an example user model provided to DoE library.
Expand Down Expand Up @@ -110,9 +110,7 @@ def create_model(
mod.t0 = pyo.Set(initialize=[0])
mod.t_con = pyo.Set(initialize=control_time)
if design_var_as_param:
mod.CA0 = pyo.Param(
mod.t0, initialize=CA_init, mutable=True
) # mol/L
mod.CA0 = pyo.Param(mod.t0, initialize=CA_init, mutable=True) # mol/L
else:
mod.CA0 = pyo.Var(
mod.t0, initialize=CA_init, bounds=(1.0, 5.0), within=pyo.NonNegativeReals
Expand All @@ -125,12 +123,8 @@ def create_model(

if model_option == ModelOptionLib.stage1:
if design_var_as_param:
mod.T = pyo.Var(
mod.t_con,
initialize=controls,
mutable=True
)

mod.T = pyo.Var(mod.t_con, initialize=controls, mutable=True)

else:
mod.T = pyo.Var(
mod.t_con,
Expand Down

0 comments on commit 5f852d5

Please sign in to comment.