Struct grb::EmptyEnv[][src]

pub struct EmptyEnv { /* fields omitted */ }

Gurobi environment object (see the Gurobi manual) A Gurobi environment which hasn't been started yet. Some Gurobi parameters, such as Record need to be set before the environment has been started.

Setting param::OutputFlag to 0 on an EmptyEnv is useful for stopping the license info from being printed, since this happens on starting the environment.

Examples

use grb::*;
let mut env = Env::empty()?;
env.set(param::OutputFlag, 0)? // license will not be printed when env starts
  .set(param::UpdateMode, 1)?
  .set(param::LogFile, "".to_string())?;
let env : Env = env.start()?;

Implementations

impl EmptyEnv[src]

pub fn get<P: ParamGet<V>, V>(&self, param: P) -> Result<V>[src]

Query a parameter value

pub fn set<P: ParamSet<V>, V>(
    &mut self,
    param: P,
    value: V
) -> Result<&mut Self>
[src]

Set a parameter value

pub fn start(self) -> Result<Env>[src]

Start the environment, returning the Env on success.

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.