pub struct Env { /* private fields */ }
Expand description
A Gurobi Environment object.
Model
s 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§
source§impl Env
impl Env
sourcepub fn new(logfilename: &str) -> Result<Env>
pub fn new(logfilename: &str) -> Result<Env>
Create an environment with log file
Setting logfilename
to an empty string will not create a logfile.
sourcepub fn set<P: ParamSet<V>, V>(&mut self, param: P, value: V) -> Result<()>
pub fn set<P: ParamSet<V>, V>(&mut self, param: P, value: V) -> Result<()>
Set the value of a parameter
sourcepub fn read_params(&mut self, filename: &str) -> Result<()>
pub fn read_params(&mut self, filename: &str) -> Result<()>
Import a set of parameter values from a file
sourcepub fn write_params(&self, filename: &str) -> Result<()>
pub fn write_params(&self, filename: &str) -> Result<()>
Write the set of parameter values to a file
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl !Send for Env
impl !Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more