[AMPL 24489] Multi-objective optimization

Dear Robert,

I have to solve multi-objective problem and i wrote these statements in my run file were
“Cout_Total” is the first objective
“Consommation_carburant” the second objective

option solver gurobiasl;
option gurobi_options ‘relax=1’;
option gurobi_options ‘nonconvex=2 outlev=1 presolve=2 preqlinearize=1 multiobj=1’;
solve;
let Cout_Total.objweight := 0.6;
let Consommation_carburant.objweight := 0.4;

I have had the following syntax error message:

objweight is not an assignable suffix.
context: let >>> Cout_Total.objweight <<< := 0.6;

objweight is not an assignable suffix.
context: let >>> Consommation_carburant.objweight <<< := 0.4;

I am writing to you to help me correct this.

And also I have had the following statement:
“Multi-objectives with quadratic terms are not supported
Gurobi 10.0.0: Feature not supported
Objective = Cout_Total”

So I would also like to ask you how which solver can I use to solve multi-objective problem as I am currently using Gurobi 10.0.00.

Best regards.

Before “let Cout_Total.objweight := 0.6;”, you need to give this command to define the objweight suffix:

suffix objweight IN;

(“IN” means that suffix is an input to the solver.) Then iIf you have a quadratic term in an objective, for example,

minimize obj1: x^2 - y^2 + 3*x + 4*y;

you can make the objective linear and push the quadratic expression into a constraint, by defining an auxiliary variable:

var quad1;
minimize obj1: quad1 + 3*x + 4*y;
subject to qeq1: quad1 = x^2 - y^2;

If you do something like this for both of your quadratic objectives, and include nonconvex=2 in your gurobi_options string, then you should not get the “Multi-objectives with quadratic terms are not supported” error.

(Note that relax=1 will be ignored because gurobi_options is redefined in the following statement. You need to put all of the options for Gurobi into one gurobi_options string.)

It works very well when I proceed as you explained. Thank you so much!