Skip to content

Commit

Permalink
Merge pull request #87 from DLWoodruff/aphbug
Browse files Browse the repository at this point in the history
fix lack of W bug in APH
  • Loading branch information
jeanpaulwatson authored Mar 18, 2021
2 parents 86d35cf + eec5db5 commit 556ca20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpisppy/opt/aph.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def APH_main(self, spcomm=None, finalize=True):
(xvar - scenario._mpisppy_model.z_foropt[(ndn,i)]) * \
(xvar - scenario._mpisppy_model.z_foropt[(ndn,i)])
# W term
scenario._mpisppy_model.w_on[ndn,i] * scenario._mpisppy_model.W_foropt[ndn,i] * xvar
objfct.expr += scenario._mpisppy_model.w_on[ndn,i] * scenario._mpisppy_model.W_foropt[ndn,i] * xvar
else:
for (ndn,i), xvar in scenario._mpisppy_data.nonant_indices.items():
# proximal term
Expand All @@ -858,7 +858,7 @@ def APH_main(self, spcomm=None, finalize=True):
(xvar - scenario._mpisppy_model.z[(ndn,i)]) * \
(xvar - scenario._mpisppy_model.z[(ndn,i)])
# W term
scenario._mpisppy_model.w_on[ndn,i] * scenario._mpisppy_model.W[ndn,i] * xvar
objfct.expr += scenario._mpisppy_model.w_on[ndn,i] * scenario._mpisppy_model.W[ndn,i] * xvar

# End APH-specific Prep

Expand Down

0 comments on commit 556ca20

Please sign in to comment.