Struct gurobi::Callback [] [src]

pub struct Callback<'a> {
    // some fields omitted
}

The context object for Gurobi callback.

Methods

impl<'a> Callback<'a>
[src]

Retrieve the location where the callback called.

Retrive node relaxation solution values at the current node.

Retrieve values from the current solution vector.

Provide a new feasible solution for a MIP model.

Retrieve the elapsed solver runtime [sec].

Add a new cutting plane to the MIP model.

Add a new lazy constraint to the MIP model.

Methods from Deref<Target=Model<'a>>

create a copy of the 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.

Create an relaxation of the model (undocumented).

Perform presolve on the model.

Create a feasibility model (undocumented).

Apply all modification of the model to process

Optimize the model synchronously

Optimize the model asynchronously

Optimize the model with a callback function

Wait for a optimization called asynchronously.

Compute an Irreducible Inconsistent Subsystem (IIS) of the model.

Send a request to the model to terminate the current optimization process.

Reset the model to an unsolved state.

All solution information previously computed are discarded.

Deprecated

Perform an automated search for parameter settings that improve performance on the model. See also references on official manual.

Deprecated

Prepare to retrieve the results of tune(). See also references on official manual.

Deprecated

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();
...

Discard all concurrent environments for the model.

Insert a message into log file.

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

Import optimization data of the model from a file.

Export optimization data of the model to a file.

add a decision variable to the model.

add decision variables to the model.

add a linear constraint to the model.

add linear constraints to the model.

Add a range constraint to the model.

This operation adds a decision variable with lower/upper bound, and a linear equality constraint which states that the value of variable must equal to expr.

Returns

  • An decision variable associated with the model. It has lower/upper bound constraints.
  • An linear equality constraint associated with the model.

Add range constraints to the model.

add a quadratic constraint to the model.

add Special Order Set (SOS) constraint to the model.

Set the objective function of the model.

Query the value of attributes which associated with variable/constraints.

Set the value of attributes which associated with variable/constraints.

Query the value of attributes which associated with variable/constraints.

Set the value of attributes which associated with variable/constraints.

Modify the model to create a feasibility relaxation.

If you don't want to modify the model, copy the model before invoking this method (see also copy()).

Arguments

  • relaxtype : The type of cost function used when finding the minimum cost relaxation. See also RelaxType.
  • minrelax : The type of feasibility relaxation to perform.
  • vars : Variables whose bounds are allowed to be violated.
  • lbpen / ubpen : Penalty for violating a variable lower/upper bound. INFINITY means that the bounds doesn't allow to be violated.
  • constrs : Linear constraints that are allowed to be violated.
  • rhspen : Penalty for violating a linear constraint. INFINITY means that the bounds doesn't allow to be violated.

Returns

  • The objective value for the relaxation performed (if minrelax is true).
  • Slack variables for relaxation and linear/quadratic constraints related to theirs.

Set a piecewise-linear objective function of a certain variable in the model.

Retrieve the status of the model.

Retrieve an iterator of the variables in the model.

Retrieve an iterator of the linear constraints in the model.

Retrieve an iterator of the quadratic constraints in the model.

Retrieve an iterator of the special order set (SOS) constraints in the model.

Remove a variable from the model.

Remove a linear constraint from the model.

Remove a quadratic constraint from the model.

Remove a special order set (SOS) cnstraint from the model.

Retrieve a single constant matrix coefficient of the model.

Change a single constant matrix coefficient of the model.

Change a set of constant matrix coefficients of the model.

Trait Implementations

impl<'a> Deref for Callback<'a>
[src]

The resulting type after dereferencing

The method called to dereference a value