Try our new documentation site (beta).
![next](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/next.png?x70725)
![up](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/up.png?x70725)
![previous](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/prev.png?x70725)
Next: GRBdiscardconcurrentenvs Up: Environment Creation and Destruction Previous: GRBgetconcurrentenv
GRBgetmultiobjenv
GRBenv* | GRBgetmultiobjenv ( | GRBmodel | *model, |
int | num ) |
Create/retrieve a multi-objective environment for the objective 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.
Return value:
The environment associated with a given multiobjective number in the 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 multiobjecitve environment.
num: The multiobjective number.
Example usage:
GRBenv *env0 = GRBgetmultiobjenv(model,0); GRBenv *env1 = GRBgetmultiobjenv(model,1); GRBsetintparam(env0, "Method", 2); GRBsetintparam(env1, "Method", 1); GRBoptimize(model); GRBdiscardmultiobjenvs(model);
![next](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/next.png?x70725)
![up](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/up.png?x70725)
![previous](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman/prev.png?x70725)
Next: GRBdiscardconcurrentenvs Up: Environment Creation and Destruction Previous: GRBgetconcurrentenv
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp?x70725)