Originally posted by: HuiD
Hi, I'm trying to write one of the constraints, one decision variable decide another decision variable.
dvar boolean x[u in RV][v in RV][t in dem];
dvar int z[u in RV][t in dem] in 1..N;
subject to {
forall(t in dem, u in RV) {
forall(v in OL[u]) {
if(x[u][v][t] == 1)
z[t][u] == z[t][v] + 1;
}
}
}
there will be an error "decision variable ’x' is node allowed."
How can I write these constraints properly? The variable z cannot be compute by the input matrix, but decide by the decision variable x.
Thanks
#DecisionOptimization#OPLusingCPLEXOptimizer