0

var float 配列の各要素がすべて異なるように制約する必要があるモデルがあります

グローバル alldifferent グローバル制約を使用しようとしましたが、次のエラーが発生します。

MiniZinc: type error: no function or predicate with this signature found: `alldifferent(array[int] of var float)'

そこで、 alldifferent 制約を次の理解に置き換えました。

constraint forall (i,j in 1..nVERTICIES where i<j) (X[i] != X[j]);

しかし、Geocode ソルバーを使用すると、次のエラーが発生します。

Error: Registry: Constraint float_lin_ne not found

G12 MIP ソルバーを使用すると、次のエラーが表示されます。

flatzinc: error: the built-in operation `float_lin_ne/3' is not supported by the MIP solver backend.

この制約をエンコードする別の方法はありますか?

4

2 に答える 2