Struct grb::EmptyEnv [−][src]
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]
&mut self,
param: P,
value: V
) -> Result<&mut Self>
Set a parameter value
pub fn start(self) -> Result<Env>
[src]
Start the environment, returning the Env
on success.
Auto Trait Implementations
impl !RefUnwindSafe for EmptyEnv
[src]
impl !Send for EmptyEnv
[src]
impl !Sync for EmptyEnv
[src]
impl Unpin for EmptyEnv
[src]
impl UnwindSafe for EmptyEnv
[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>,