diff --git a/test/end2end/cases/categorized/fast/multi_obj/dietqobj_1000.mod b/test/end2end/cases/categorized/fast/multi_obj/dietqobj_1000.mod new file mode 100644 index 000000000..4e3cfa958 --- /dev/null +++ b/test/end2end/cases/categorized/fast/multi_obj/dietqobj_1000.mod @@ -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]; diff --git a/test/end2end/cases/categorized/fast/multi_obj/modellist.json b/test/end2end/cases/categorized/fast/multi_obj/modellist.json index e7f10c218..0588a0be2 100644 --- a/test/end2end/cases/categorized/fast/multi_obj/modellist.json +++ b/test/end2end/cases/categorized/fast/multi_obj/modellist.json @@ -87,6 +87,19 @@ "_sobj[4]": 32.84444444444445 } }, + { + "name" : "dietQobj_1000 multiobj=2", + "tags" : ["quadratic", "quadratic_obj", "multiobj"], + "files" : ["dietqobj_1000.mod", "dietobj.dat"], + "options": { "ANYSOLVER_options": "multiobj=2" }, + "values": { + "total_cost[\"A&P\"]": 920.6492623659187, + "total_cost[\"JEWEL\"]": 914.6919717993438, + "total_cost[\"VONS\"]": 914.081415223036, + "total_number": 44.80888220421118, + "_sobj[4]": 44.80888220421118 + } + }, { "name" : "dietobj multiobj=1 obj:2:priority=10", "Comment": "Modify obj priority via an option",