Skip to main content

Module prelude

Module prelude 

Source

Re-exports§

pub use crate::constraint::Constraint;
pub use crate::constraint::ConstraintExpr;
pub use crate::constraint::ConstraintId;
pub use crate::constraint::IntoRhs;
pub use crate::constraint::Relate;
pub use crate::constraint::Sense;
pub use crate::domain::Domain;
pub use crate::error::Error;
pub use crate::indexed::IndexedVar;
pub use crate::model::IndexedVarBuilder;
pub use crate::model::Model;
pub use crate::model::ModelKind;
pub use crate::model::display_index_key;
pub use crate::objective::Objective;
pub use crate::objective::ObjectiveSense;
pub use crate::param::Parameter;
pub use crate::set::FromIndexKey;
pub use crate::set::IndexKey;
pub use crate::set::IndexTuple;
pub use crate::set::Set;
pub use crate::set::SetIter;
pub use crate::sum::SumDomain;
pub use crate::sum::sum_over;Deprecated
pub use crate::var::VarBuilder;
pub use crate::var::Variable;

Macros§

constraint
constraint!(model, [name|name[idx]], lhs <op> rhs), register a constraint, an auto-named anonymous constraint, or an indexed family of constraints.
objective
objective!(model, Min|Max, expr), set the model objective and sense.
param
param!(model, name = value), declare a re-bindable scalar parameter and bind it to a local of the same name.
set
set!(name = domain), bind a local to an index Set. A plain right side (0..5, a * b) is normalized to an owned set (a top-level * is a borrowing Cartesian product). A pat in domain[ if cond] comprehension builds (and optionally filters) the set. See the crate docs.
sum
sum!(body for pat in domain[, pat in domain ...]), algebraic summation, lowered to nested sum_over folds.
variable
variable!(model, spec), declare a decision variable (or an indexed family) and bind it to a local of the same name. See the crate docs for the grammar.

Structs§

Expr
Lightweight handle to a node in an ExprArena.
ExprId
ParamId
VarId

Functions§

dot
Dot product of expressions with scalar coefficients: sum_{i} c_i * e_i.