迷你锌 'WARNING: model inconsistency detected'

MiniZinc 'WARNING: model inconsistency detected'

我已经收到此约束的模型不一致错误已有一段时间了,但无法弄清楚它出现的原因。我了解模型不一致错误是如何发生的,但无法找出为什么会发生在这里。非常感谢任何帮助。

int: n;
set of int: TEAMS=1..n;
array[int,int] of int: games;
set of int: pt={0,1,3};
set of int: numberOfGames=1..(length(games) div 2);
array[TEAMS] of var numberOfGames: num_losses;
array[numberOfGames, 1..2] of var pt: points;

constraint forall(i in TEAMS)(
  num_losses[i] = sum(j in numberOfGames where i=games[j,1]\/i=games[j,2])(
    if i=games[j,1] then
      (points[j,2] > 0)
    else
      (points[j,1] > 0)
    endif
  )
);

出现此问题是因为 num_losses 无法取值 0。您可以将新的零包含集定义为 set of int: numberOfGames0=0..(length(games) div 2) 并将 num_losses 重新定义为 array[TEAMS] of var numberOfGames0: num_losses;