Repository navigation
Infeasibility diagnosis (IIS) support - #3
Conversation
Add Clp and optional SoPlex row rays and MOSEK bound-side certificates. Correct MOSEK solve and resource handling, forward time limits, and provide actionable loading and license errors with credential redaction.
Add Clp and optional SoPlex row rays and MOSEK bound-side certificates. Correct MOSEK solve and resource handling, forward time limits, and provide actionable loading and license errors with credential redaction.
Provide standalone deletion and elasticity algorithms with a linear-model adapter, verified certificate seeds, retained models, candidate ordering, shared budgets, and on-demand reports. Add solver-free and backend integration regressions. Validation: 279 IIS tests and 286 core/CBC tests passed in WSL; public-header and standalone C++20 checks passed.
Provide standalone deletion and elasticity algorithms with a linear-model adapter, verified certificate seeds, retained models, candidate ordering, shared budgets, and on-demand reports. Add solver-free and backend integration regressions. Validation: 279 IIS tests and 286 core/CBC tests passed in WSL; public-header and standalone C++20 checks passed.
Compare fallback strategies with independent conflict verification, work counters, strict argument validation, and overwrite-safe private CSV output. Verified 162 strategy cases in local smoke runs.
Compare fallback strategies with independent conflict verification, work counters, strict argument validation, and overwrite-safe private CSV output. Verified 162 strategy cases in local smoke runs.
Introduce conflict extraction with a complete example, explain proof states and configuration, and distinguish generic fallback features from native capabilities, including stock and patched SoPlex.
Introduce conflict extraction with a complete example, explain proof states and configuration, and distinguish generic fallback features from native capabilities, including stock and patched SoPlex.
…into astra/iis-support
# Conflicts: # .gitignore # include/mippp/detail/solver_library.hpp # include/mippp/solvers/clp/impl/v1/clp_lp.hpp # include/mippp/solvers/cplex/impl/v1/cplex_api.hpp # include/mippp/solvers/gurobi/impl/v1/gurobi_api.hpp # include/mippp/solvers/mosek/impl/v1/mosek_base.hpp # include/mippp/solvers/mosek/impl/v1/mosek_handle_guard.hpp # include/mippp/solvers/mosek/impl/v1/mosek_milp.hpp # include/mippp/solvers/soplex/impl/v1/soplex_api.hpp # include/mippp/solvers/soplex/impl/v1/soplex_lp.hpp
|
Hello @mheyman and thank you for your PR ! I will need some time to merge it since, like you guessed, the API does not exactly match MIP++ one. Thanks for your contribution ! |
|
I'm limited to working on this Friday nights after work (work paid-for tokens plus Saturday morning OpenAI refresh). I'll try to get to it if you don't beat me to it... |
Fall back to cooperative deadlines when SoPlex lacks its optional setter and report runtime capability in IIS diagnostics. Preserve explicit setter failures and tighter native caps. Share MOSEK primal-solution classification and cover stopped-solve evidence and factory verbosity. Update IIS documentation and remove its README roadmap row. Validation: 105 core and HiGHS tests passed; 93 public headers compiled; standard-include audit passed. Native MOSEK and SoPlex runtime validation remains outstanding.
|
Astra implemented the items in the TODO with a minor amount of scanning of the diffs by me (I didn't see anything to complain about this time). A lot more tests added, now calling through to HiGHS. |
|
Hi @mheyman, thanks again for this PR and for the time you put into it. I reviewed it against the design notes and the branch doesn't follow them yet: it keeps the explicit A lot of your PR carries over:
I'm converting the PR to a draft while I work on it. Please avoid pushing to Thanks! |
Remove the files this pull request added that the design of misc/design/iis replaces, and restore main's version of every file it modified, per the file map of iis_pr_plan.md. The reshaped IIS support is rebuilt on top of main in the following commits. The removed code stays reachable through the tag archive/pr3-a1a9f11, from which later work packages port the engine, the MOSEK fixes, the tests and the vectors.
Add the solver-agnostic engine of the deletion filter (iis_todo.md 2.1,
WP4) and the std-only IIS limits, outcomes and reasons it reports with
(2.2, the types part of WP5).
utility/iis_outcome.hpp holds iis_limits {max_solves, time_limit,
stop_token}, defaulted to no limit (Q5 c), and the enum classes
iis_outcome and iis_reason, inconclusive_trial included (N2 b, N19 e).
An absent reason is an empty std::optional (N27 a).
utility/deletion_filter.hpp holds deletion_filter, deletion_verdict,
deletion_oracle and deletion_filter_result (N19 a), which lists the
members in ascending order with the outcome and the reason, and no call
count (N19 f). The time limit becomes one deadline: NaN and negative
durations throw std::invalid_argument, and infinite or huge ones
saturate to no deadline. Before a trial, a stop request beats the
deadline, which beats the solve count. After an inconclusive trial the
reason is inconclusive_trial, or time_limit when the deadline has passed,
and a proof on the last permitted trial is complete. The detail entry
adds the continuation from a known proof, a Clock parameter, and the
dormant batching behind a batch size defaulting to 1 (N3 b), outside
iis_limits and the public entry.
The engine and its tests are ported from a1a9f11 (PR fhamonic#3), without the
statistics, the candidate ordering and phase_budget. test/deletion_filter.cpp
runs in mippp_test on a fake clock. The PR's test/iis.cpp:1009-1022 is
inverted per N2 (b), and the exhaustive monotone test covers the single
pass and the batch sizes through the detail entry.
Co-authored-by: Michael Heyman <mheyman@gmail.com>
Add the types of iis_todo.md 2.3 (WP5): the shape of an IIS answer on either path, before any model computes one. model_concepts.hpp gets the iis_status tags next to basis_status: absent, member, and member_lower, member_upper and member_both deriving from member, with no possible-member tag (N1 a). lp_iis_status accepts a variant containing absent and member. lp_iis<I, T> checks both get_status overloads against it, the outcome, the reason and the member counts, and model_iis_t<T> deduces what compute_iis() returns. The single-parameter has_iis<T> means that the model has a native IIS routine (Q1 b). There is no archetype (N10 a), and no model satisfies has_iis yet. detail/handle_status_table.hpp keeps one byte per handle id, sized by the id bound, where ids past it read as alternative 0. It takes any variant of tags, so that basis support can reuse it (N16 b). Its set() rejects a tag the variant does not list, which would otherwise convert to the base alternative and lose its refinement at run time. utility/iis_snapshot.hpp holds the public iis_snapshot<Variable, Constraint, VariableStatus, ConstraintStatus> over two such tables, returned by value (Q2 a). It requires iis_status::absent as alternative 0 and counts the members once. Its comment says that it describes the model as it was, so a later handle may reuse a removed id (N8 a); the IIS suites pin that on a real remove and re-add. test/iis_snapshot.cpp runs in mippp_test, with a static_assert that the snapshot satisfies lp_iis and one negative check per lp_iis requirement. The concepts.md rows come with WP15 and WP17, where the plan places them.
Add the independent oracle of iis_todo.md 2.4 (WP5), which both IIS suites will use to validate any answer without trusting the backend under test. test/test_suites/iis_oracle.hpp holds the exact Fourier-Motzkin feasibility check of the pull request, keyed by case-local sides: a case describes its model as a linear_system, and read_answer keys a snapshot by the position of each handle in the case's own lists. is_iis applies the rules: member_lower and member_upper select one side, member_both selects both and drops each in turn, and a bare member keeps or drops its variable or row whole. The check refuses more than 6 variables, and throws on infinite data and on any product or sum that rounds, so the "small dyadic data" condition is checked instead of assumed. It also throws on a term naming a variable the case does not have: the pull request's row.at(column) let column n through into the right-hand side slot, which then decided a different system. test/test_suites/iis_vectors.hpp holds the four HiGHS 1.12.0 TestIis.cpp vectors with their attribution, checked against the v1.12.0 sources, and test/data/iis/HIGHS-LICENSE.txt is restored. A provenance comment replaces the README, whose claim that integer witnesses prove minimality was never checked by the tests. test/iis_oracle.cpp runs in mippp_test. Its exhaustive subset test now requires the minimal conflicts to have exactly the listed sizes, and the other tests pin each rule and each rejection, the sum and product guards separately. Ported from a1a9f11 (PR fhamonic#3) by Michael Heyman. Co-authored-by: Michael Heyman <mheyman@gmail.com>
The final loader error told every platform to add the library's directory to LD_LIBRARY_PATH, which Windows and macOS never read. It now names PATH on Windows, DYLD_LIBRARY_PATH on macOS and LD_LIBRARY_PATH elsewhere, taken from the constant the directory search itself reads. Every loader failure (explicit path, MIPPP_<KEY>_LIBRARY, directory search) also states the precedence and quotes the current MIPPP_<KEY>_LIBRARY value with escaping, so an empty value or a stray space shows. The search variable's value is never printed. diagnostic_value and its tests are ported, trimmed, from the IIS pull request (#3), without its version-warning and license help (N18 a). Co-authored-by: Michael Heyman <mheyman@gmail.com>
I know it is only yellow on the roadmap but I had extra astra tokens and a need. I've got this working on Windows (MSVC) and WSL (gcc) and it should work on Mac as well as it does nothing fancy OS-wise. I iterated a bit to get the API and error messages to my liking - I've been C++ coding for many years but I've never done MIP library work.
Summary
Adds portable IIS (irreducible infeasible subsystem) extraction for diagnosing conflicting linear constraints and variable bounds across all MIP++ backends, without requiring native IIS support.
Includes a user guide and backend feature matrix, an optional SoPlex C-interface patch, and a local HiGHS/Clp benchmark that verifies correctness independently of timing.
Validation
Performance options are opt-in; benefits depend on the model and solver. Native IIS dispatch and explicit basis transfer are not included.