Module grb::prelude[][src]

Expand description

Most commonly used items from this crate bundled for convenient import.

Re-exports

pub use crate::callback::Callback;
pub use crate::callback::Where;
pub use crate::expr::AttachModel;
pub use crate::expr::Expr;
pub use crate::expr::GurobiSum;
pub use ModelSense::*;
pub use VarType::*;

Modules

attr
param

Macros

add_binvar
add_ctsvar
add_intvar
add_var
c

Structs

Constr

A linear constraint added to a Model

Env

A Gurobi Environment object.

Model

Gurobi Model object.

QConstr

A quadratic constraint added to a Model

SOS

An SOS constraint added to a Model

Var

A Gurobi variable.

Enums

ConstrSense

Sense for new linear/quadratic constraint

ModelSense

Sense of objective function, aka direction of optimisation.

RelaxType

Type of cost function at feasibility relaxation

SOSType

Type of SOS constraint

Status

Status of a model

VarType

Gurobi variable types (see manual)

Constants

INFINITY

A large constant used by Gurobi to represent numeric infinity.

Traits

ModelObject

This trait encompasses all Gurobi model objects: Var, Constr, QConstr and SOS. Each ModelObject is associated with a particular model, and can only be used with that model. Each ModelObject also has a unique, fixed 32-bit ID. Gurobi itself uses an i32 to index objects (only positive indices are used), so the 32-bit limitation is already there. Note that IDs are only guaranteed to be unique if the concrete types of the ModelObject are the same and the objects belong to the same model. For example, if v is a Var and c is a Constr, then v and c may have the same ID. Additionally, if s is also a Var, but doesn’t belong to the same Model as v, s and v may have the same ID.