Skip to main content

Crate cobre_solver

Crate cobre_solver 

Source
Expand description

§cobre-solver

LP/MIP solver abstraction for the Cobre power systems ecosystem.

This crate defines a backend-agnostic interface for mathematical programming solvers, with a default HiGHS backend:

  • Solver trait: unified API for LP and MIP problem construction, solving, and dual/basis extraction.
  • HiGHS backend: production-grade open-source solver, well-suited for iterative LP solving in power system optimization.
  • Basis management: warm-starting support for iterative algorithms that solve sequences of related LPs.

Additional solver backends (e.g., Clp, CPLEX, Gurobi) can be added behind feature flags.

§Status

This crate is in early development. The API will change.

See the repository for the current status.

Re-exports§

pub use trait_def::SolverInterface;
pub use types::Basis;
pub use types::LpSolution;
pub use types::RowBatch;
pub use types::SolutionView;
pub use types::SolverError;
pub use types::SolverStatistics;
pub use types::StageTemplate;
pub use profile::DEFAULT_PROFILE_HEURISTIC_SENTINEL;
pub use profile::DEFAULT_PROFILE_IPM_UNBOUNDED_SENTINEL;
pub use profile::SolveProfile;
pub use profiled::ProfiledSolver;
pub use baking::bake_rows_into_template;
pub use highs::HighsSolver;
pub use highs::highs_version;

Modules§

baking
CSR-to-CSC template baking for reusable LP stage templates.
ffi
Raw FFI bindings to the HiGHS C wrapper layer.
highs
HiGHS LP solver backend implementing SolverInterface.
profile
LP-solver configuration profiles.
profiled
Generic ProfiledSolver<S> wrapper with per-phase LP-solver configuration.
trait_def
The SolverInterface trait definition.
types
Core types for the solver abstraction layer.