为什么我在MiniZinc中没有输出?我的程序结束如下:
var int: Cost = sum (p in 1 .. nP) (Score [p]);
solve minimize Cost;
output ["Test"];
我得到的只是: 运行scheduler.mzn 完成54毫秒
2/7/15再次发生了。这是剥离代码:
array[1 .. 2] of var int: D;
array[1 .. 2] of var int: F;
array[1 .. 2] of var int: S;
constraint forall (i in 1 .. 2) (S [i] = D [i] * F [i]);
var int: Cost = 1;
solve minimize Cost;
output ["test"];
我没有输出,也没有“UNSATISFIABLE”。
答案 0 :(得分:0)
至少在MiniZinc 2.0.0的控制台模式下,该示例有效:
minizinc example.mzn
test
----------
==========
包含代码的example.mzn:
array[1 .. 2] of var int: D;
array[1 .. 2] of var int: F;
array[1 .. 2] of var int: S;
constraint forall (i in 1 .. 2) (S [i] = D [i] * F [i]);
var int: Cost = 1;
solve minimize Cost;
output ["test"];
所以它按预期显示“test”。