【发布时间】:2016-04-22 21:07:06
【问题描述】:
我有这个小代码:
param n, integer, > 0; # number of clients
param m, integer, > 0; # number of facilities
param g, integer, > 0;
set I := 1..n;
set J := 1..m;
set G := 1..g;
param d{i in I, j in J};/* distance for client i to factory j*/
param w{i in I, j in J};/* distance for client i to factory j*/
param l{j in J}; # distance from factory j to factory 1
param F{j in J}; # cost of open a factory in J
param s{i in I, g in G};
问题出在 s 上,它总是说 drdrd.mod:13: syntax error in literal set ,如果我将 G 中的 g 更改为 J 中的 j,一切正常。不可能有3个不同的集合吗?
还有一个我无法解决的问题,如果我在 I 中输入 2 而不是 i(因为我想考虑前 2 个数字),它也会显示相同的错误消息。
感谢您的宝贵时间。
【问题讨论】: