Try our new documentation site (beta).


GRBgetmultiobjenv

GRBenv* GRBgetmultiobjenv ( GRBmodel *model,
    int num )

Create/retrieve a multi-objective environment for the optimization pass with the given index. This environment enables fine-grained control over the multi-objective optimization process. Specifically, by changing parameters on this environment, you modify the behavior of the optimization that occurs during the corresponding pass of the multi-objective optimization.

Each multi-objective environment starts with a copy of the current model environment.

Please refer to the discussion of Multiple Objectives for information on how to specify multiple objective functions and control the trade-off between them.

Please refer to the discussion on Combining Blended and Hierarchical Objectives for information on the optimization passes to solve multi-objective models.

Return value:

The environment associated with a given optimization pass when solving the multiobjective model. A NULL return value indicates that there was a problem retrieving the environment.

Arguments:

model: The model from where we want to retrieve the multiobjective environment.

num: The optimization pass number, starting from 0.

Example usage:

  GRBenv *env0 = GRBgetmultiobjenv(model,0);
  GRBenv *env1 = GRBgetmultiobjenv(model,1);

  GRBsetintparam(env0, "Method", 2);
  GRBsetintparam(env1, "Method", 1);

  GRBoptimize(model);

  GRBdiscardmultiobjenvs(model);

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization