Expand description
§russcip
Safe Rust interface for SCIP optimization suite.
For usage, please refer to the README.
§Example
use russcip::prelude::*;
let mut model = Model::default().minimize();
let x = model.add(var().bin().obj(1.0));
let y = model.add(var().bin().obj(2.0));
model.add(cons().coef(&x, 1.0).coef(&y, 1.0).eq(1.0));
let solved = model.solve();
assert_eq!(solved.status(), Status::Optimal);
assert_eq!(solved.obj_val(), 1.0);Re-exports§
pub use scip_sys as ffi;pub use branchrule::*;pub use constraint::*;pub use model::*;pub use pricer::*;pub use retcode::*;pub use solution::*;pub use status::*;pub use variable::*;pub use node::*;pub use eventhdlr::*;pub use heuristic::*;pub use separator::*;pub use col::*;pub use conshdlr::*;pub use row::*;
Modules§
- branchrule
- Contains the
BranchRuletrait used to define custom branching rules. - builder
- Contains methods for creating scip objects in an ergonomic way.
- col
- Contains the
Colstruct, which represents a column in an LP relaxation. - conshdlr
- Contains the
Conshdlrtrait used to define custom constraint handlers. - constraint
- Contains the
Constraintstruct, which represents a constraint in an optimization problem. - eventhdlr
- Contains the
EventHdlrtrait used to define custom event handlers. - heuristic
- Contains the
Heurtrait used to define custom primal heuristics. - model
- The main module, it contains the
Modelstruct, which represents an optimization problem. - node
- Contains the
Nodestruct, which represents a node in the branch-and-bound tree. - prelude
- Contains all the traits and structs that are re-exported by default.
- pricer
- Contains the
Pricertrait used to define custom variable pricing strategies. - retcode
- Contains the
Retcodeenum, which represents the return codes of SCIP functions. - row
- Contains the
Rowstruct, which represents a row in an LP relaxation. - separator
- Contains the
Separatortrait used to define custom separation routines. - solution
- Contains the
Solutionstruct, which represents a solution to an optimization problem. - status
- Contains the
Statusenum, which represents the status of an optimization problem. - variable
- Contains the
Variablestruct, which represents a variable in an optimization problem.
Macros§
- scip_
call - A macro for calling a
SCIPfunction and returning an error if the return code is notSCIP_OKAY. - scip_
call_ expect - A macro for calling a
SCIPfunction and panicking with a custom message if the return code is notSCIP_OKAY. - scip_
call_ panic - A macro for calling a
SCIPfunction and panicking if the return code is notSCIP_OKAY.
Structs§
- Diver
- Struct giving access to methods allowed in diving mode