Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下数组S:IntVar[]
S
IntVar[]
IntVar[] S = model.intVarArray("Flights Schedule", 18, 0, 19);
我也有以下ArrayList,Integer称为fromHome:
ArrayList
Integer
fromHome
ArrayList<Integer> fromHome = [1, 2, 4];
fromHome稍后在程序中派生。
我想将域限制为S[0]仅包含其中的值,而不包含fromHome其他任何内容。我怎样才能做到这一点?谢谢!
S[0]
我找到了一种使用member约束的方法,如下所示:
member
model.member(S[0], from_home).post();