Try our new documentation site (beta).
Model.getMultiobjEnv()
getMultiobjEnv ( index )
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.
Use discardMultiobjEnvs to discard multi-objective environments and return to standard behavior.
Arguments:
index (int): The optimization pass index, starting from 0.
Return value:
The multi-objective environment for that optimization pass when solving the model.
Example usage:
env0 = model.getMultiobjEnv(0) env1 = model.getMultiobjEnv(1) env0.setParam('TimeLimit', 100) env1.setParam('TimeLimit', 10) model.optimize() model.discardMultiobjEnvs()