Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6127f96
refactor xpress direct/persistent to work on the matrix directly
Mar 20, 2026
f21a33e
add keep_range_constraints to LinearStandardFormCompiler
Mar 20, 2026
a1c88bb
add option-driven path to use LinearStandardFormCompiler
Mar 20, 2026
55aebe4
NFC: formatting
Mar 21, 2026
1a97d63
Merge remote-tracking branch 'upstream/main' into xpress-constraint-a…
May 11, 2026
bb1b0cd
range is positional in modern versions of the Xpress API
May 11, 2026
13f6a7b
automatically apply LinearStandardFormCompiler
May 11, 2026
e00fc7c
allow LinearStandardFormCompiler to return unhandled nonlinear constr…
May 11, 2026
3450f89
pass through non-linear constraints and objectives
May 11, 2026
e048eaf
cleanup range constraints
May 11, 2026
dd6b725
fixup xpress interface for range constraint
May 11, 2026
2341efc
update standard form test for better range constraint handling
May 11, 2026
f9b9db7
NFC: black on standard_form.py
May 11, 2026
e52bee1
allow SOS constraints (and other ctypes) to pass for standard form
May 11, 2026
82bd6d4
support template constraints; fix SOS constraints
May 11, 2026
961315c
NFC: black
May 11, 2026
90e95e9
fix bug pyomo.kernel variabls in TemplateVarRecorder
May 11, 2026
417dedc
bugfix: use conname for LSFC
May 11, 2026
0bd3bbf
handle kernel range constraints in LSFC
May 11, 2026
3566852
don't skip trivial constraints if skip_trivial_constraints is False
May 11, 2026
0e5a4ca
bugfix: standard form normalizes constraints with +/-inf bounds
May 11, 2026
5fcee5c
update addRows, pass by kwarg
May 11, 2026
2de8392
fix brittle IIS test
May 11, 2026
834f339
update LSFI to be self-consistent
May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions pyomo/contrib/iis/tests/test_iis.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,27 @@ def _test_iis(solver_name):


def _validate_ilp(file_name):
lines_found = {"c2: 100 x + y <= 0": False, "c3: x >= 0.5": False}
# Xpress may write constraint terms in different orders across versions
# (e.g., "100 x + y <= 0" vs "y + 100 x <= 0"), so check both forms for c2.
c2_forms = {"c2: 100 x + y <= 0", "c2: y + 100 x <= 0"}
c2_found = False
c3_found = False
with open(file_name, "r") as f:
for line in f.readlines():
for k, v in lines_found.items():
if (not v) and k in line:
lines_found[k] = True

if not all(lines_found.values()):
if any(form in line for form in c2_forms):
c2_found = True
if "c3: x >= 0.5" in line:
c3_found = True

missing = []
if not c2_found:
missing.append("c2: 100 x + y <= 0")
if not c3_found:
missing.append("c3: x >= 0.5")
if missing:
raise Exception(
f"The file {file_name} is not as expected. Missing constraints:\n"
+ "\n".join(k for k, v in lines_found.items() if not v)
+ "\n".join(missing)
)


Expand Down
Loading
Loading