Skip to content

Commit

Permalink
Multi-obj: degradation tolerance tests #239
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Jun 17, 2024
1 parent 0487f1c commit 483a2a3
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/end2end/cases/categorized/fast/multi_obj/modellist.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,36 @@
"_sobj[4]": 32.604395604395606
}
},
{
"name" : "multiobj_abstol_MIP",
"tags" : ["linear", "integer", "multiobj"],
"options": {
"ANYSOLVER_options": "multiobj=1",
"gurobi_options": "multiobj=1 mip:gap=0"
},
"values": {
"_sobj[1]": 2.75,
"_sobj[2]": 3.5
}
},
{
"name" : "multiobj_reltol_MIP",
"tags" : ["linear", "integer", "multiobj"],
"options": {
"ANYSOLVER_options": "multiobj=1",
"gurobi_options": "multiobj=1 mip:gap=0"
},
"values": {
"_sobj[1]": 2.75,
"_sobj[2]": 3.5
}
},
{
"name" : "multiobj_abstol_manual.run",
"tags" : ["linear"],
"files": ["multiobj_abstol_manual.run"],
"objective": 3.5
},
{
"name" : "obj_suf_01 multiobj=0",
"tags" : ["linear", "continuous", "multiobj"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

var x;
var y;
var z integer; # For Gurobi to handle AbsTol in direct way

maximize xobj: x;
minimize yobj: y;

subj to c1: y >= x;
subj to c2: y <= x + 1;

subj to c3: y <= 2*x;
subj to c4: y >= 2*x - 2;

subj to c5_keep_z: y >= z;

suffix objpriority IN;
suffix objabstol IN;

let xobj.objpriority := 10;
let yobj.objpriority := 1;

let xobj.objabstol := 0.25;

# Need mip:gap=0 due to the way tolerances are applied:
# https://www.gurobi.com/documentation/current/refman/working_with_multiple_obje.html.
# option gurobi_options "obj:multi=1 writeprob=multiobj1_MIP.lp mip:gap=0";
# option solver gurobi;

# solve;
# display x, y, z;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

var x;
var y;

maximize xobj: x;
minimize yobj: y;

subj to c1: y >= x;
subj to c2: y <= x + 1;

subj to c3: y <= 2*x;
subj to c4: y >= 2*x - 2;

option solver gurobi;
solve xobj;
# display x, y;

subj to tol: x >= x.val - 0.25;
solve yobj;
# display x, y;
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

var x;
var y;
var z integer; # For Gurobi to handle AbsTol in direct way

maximize xobj: x;
minimize yobj: y;

subj to c1: y >= x;
subj to c2: y <= x + 1;

subj to c3: y <= 2*x;
subj to c4: y >= 2*x - 2;

subj to c5_keep_z: y >= z;

suffix objpriority IN;
suffix objreltol IN;

let xobj.objpriority := 10;
let yobj.objpriority := 1;

let xobj.objreltol:= 0.25/3;

# Need mip:gap=0 due to the way tolerances are applied:
# https://www.gurobi.com/documentation/current/refman/working_with_multiple_obje.html.
# option gurobi_options "obj:multi=1 writeprob=multiobj1_MIP.lp mip:gap=0";
# option solver gurobi;

# solve;
# display x, y, z;

0 comments on commit 483a2a3

Please sign in to comment.