-
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.
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
test/end2end/cases/categorized/fast/multi_obj/dietqobj_1000.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,33 @@ | ||
## 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]; | ||
|
||
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