Try our new documentation site (beta).


Multi-objective environments

When solving a multi-objective model, the solution process typically proceeds in phases, where each phase solves for one objective. The standard algorithmic parameters influence the strategy used to solve the overall multi-objective model. However, in some cases you may want finer-grain control over the strategies used in each phase. The solver enables this through multi-objective environments.

Multi-objective environments are created via API routines (in C, C++, Java, .NET, or Python). You set parameters on these environments as you would with any other environment, but in this case they only affect one of the several objective solves.

To give a simple example, in Python you could do the following:

  # Create multi-objective environments
  env0 = model.getMultiobjEnv(0)
  env1 = model.getMultiobjEnv(1)

  # Set parameters on multi-objective environments
  env0.setParam('Method', 2)
  env1.setParam('Method', 1)
  env1.setParam('Presolve', 0)

  # Perform multi-objective optimization
  model.optimize()
This would use the barrier solver (Method=2) for the first objective, and the dual simplex solver (Method=1) with no presolve (Presolve=0) for the second. Note that you don't need a multi-objective environment for each objective - only for those where you want parameters to take different values from those of the model itself.

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