[−][src]Struct coin_cbc::Model
A MILP model.
Implementations
impl Model
[src]
pub fn num_rows(&self) -> u32
[src]
Gets the current number of rows of the model.
pub fn num_cols(&self) -> u32
[src]
Gets the current number of columns of the model.
pub fn remove_initial_solution(&mut self)
[src]
Removes the initial solution.
pub fn set_col_initial_solution(&mut self, col: Col, value: f64)
[src]
Sets the column value to the initial solution.
If the solution is not present, it will be initialized with 0 for all coefficients.
pub fn set_initial_solution(&mut self, solution: &Solution)
[src]
Sets the initial solution from a Solution
.
pub fn set_parameter(&mut self, key: &str, value: &str)
[src]
Sets a parameter.
For documentation, launch the cbc
binary and type ?
.
pub fn set_parameters(
&mut self,
iter: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>
)
[src]
&mut self,
iter: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>
)
Sets parameters for an iterator.
pub fn rows(&self) -> impl Iterator<Item = Row>
[src]
Gets an iterator on the row identifiers.
pub fn cols(&self) -> impl Iterator<Item = Col>
[src]
Gets an iterator on the column identifiers.
pub fn add_col(&mut self) -> Col
[src]
Adds a column to the model. Returns the corresponding column identifier.
At creation, the bounds of the column are setted to [0, +∞].
pub fn add_integer(&mut self) -> Col
[src]
Adds an integer variable to the model.
Equivalent to adding a column and setting it to integer.
pub fn add_binary(&mut self) -> Col
[src]
Adds a binary variable to the model.
Equivalent to adding a column and setting it to binary.
pub fn add_row(&mut self) -> Row
[src]
Adds a row to the model. Returns the corresponding row identifier.
At creation, the bounds of the row are setted to [-∞, +∞].
pub fn set_weight(&mut self, row: Row, col: Col, weight: f64)
[src]
Sets the weight corresponding to the given row and column in the constraint matrix.
pub fn set_integer(&mut self, col: Col)
[src]
Changes the given column to integer variable.
pub fn set_continuous(&mut self, col: Col)
[src]
Changes the given column to continuous variable.
pub fn set_binary(&mut self, col: Col)
[src]
Changes the given column to binary variable.
Equivalent to setting the column as integer and restricting it to [0, 1].
pub fn set_col_upper(&mut self, col: Col, value: f64)
[src]
Sets the upper bound of the given column.
pub fn set_col_lower(&mut self, col: Col, value: f64)
[src]
Sets the lower bound of the given column.
pub fn set_obj_coeff(&mut self, col: Col, value: f64)
[src]
Sets the objective coefficient of the given variable.
pub fn set_row_upper(&mut self, row: Row, value: f64)
[src]
Sets the upper bound of the given row.
pub fn set_row_lower(&mut self, row: Row, value: f64)
[src]
Sets the lower bound of the given row.
pub fn set_row_equal(&mut self, row: Row, value: f64)
[src]
Force the given row to be equal to the given value.
Equivalent to setting the upper bound and the lower bound.
pub fn set_obj_sense(&mut self, sense: Sense)
[src]
Sets the objective sense.
pub fn to_raw(&self) -> Model
[src]
Construct a raw::Model
corresponding to the current state.
pub fn solve(&self) -> Solution
[src]
Solves the model. Returns the solution.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,