GRBgetconcurrentenv

GRBenv * GRBgetconcurrentenv ( GRBmodel *model,
    int num )

Create/retrieve a concurrent environment for a model.

This routine provides fine-grained control over the concurrent optimizer. By creating your own concurrent environments and setting appropriate parameters on these environments (e.g., the Method parameter), you can control exactly which strategies the concurrent optimizer employs. For example, if you create two concurrent environments, and set Method to primal simplex for one and dual simplex for the other, subsequent concurrent optimizer runs will use the two simplex algorithms rather than the default choices.

Note that you must create contiguously numbered concurrent environments, starting with num=0. For example, if you want three concurrent environments, they must be numbered 0, 1, and 2.

Once you create concurrent environments, they will be used for every subsequent concurrent optimization on that model. Use GRBdiscardconcurrentenvs to revert back to default concurrent optimizer behavior.

Return value:

The concurrent environment. A NULL return value indicates that there was a problem creating the environment.

Arguments:

model: The model for the concurrent environment.

num: The concurrent environment number.

Example usage:

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

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