Originally posted by: Hosssein
Hi,
In my CP model, W is the set of variables.
could you please tell me how I can create the following expression?
(W[1]==1) && (W[2]==1) .... && (W[n]==1)
Note that I dont know the value of n beforehand, So I need to create it in a loop like below:
for (int i=1; i<=n ; i++){
Expression := Expression && (W[i]==1)
}
I could not do this by IloNumExpr. Could you please tell me what I have to do ?
Thanks in advance for your help.
#CPOptimizer#DecisionOptimization