I just did some experiment on what will happen if a optimisation problem has many solutions.I know that by MiniZinc we can identify multiple answers for satisfy problem.(Like map colouring in user guide). And MiniZinc always show a dotted double lines soon after we get the optimal answer.
Now I just ran below code and I noticed that if I use the gecode solver answers are different from when I use coin-bc or cplex solvers answers are different. Is there any feature in MiniZinc that we are notified when these kind of multiple optimum answers problems or else to get all solutions disregarding the solver we use.
enum suppliers;
suppliers={s1,s2,s3};
set of int:sup=1..length(suppliers);
array[sup] of float:price=[3.0,6.0,12.0];
array[sup] of int:max=[2,3,1];
int:demand=3;
array[sup] of var 0..1000:qty;
var float:cost;
constraint sum(i in sup)(
qty[i])=demand;
constraint forall(i in sup)(
qty[i]<=max[i]
);
constraint qty[2] != 1;
constraint qty[1] != 1;
constraint sum(i in sup)(
price[i]*qty[i])=cost;
solve minimize cost;