Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ all_default_solvers = [
"scip_bundled",
"lp-solvers",
"clarabel",
"pumpkin-solver",
] # cplex-rs is not included because it is incompatible with lpsolve
minilp = [
"microlp",
Expand All @@ -45,6 +46,7 @@ russcip = { version = "0.6.4", optional = true }
lp-solvers = { version = "1.0.0", features = ["cplex"], optional = true }
cplex-rs = { version = "0.1", optional = true }
clarabel = { version = "0.10.0", optional = true, features = [] }
pumpkin-solver = { version = "0.1.4", optional = true }
fnv = "1.0.5"

[dev-dependencies]
Expand All @@ -66,7 +68,7 @@ all-features = false
# Use almost the same as all_default_solvers. Similarly, cplex-rs is not
# included because it is incompatible with lpsolve. Additionally,
# russcip/bundled is not included because network access is blocked on docs.rs.
features = ["coin_cbc", "microlp", "lpsolve", "highs", "lp-solvers", "clarabel"]
features = ["coin_cbc", "microlp", "lpsolve", "highs", "lp-solvers", "clarabel", "pumpkin-solver"]
default-target = "x86_64-unknown-linux-gnu"
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--cfg", "docsrs"]
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pub use expression::Expression;
feature = "highs",
feature = "scip",
feature = "cplex-rs",
feature = "pumpkin-solver",
)))]
#[cfg(feature = "clarabel")]
pub use solvers::clarabel::clarabel as default_solver;
Expand Down Expand Up @@ -120,6 +121,9 @@ pub use solvers::microlp::microlp;
#[cfg(feature = "microlp")]
/// When the "coin_cbc" cargo feature is absent, microlp is used as the default solver
pub use solvers::microlp::microlp as default_solver;
#[cfg(feature = "pumpkin-solver")]
#[cfg_attr(docsrs, doc(cfg(feature = "pumpkin-solver")))]
pub use solvers::pumpkin_solver::pumpkin;
#[cfg(feature = "scip")]
#[cfg_attr(docsrs, doc(cfg(feature = "highs")))]
pub use solvers::scip::scip;
Expand Down Expand Up @@ -161,6 +165,7 @@ pub const default_solver: LpSolver<
feature = "scip",
feature = "cplex-rs",
feature = "clarabel",
feature = "pumpkin-solver",
)))]
compile_error!(
"No solver available. \
Expand Down
4 changes: 4 additions & 0 deletions src/solvers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub mod lp_solvers;
#[cfg_attr(docsrs, doc(cfg(feature = "clarabel")))]
pub mod clarabel;

#[cfg(feature = "pumpkin-solver")]
#[cfg_attr(docsrs, doc(cfg(feature = "pumpkin-solver")))]
pub mod pumpkin_solver;

/// An entity that is able to solve linear problems
pub trait Solver {
/// The internal model type used by the solver
Expand Down
Loading
Loading