Struct grb::AsyncHandle[][src]

pub struct AsyncHandle(_);

A handle to an AsyncModel which is currently solving.

Implementations

impl AsyncHandle[src]

pub fn status(&self) -> Result<Status>[src]

Retrieve current the attr::Status of the model.

pub fn obj_val(&self) -> Result<f64>[src]

Retrieve the current attr::ObjVal of the model.

pub fn obj_bnd(&self) -> Result<f64>[src]

Retrieve the current attr::ObjBound of the model.

pub fn iter_cnt(&self) -> Result<f64>[src]

Retrieve the current attr::IterCount of the model.

pub fn bar_iter_cnt(&self) -> Result<i32>[src]

Retrieve the current attr::BarIterCount of the model.

pub fn node_cnt(&self) -> Result<f64>[src]

Retrieve the current attr::NodeCount of the model.

pub fn join(self) -> (AsyncModel, Result<()>)[src]

Wait for optimisation to finish.

Errors

An Error::FromAPI may occur during optimisation, in which case it is stored in the Result.

pub fn terminate(&self)[src]

Send a request to Gurobi to terminate optimization. Optimization may not finish immediately.

Example

use grb::AsyncModel;
let e = Env::new("")?;
let m = Model::with_env("async", e)?;
  ...
let m = AsyncModel::new(m);
// discard `AsyncModel` on failure and panic
let handle = m.optimize().map_err(|(_, e)| e).unwrap();
  ...
handle.terminate();

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.