CbcSolver

Struct CbcSolver 

Source
pub struct CbcSolver { /* private fields */ }
Expand description

The coin-or cbc solver

Implementations§

Source§

impl CbcSolver

Source

pub fn new() -> CbcSolver

Crate a cbc solver instance

Source

pub fn command_name(&self, command_name: String) -> CbcSolver

set the name of the executable to use

Source

pub fn with_temp_solution_file(&self, temp_solution_file: String) -> CbcSolver

Set the temporary solution file to use

Trait Implementations§

Source§

impl Clone for CbcSolver

Source§

fn clone(&self) -> CbcSolver

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CbcSolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CbcSolver

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl SolverProgram for CbcSolver

Source§

fn command_name(&self) -> &str

Returns the commandline program name
Source§

fn arguments(&self, lp_file: &Path, solution_file: &Path) -> Vec<OsString>

Returns the commandline arguments
Source§

fn preferred_temp_solution_file(&self) -> Option<&Path>

If there is a predefined solution filename
Source§

fn parse_stdout_status(&self, _stdout: &[u8]) -> Option<Status>

Parse the output of the program
Source§

fn solution_suffix(&self) -> Option<&str>

A suffix the solution file must have
Source§

impl SolverWithSolutionParsing for CbcSolver

Source§

fn read_specific_solution<'a, P: LpProblem<'a>>( &self, f: &File, problem: Option<&'a P>, ) -> Result<Solution, String>

Read a solution from a file
Source§

fn read_solution<'a, P: LpProblem<'a>>( &self, temp_solution_file: &str, problem: Option<&'a P>, ) -> Result<Solution, String>

👎Deprecated
Use read_solution_from_path instead.
Source§

fn read_solution_from_path<'a, P: LpProblem<'a>>( &self, temp_solution_file: &Path, problem: Option<&'a P>, ) -> Result<Solution, String>

Read a solution
Source§

impl WithMaxSeconds<CbcSolver> for CbcSolver

Source§

fn max_seconds(&self) -> Option<u32>

get max runtime
Source§

fn with_max_seconds(&self, seconds: u32) -> CbcSolver

set max runtime
Source§

impl WithMipGap<CbcSolver> for CbcSolver

Source§

fn mip_gap(&self) -> Option<f32>

get MIP gap
Source§

fn with_mip_gap(&self, mipgap: f32) -> Result<CbcSolver, String>

set MIP gap
Source§

impl WithNbThreads<CbcSolver> for CbcSolver

Source§

fn nb_threads(&self) -> Option<u32>

get thread count
Source§

fn with_nb_threads(&self, threads: u32) -> CbcSolver

set thread count

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> SolverTrait for T

Source§

fn run<'a, P>(&self, problem: &'a P) -> Result<Solution, String>
where P: LpProblem<'a>,

Run the solver on the given problem
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.