Originally posted by: cpgt
I have two decision variables; (using c#)
IIntVar[] A = cp.IntVarArray(2, 0, 10);
IIntVar[] B = cp.IntVarArray(2, 0, 10);
I want to constraint the value B[0] to be equal to A[0] or A[1], like so;
cp.Add(cp.Eq(cp.Count(A, B[0]), 1));
Which I can't do, and get a compile error of "'cannot convert from ILOG.Concert.IIntVar' to 'int'"
How do I get the value of B[0], to use in constraining to values of A?. Or is there a better way to do what I'm trying to do? Thanks.
#CPOptimizer#DecisionOptimization