Originally posted by: fahimeh
hello.
I want to define an a decision variable (a[i][j]), but when i define it, in this way
using CP;
range R=0..3;
range Rm=1..3;
range Round =1..4;
dvar int a[R][R] in 0..1;
dvar int tmp [R] in 0..1;
dvar int b[R][R] in 0..1;
minimize
sum (i,j in R) a[i][j]+b[i][j];
subject to {
forall( i in R){
forall( j in R){
c= (i+j)%4;
tmp[j]=a[i][c];
}
forall( j in R){
a[i][j]=tmp[j];
}
}
forall(i in R) {
forall (j in R){
a[i][j]+b[i][j] >=1
}
}
}
it makes this error " Type syntax error, unexpected ="
would you please tell me if i want to shift decision variable,what code i should write?
thank
#DecisionOptimization#OPLusingCPOptimizer