Skip to content

Commit

Permalink
Merge pull request #3318 from bknueven/xpress_slack_bug
Browse files Browse the repository at this point in the history
Fix bug in XpressDirect._load_slacks
  • Loading branch information
blnicho authored Jul 24, 2024
2 parents 92a9d3b + 81a42eb commit f86ac9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyomo/solvers/plugins/solvers/xpress_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,8 @@ def _load_slacks(self, cons_to_load=None):
if xpress_con in self._range_constraints:
## for xpress, the slack on a range constraint
## is based on the upper bound
## FIXME: This looks like a bug - there is no variable named
## `con` - there is, however, `xpress_con` and `pyomo_con`
lb = con.lb
ub = con.ub
lb = xpress_con.lb
ub = xpress_con.ub
ub_s = val
expr_val = ub - ub_s
lb_s = lb - expr_val
Expand Down

0 comments on commit f86ac9d

Please sign in to comment.