Skip to content

Commit

Permalink
Industrial poly: Soft-constraints only if n_robust=0
Browse files Browse the repository at this point in the history
Compliant with our reference results and also Mumps takes forever to solve the problem with n_robust>=1 and soft-constraints (MA27 succeeds however)
  • Loading branch information
Felix-Mac committed Feb 14, 2022
1 parent 7c0b397 commit 495a052
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/industrial_poly/template_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ def template_mpc(model):

mpc.scaling['_u','m_dot_f'] = 100

# Sot-constraint for the reactor upper bound temperature
mpc.set_nl_cons('T_R_UB', _x['T_R'], ub=363.15+temp_range, soft_constraint=True, penalty_term_cons=1e4)
# Check if robust multi-stage is active
if mpc.n_robust == 0:
# Sot-constraint for the reactor upper bound temperature
mpc.set_nl_cons('T_R_UB', _x['T_R'], ub=363.15+temp_range, soft_constraint=True, penalty_term_cons=1e4)
else:
mpc.bounds['upper','_x','T_R'] = 363.15+temp_range


delH_R_var = np.array([950.0, 950.0 * 1.30, 950.0 * 0.70])
Expand Down

0 comments on commit 495a052

Please sign in to comment.