Iam using latest version of opl and i have a question i have never tought about it before.
Lets assume i have a 2 dim binary decision variable X_ij (i and j is from same set/range)
This would be the code piece to define the decision variable...
range j=1..nbJobs;// I dont really need this, i could have declared dvar int+ x[i][i] in 0..1;
dvar int+ x[i][j] in 0..1;
But with these piece of code I am also creating these decision variables which i dont want(X11,X22,X33....X1010)
How can i improve this declaration? How can i put logical constraint during variable declaration such as i!=j
(So actually i dont want to say forall ij : i==j -->Xij== 0 in the constraints)
Thank you very much for your advise.