Skip to content

Commit

Permalink
fixing bug in _load_slacks
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Jul 12, 2024
1 parent 9fd504a commit f45a87f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyomo/solvers/plugins/solvers/xpress_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,9 @@ 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 f45a87f

Please sign in to comment.