From 0b7adf159cbd4f5fae313b60b063f644968942d1 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Thu, 28 May 2026 10:09:25 -0600 Subject: [PATCH 1/2] Add required argument for cplex's conflict.refine() --- pyomo/contrib/iis/iis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyomo/contrib/iis/iis.py b/pyomo/contrib/iis/iis.py index e4e27fc6c09..f75c54962ec 100644 --- a/pyomo/contrib/iis/iis.py +++ b/pyomo/contrib/iis/iis.py @@ -104,7 +104,8 @@ def write(self, file_name): class CplexConflict(_IISBase): def compute(self): - self._solver._solver_model.conflict.refine() + _conflict = self._solver._solver_model.conflict + _conflict.refine(_conflict.all_constraints()) def write(self, file_name): self._solver._solver_model.conflict.write(file_name) From 5643fb7995def3b66fbd87cf14bce3ef9e5976ae Mon Sep 17 00:00:00 2001 From: John Siirola Date: Thu, 28 May 2026 10:09:46 -0600 Subject: [PATCH 2/2] Remove restriction on modern cplex versions --- .github/workflows/test_branches.yml | 17 ++--------------- .github/workflows/test_pr_and_main.yml | 17 ++--------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 12a93149704..1d6b1da05dc 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -320,14 +320,7 @@ jobs: python -m pip install --cache-dir cache/pip pymysql || \ python -m pip install --cache-dir cache/pip pymysql if test -z "${{matrix.slim}}"; then - # Disallow cplex 22.1.2.1 because it errors fatally when - # computing IIS on python 3.13 and 3.14 - if [[ ${{matrix.python}} =~ 3.1[34] ]]; then - CPLEX='cplex!=22.1.2.1' - else - CPLEX='cplex' - fi - python -m pip install --cache-dir cache/pip "$CPLEX" docplex \ + python -m pip install --cache-dir cache/pip cplex docplex \ || echo "WARNING: CPLEX Community Edition is not available" python -m pip install --cache-dir cache/pip gurobipy \ || echo "WARNING: Gurobi is not available" @@ -410,14 +403,8 @@ jobs: PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') echo "Installing for $PYVER" # - # Disallow cplex 22.1.2 and 22.1.2.1, as they error fatally when - # computing IIS on Python 3.13 and 3.14 # Disallow cplex 12.9 (caused segfaults in tests) - if [[ ${{matrix.python}} =~ 3.1[34] ]]; then - CPLEX='cplex>=12.10,<22.1.2|>22.1.2.1' - else - CPLEX='cplex>=12.10' - fi + CPLEX='cplex>=12.10' # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that # release on that platform. diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 4d05ad61386..c015b579a61 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -373,14 +373,7 @@ jobs: python -m pip install --cache-dir cache/pip pymysql || \ python -m pip install --cache-dir cache/pip pymysql if test -z "${{matrix.slim}}"; then - # Disallow cplex 22.1.2.1 because it errors fatally when - # computing IIS on python 3.13 and 3.14 - if [[ ${{matrix.python}} =~ 3.1[34] ]]; then - CPLEX='cplex!=22.1.2.1' - else - CPLEX='cplex' - fi - python -m pip install --cache-dir cache/pip "$CPLEX" docplex \ + python -m pip install --cache-dir cache/pip cplex docplex \ || echo "WARNING: CPLEX Community Edition is not available" python -m pip install --cache-dir cache/pip gurobipy \ || echo "WARNING: Gurobi is not available" @@ -463,14 +456,8 @@ jobs: PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') echo "Installing for $PYVER" # - # Disallow cplex 22.1.2 and 22.1.2.1, as they error fatally when - # computing IIS on Python 3.13 and 3.14 # Disallow cplex 12.9 (caused segfaults in tests) - if [[ ${{matrix.python}} =~ 3.1[34] ]]; then - CPLEX='cplex>=12.10,<22.1.2|>22.1.2.1' - else - CPLEX='cplex>=12.10' - fi + CPLEX='cplex>=12.10' # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that # release on that platform.