Struct gurobi::Callback [−][src]
pub struct Callback<'a> { /* fields omitted */ }
The context object for Gurobi callback.
Methods
impl<'a> Callback<'a>
[src]
impl<'a> Callback<'a>
pub fn get_where(&self) -> Where
[src]
pub fn get_where(&self) -> Where
Retrieve the location where the callback called.
pub fn get_node_rel(&self, vars: &[Var]) -> Result<Vec<f64>>
[src]
pub fn get_node_rel(&self, vars: &[Var]) -> Result<Vec<f64>>
Retrive node relaxation solution values at the current node.
pub fn get_solution(&self, vars: &[Var]) -> Result<Vec<f64>>
[src]
pub fn get_solution(&self, vars: &[Var]) -> Result<Vec<f64>>
Retrieve values from the current solution vector.
pub fn set_solution(&self, vars: &[Var], solution: &[f64]) -> Result<()>
[src]
pub fn set_solution(&self, vars: &[Var], solution: &[f64]) -> Result<()>
Provide a new feasible solution for a MIP model.
pub fn get_runtime(&self) -> Result<f64>
[src]
pub fn get_runtime(&self) -> Result<f64>
Retrieve the elapsed solver runtime [sec].
pub fn add_cut(&self, lhs: LinExpr, sense: ConstrSense, rhs: f64) -> Result<()>
[src]
pub fn add_cut(&self, lhs: LinExpr, sense: ConstrSense, rhs: f64) -> Result<()>
Add a new cutting plane to the MIP model.
pub fn add_lazy(&self, lhs: LinExpr, sense: ConstrSense, rhs: f64) -> Result<()>
[src]
pub fn add_lazy(&self, lhs: LinExpr, sense: ConstrSense, rhs: f64) -> Result<()>
Add a new lazy constraint to the MIP model.
Methods from Deref<Target = Model>
pub fn copy(&self) -> Result<Model>
[src]
pub fn copy(&self) -> Result<Model>
create a copy of the model
pub fn fixed(&self) -> Result<Model>
[src]
pub fn fixed(&self) -> Result<Model>
Create an fixed model associated with the model.
In fixed model, each integer variable is fixed to the value that it takes in the original MIP solution. Note that the model must be MIP and have a solution loaded.
pub fn relax(&self) -> Result<Model>
[src]
pub fn relax(&self) -> Result<Model>
Create an relaxation of the model (undocumented).
pub fn presolve(&self) -> Result<Model>
[src]
pub fn presolve(&self) -> Result<Model>
Perform presolve on the model.
pub fn feasibility(&self) -> Result<Model>
[src]
pub fn feasibility(&self) -> Result<Model>
Create a feasibility model (undocumented).
pub fn get_env(&self) -> &Env
[src]
pub fn get_env(&self) -> &Env
Get immutable reference of an environment object associated with the model.
pub fn sync(&self) -> Result<()>
[src]
pub fn sync(&self) -> Result<()>
Wait for a optimization called asynchronously.
pub fn terminate(&self)
[src]
pub fn terminate(&self)
Send a request to the model to terminate the current optimization process.
pub fn reset(&self) -> Result<()>
[src]
pub fn reset(&self) -> Result<()>
Reset the model to an unsolved state.
All solution information previously computed are discarded.
pub fn tune(&self) -> Result<()>
[src]
pub fn tune(&self) -> Result<()>
Perform an automated search for parameter settings that improve performance on the model. See also references on official manual.
pub fn get_tune_result(&self, n: i32) -> Result<()>
[src]
pub fn get_tune_result(&self, n: i32) -> Result<()>
Prepare to retrieve the results of tune()
.
See also references on official
manual.
pub fn get_concurrent_env(&self, num: i32) -> Result<Env>
[src]
pub fn get_concurrent_env(&self, num: i32) -> Result<Env>
Create/retrieve a concurrent environment for the model
Note that the number of concurrent environments (num
) must be contiguously numbered.
Example
let env1 = model.get_concurrent_env(0).unwrap(); let env2 = model.get_concurrent_env(1).unwrap(); let env3 = model.get_concurrent_env(2).unwrap(); ...
pub fn discard_concurrent_envs(&self)
[src]
pub fn discard_concurrent_envs(&self)
Discard all concurrent environments for the model.
pub fn message(&self, message: &str)
[src]
pub fn message(&self, message: &str)
Insert a message into log file.
When message cannot convert to raw C string, a panic is occurred.
pub fn write(&self, filename: &str) -> Result<()>
[src]
pub fn write(&self, filename: &str) -> Result<()>
Export optimization data of the model to a file.
pub fn get<A: Attr>(&self, attr: A) -> Result<A::Out>
[src]
pub fn get<A: Attr>(&self, attr: A) -> Result<A::Out>
Query the value of attributes which associated with variable/constraints.
pub fn get_values<A: AttrArray, P>(
&self,
attr: A,
item: &[P]
) -> Result<Vec<A::Out>> where
P: Deref<Target = Proxy>,
[src]
pub fn get_values<A: AttrArray, P>(
&self,
attr: A,
item: &[P]
) -> Result<Vec<A::Out>> where
P: Deref<Target = Proxy>,
Query the value of attributes which associated with variable/constraints.
pub fn status(&self) -> Result<Status>
[src]
pub fn status(&self) -> Result<Status>
Retrieve the status of the model.
ⓘImportant traits for Iter<'a, T>pub fn get_vars(&self) -> Iter<Var>
[src]
pub fn get_vars(&self) -> Iter<Var>
Retrieve an iterator of the variables in the model.
ⓘImportant traits for Iter<'a, T>pub fn get_constrs(&self) -> Iter<Constr>
[src]
pub fn get_constrs(&self) -> Iter<Constr>
Retrieve an iterator of the linear constraints in the model.
ⓘImportant traits for Iter<'a, T>pub fn get_qconstrs(&self) -> Iter<QConstr>
[src]
pub fn get_qconstrs(&self) -> Iter<QConstr>
Retrieve an iterator of the quadratic constraints in the model.
ⓘImportant traits for Iter<'a, T>pub fn get_sos(&self) -> Iter<SOS>
[src]
pub fn get_sos(&self) -> Iter<SOS>
Retrieve an iterator of the special order set (SOS) constraints in the model.
pub fn get_coeff(&self, var: &Var, constr: &Constr) -> Result<f64>
[src]
pub fn get_coeff(&self, var: &Var, constr: &Constr) -> Result<f64>
Retrieve a single constant matrix coefficient of the model.