-
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.
QP hierarchical objectives test #239
Fails except with Gurobi
- Loading branch information
Showing
6 changed files
with
79 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
test/end2end/cases/categorized/fast/multi_obj/dietobj_pr_3.inc
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,14 @@ | ||
suffix objpriority; | ||
suffix objweight; | ||
|
||
|
||
let total_cost["A&P"].objpriority := 4; | ||
let total_cost["JEWEL"].objpriority := 3; | ||
let total_cost["VONS"].objpriority := 1; | ||
let total_number.objpriority := 2; | ||
|
||
let total_cost["A&P"].objweight := 1; | ||
let total_cost["JEWEL"].objweight := 2; | ||
let total_cost["VONS"].objweight := 1.3; | ||
let total_number.objweight := -5; | ||
|
35 changes: 35 additions & 0 deletions
35
test/end2end/cases/categorized/fast/multi_obj/dietqobj_1000_2.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,35 @@ | ||
## Test correct objective value postsolve in MP | ||
## See AutoLinking | ||
|
||
set MINREQ; # nutrients with minimum requirements | ||
set MAXREQ; # nutrients with maximum requirements | ||
|
||
set NUTR := MINREQ union MAXREQ; # nutrients | ||
set FOOD; # foods | ||
set STORE; # stores | ||
|
||
param cost {STORE,FOOD} > 0; | ||
param f_min {FOOD} >= 0; | ||
param f_max {j in FOOD} >= f_min[j]; | ||
|
||
param n_min {MINREQ} >= 0; | ||
param n_max {MAXREQ} >= 0; | ||
|
||
param amt {NUTR,FOOD} >= 0; | ||
|
||
var Buy {j in FOOD} >= f_min[j], <= f_max[j]; | ||
|
||
minimize total_cost {s in STORE}: | ||
sum {j in FOOD} -cost[s,j] * Buy[j] | ||
+ sum {j in FOOD} Uniform(0.01, 0.2) * Buy[j] * Buy[j] | ||
+ 1000; | ||
|
||
minimize total_number: | ||
sum {j in FOOD} Buy[j] | ||
- sum {j in FOOD} Uniform(0.01, 0.2) * Buy[j] * Buy[j]; | ||
|
||
subject to diet_min {i in MINREQ}: | ||
sum {j in FOOD} amt[i,j] * Buy[j] >= n_min[i]; | ||
|
||
subject to diet_max {i in MAXREQ}: | ||
sum {j in FOOD} amt[i,j] * Buy[j] <= n_max[i]; |
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