我试图regular对 int var 的 2D 数组的每一行应用约束:
enum ROW;
enum COL;
enum VAR_ENUM;
array[ROW, COL] of var VAR_ENUM: sequence;
include "regular.mzn"
constraint forall(r in ROW)(regular(sequence[r], ... other regular parameters))
Run Code Online (Sandbox Code Playgroud)
我最终遇到了错误MiniZinc: type error: 2-dimensional array accessed with 1 expression。
有没有办法对二维数组进行切片?如果不是,我还能如何对大量数组变量应用常规约束?
| 归档时间: |
|
| 查看次数: |
1643 次 |
| 最近记录: |