-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:ampl/mp into develop
- Loading branch information
Showing
7 changed files
with
128 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
test/end2end/cases/categorized/fast/multi_obj/multiobj_abstol_MIP.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
20 changes: 20 additions & 0 deletions
20
test/end2end/cases/categorized/fast/multi_obj/multiobj_abstol_manual.run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
31 changes: 31 additions & 0 deletions
31
test/end2end/cases/categorized/fast/multi_obj/multiobj_reltol_MIP.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |