Struct grb::Env[][src]

pub struct Env { /* fields omitted */ }
Expand description

A Gurobi Environment object.

Models objects created with Model::new will use the default Env. This default Env is thread-local and lazily initialized. Currently, it lasts until the current thread; there is no way to de-allocate it from the current thread.

Implementations

impl Env[src]

pub fn empty() -> Result<EmptyEnv>[src]

Create a new empty and un-started environment.

pub fn new(logfilename: &str) -> Result<Env>[src]

Create an environment with log file

Setting logfilename to an empty string will not create a logfile.

pub fn new_client(
    logfilename: &str,
    computeserver: &str,
    port: i32,
    password: &str,
    priority: i32,
    timeout: f64
) -> Result<Env>
[src]

Create a client environment on a computer server with log file

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

Query the value of a parameter

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

Set the value of a parameter

pub fn read_params(&mut self, filename: &str) -> Result<()>[src]

Import a set of parameter values from a file

pub fn write_params(&self, filename: &str) -> Result<()>[src]

Write the set of parameter values to a file

pub fn message(&self, message: &str)[src]

Insert a message into log file.

When message cannot convert to raw C string, a panic is occurred.

Auto Trait Implementations

impl !RefUnwindSafe for Env

impl !Send for Env

impl !Sync for Env

impl Unpin for Env

impl UnwindSafe for Env

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.