From 402784bb186ddcb41875ae875bc735d49ccf6159 Mon Sep 17 00:00:00 2001 From: Bernard Knueven Date: Fri, 12 Jul 2024 14:30:40 -0600 Subject: [PATCH] fixing bug in _load_slacks --- pyomo/solvers/plugins/solvers/xpress_direct.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyomo/solvers/plugins/solvers/xpress_direct.py b/pyomo/solvers/plugins/solvers/xpress_direct.py index c62f76d85ce..33a3c8d0282 100644 --- a/pyomo/solvers/plugins/solvers/xpress_direct.py +++ b/pyomo/solvers/plugins/solvers/xpress_direct.py @@ -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