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
BranchRule
trait used to define custom branching rules. - builder
- Contains methods for creating scip objects in an ergonomic way.
- col
- Contains the
Col
struct, which represents a column in an LP relaxation. - conshdlr
- Contains the
Conshdlr
trait used to define custom constraint handlers. - constraint
- Contains the
Constraint
struct, which represents a constraint in an optimization problem. - eventhdlr
- Contains the
EventHdlr
trait used to define custom event handlers. - heuristic
- Contains the
Heur
trait used to define custom primal heuristics. - model
- The main module, it contains the
Model
struct, which represents an optimization problem. - node
- Contains the
Node
struct, 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
Pricer
trait used to define custom variable pricing strategies. - retcode
- Contains the
Retcode
enum, which represents the return codes of SCIP functions. - row
- Contains the
Row
struct, which represents a row in an LP relaxation. - separator
- Contains the
Separator
trait used to define custom separation routines. - solution
- Contains the
Solution
struct, which represents a solution to an optimization problem. - status
- Contains the
Status
enum, which represents the status of an optimization problem. - variable
- Contains the
Variable
struct, which represents a variable in an optimization problem.
Macros§
- scip_
call - A macro for calling a
SCIP
function and returning an error if the return code is notSCIP_OKAY
. - scip_
call_ expect - A macro for calling a
SCIP
function and panicking with a custom message if the return code is notSCIP_OKAY
. - scip_
call_ panic - A macro for calling a
SCIP
function and panicking if the return code is notSCIP_OKAY
.