Struct grb::AsyncHandle [−][src]
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
impl !RefUnwindSafe for AsyncHandle
[src]
impl !Send for AsyncHandle
[src]
impl !Sync for AsyncHandle
[src]
impl Unpin for AsyncHandle
[src]
impl UnwindSafe for AsyncHandle
[src]
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,
pub 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, 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.
pub 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>,