pub struct Model { /* private fields */ }
Expand description

A MILP model.

Implementations

Gets the current number of rows of the model.

Gets the current number of columns of the model.

Removes the initial solution.

Sets the column value to the initial solution.

If the solution is not present, it will be initialized with 0 for all coefficients.

Gets the column value to the initial solution.

Sets the initial solution from a Solution.

Sets a parameter.

For documentation, launch the cbc binary and type ?.

Sets parameters for an iterator.

Gets an iterator on the row identifiers.

Gets an iterator on the column identifiers.

Adds a column to the model. Returns the corresponding column identifier.

At creation, the bounds of the column are setted to [0, +∞].

Adds an integer variable to the model.

Equivalent to adding a column and setting it to integer.

Adds a binary variable to the model.

Equivalent to adding a column and setting it to binary.

Adds a row to the model. Returns the corresponding row identifier.

At creation, the bounds of the row are setted to [-∞, +∞].

Sets the weight corresponding to the given row and column in the constraint matrix.

Changes the given column to integer variable.

Changes the given column to continuous variable.

Changes the given column to binary variable.

Equivalent to setting the column as integer and restricting it to [0, 1].

Sets the upper bound of the given column.

Sets the lower bound of the given column.

Sets the objective coefficient of the given variable.

Sets the upper bound of the given row.

Sets the lower bound of the given row.

Force the given row to be equal to the given value.

Equivalent to setting the upper bound and the lower bound.

Add a special ordered set constraint, preventing all but one variable in a set from being non-zero at the same time. weights can be used as hints to the optimizer to improve the resolution speed. In case you don’t have any weights for your variables, you can use 1, 2, 3, … For more information about SOS weights, see: http://lpsolve.sourceforge.net/5.5/SOS.htm

Add a special ordered set constraint, preventing all but two adjacent variables in a set from being non-zero at the same time. Weights determine the adjacency of the variables. For more information about SOS weights, see: http://lpsolve.sourceforge.net/5.5/SOS.htm

Sets the objective sense.

Construct a raw::Model corresponding to the current state.

Solves the model. Returns the solution.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.