Skip to content

feat: compute infeasible subsystems (IIS) - #54

Open
nrealus wants to merge 2 commits into
rust-or:mainfrom
nrealus:pr-iis
Open

nrealus wants to merge 2 commits into
rust-or:mainfrom
nrealus:pr-iis

Conversation

@nrealus

@nrealus nrealus commented Sep 27, 2026 •

Copy link
Copy Markdown

This is a PR for the 4th (and biggest) feature of the 4 mentioned in #51.

It is dependent on the 3rd of those features #53 (notably the try_solve_in_place method).
It is also dependent on this PR in the highs-sys crate, which adds IIS-related constants used here.

The core feature is the Iis structure and the ability to compute it via Model::solve_or_iis, Model::get_iis or SolvedModel::get_iis

Addresses #47

Model::[try_]solve_in_place solves without consuming the model, so
that it can be modified and solved again with a warm start. Its
results are read with Model::status, objective_value and
get_solution, as on SolvedModel.

To reuse a model, Model::[try_]clear_solver resets the solver state,
Model::[try_]clear_model removes the problem, and
Model::[try_]overwrite replaces it (sharing the problem passing code
of Model::try_new). Model::num_nz and get_column_bounds /
get_column_cost, and Problem::get_column_bounds / get_column_cost,
read the current model.
Add HighsIisBoundStatus, the Iis type, and [try_]get_iis on
SolvedModel and Model (via Highs_getIis), as well as
Model::[try_]solve_or_iis, which solves in place and returns either
the solution or an IIS.

An IIS is only returned when HiGHS could check that it is infeasible:
otherwise try_get_iis returns Err(HighsStatus::Warning). The
per-column and per-row IIS statuses are not requested, as HiGHS
copies them without having set them in that case.

Requires the IIS bound status constants from highs-sys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant