I want to code the constraint (5) and (6) in the attached file and have some related questions .
Constraint5: forall( v in V, i in NPD_v[v], t in T ) x[<v,i,i>][t] //(<v,i,j> in Arc_vij) tuple * u[<v,i>][t] ==0; //(<v,i> in Arc_vi) tuple
This is a dot product of two variables, namely diagonal elements of x (i to i) and u (i) for every v and t.
My question is can OPL understands i must be equal i (i==i) just because I define indices as <v,i,i>. And, unfotunately OPL gives error during execution, what is the problem here, how can I solve it.
Constraint6: forall( v in V, i in NPD_v[v], t in T ) sum ( TMx-Tijv[<v,i,j>]..t+TW in T: (<v,i,j> in Arc_vij) ) x[<v,i,i>][t] <= TW;
Here my problem is how to define ranges. I try to write a code as above but it gives several problem and doesn't meet the actual range.
Note: A previous and more complete version of my code was posted in my previous message.