-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Motivation
During investigation of #780, we discovered that good_lp introduces several risks:
- Version drift — CI resolved
good_lp 1.15.0while the lockfile had1.14.2, with no warning. The newer version may have changed solver option behavior, contributing to incorrect MIP results on CI. - Opaque option passing — Setting
presolve: "off"goes throughgood_lp → highs → highs-sys(three layers), making it hard to verify options actually reach HiGHS. - Abstraction leakage — Debugging solver issues requires penetrating good_lp internals, which defeats the purpose of the abstraction.
- Unnecessary generality — The project only uses HiGHS, but good_lp pulls in multi-solver infrastructure.
Proposal
Replace good_lp with a thin ILPBackend trait:
trait ILPBackend {
fn solve(
&self,
num_vars: usize,
constraints: &[LinearConstraint],
objective: &[(usize, f64)],
sense: ObjectiveSense,
options: &SolverOptions,
) -> Option<Vec<f64>>;
}Each backend (HiGHS, Gurobi, CPLEX) directly calls its native crate (highs, grb, cplex-rs), feature-gated:
ilp-highs→highscrate (current default)ilp-gurobi→grbcrate (future)ilp-cplex→cplex-rscrate (future)
Benefits
- Direct control over solver options (presolve, tolerances, heuristics)
- Only one layer of abstraction to debug
- Each backend can expose solver-specific tuning
- Cleaner feature gating without good_lp's transitive dependencies
Scope
- Remove
good_lpdependency - Implement
HiGHSBackendusinghighscrate directly - Migrate
src/solvers/ilp/solver.rsto use the new trait - Leave Gurobi/CPLEX backends as future work
Context
See #780 root cause analysis for details on how good_lp version drift contributed to CI failures.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
No status