Some solvers have options for multi-objective optimization. For example, to use Gurobi’s multi-objective feature, you will need to first specify

option gurobi_options ‘multiobj=1’;

or, if you are already defining a gurobi_options string, add multiobj=1 to it. Then to provide priority and/or weighting information, you will need to use AMPL “suffix” commands to define some suffixes, which may include the following:

suffix objpriority IN;

suffix objweight IN;

suffix objreltol IN;

suffix objabstol IN;

As an example, suppose that your model has three AMPL “minimize” statements, which define three objective functions: A, B, and C. If you want Gurobi to minimize a weighted combination 8*A + 2*B + C, use AMPL “let” statements to assign objweight values to the objectives:

let A.objweight := 8;

let B.objweight := 2;

let C.objweight := 1;

Or, if you want Gurobi to first minimize A, then fix A at its minimum value and minimize B, then also fix B at its minimum value and minimize C, you can assign objpriority values to the objectives:

let A.objpriority := 3;

let B.objpriority := 2;

let C.objpriority := 1;

You can use any integers as objpriority values; the objective with the highest priority is minimized first, then the objective with the next highest priority, and so forth. Gurobi also offers two generalizations of this approach:

- If two objectives have the same priority, then their weighted sum is minimized, using weights given by objweight. For example if B.objpriority is set instead to 1 above, then after A is minimized, Gurobi fixes A at its minimum value and minimizes 2*B + C.
- You can assign an objreltol or objabstol value to an objective to allow its objective value to be degraded by a limited amount when lower-priority objectives are optimized. For example, if in addition to the priorities shown above, you set A.objreltol to 0.05, then instead of fixing A at its minimum value, Gurobi adds a constraint that A’s value must be <= its minimum value plus 5%. Or, if you set A.objabstol to 100, then instead of fixing A at its minimum value, Gurobi adds a constraint that A’s value must be <= its minimum value plus 100.

These generalizations can be combined to specify a variety of ways in which objective functions are handled. Also the same ideas apply to maximized objective functions – but if you are using .objweight, you need to have all objectives be minimize or all objective be maximize at each priority level.

There are similar options in CPLEX. Also Xpress has more limited features for priorities only. If you are using another solver, you will have to program the multi-objective optimization yourself, which will involve writing an objective that is a weighted sum of objective expressions, and/or making a series of solves…