Question
I set Method=6 when solving a multi-objective LP. The first objective pass uses PDHG, but subsequent objective passes use simplex. How can I solve every stage of the multi-objective LP with PDHG?
Answer
This behavior is expected. For hierarchical multi-objective LPs, Gurobi solves the model in a sequence of optimization passes. The first pass is controlled by the global Method parameter. Subsequent passes may use warm-start information from earlier passes, and these passes are typically solved with primal simplex.
To use PDHG for each multi-objective pass, set Method=6 in the corresponding multi-objective environments. Multi-objective environments let you set parameters for individual objective passes rather than only for the overall multi-objective solve.
Note: This article focuses on multi-objective LP models. For a multi-objective MIP model, the same approach can be used to choose the LP algorithm for the root relaxation of each multi-objective optimization pass. For example, setting Method=6 in each pass-specific multi-objective environment requests PDHG for the root relaxation of that pass.
PDHG does not require a GPU. By default, PDHG runs on the CPU. Set PDHGGPU=1 only if you want PDHG to run on the GPU and your Gurobi build and hardware support GPU execution.
Python example
In Python, use getMultiobjEnv() to retrieve the multi-objective environment for a given pass, then set Method=6 on that environment:
# Configure the first multi-objective pass to use PDHG
env0 = model.getMultiobjEnv(0)
env0.setParam("Method", 6)
# Configure the second multi-objective pass to use PDHG
env1 = model.getMultiobjEnv(1)
env1.setParam("Method", 6)
# Optional: request GPU execution for PDHG
# env0.setParam("PDHGGPU", 1)
# env1.setParam("PDHGGPU", 1)
model.optimize()Add one multi-objective environment for each pass that should use PDHG. If several objectives have the same priority, note that they will be blended into the same pass, so the number of passes is not necessarily the same as the number of objectives.
Command-line example
Multi-objective environments can also be specified with a parameter file via the MultiObjSettings parameter. MultiObjSettings is a command-line-only parameter that accepts either a comma-separated list of .prm files or one .prm file containing multiple parameter sets.
For example, create a file named pdhg.prm:
PARAMETERSET
Method 6
PARAMETERSET
Method 6Then solve the model with:
gurobi_cl MultiObjSettings=pdhg.prm model.mpsEach PARAMETERSET block corresponds to one multi-objective environment setting. To request GPU execution for PDHG, also include PDHGGPU 1 in each block:
PARAMETERSET
Method 6
PDHGGPU 1
PARAMETERSET
Method 6
PDHGGPU 1