Pinned topicHelp in dot products and defining range.
20121009T20:41:02Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Hi all,
I want to code the constraint (5) and (6) in the attached file and have some related questions .
Q1:
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.
Q2:
Constraint6: forall( v in V, i in NPD_v[v], t in T ) sum ( TMxTijv[<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.
Thank you.
arguen
Note: A previous and more complete version of my code was posted in my previous message.
Hi all,
I want to code the constraint (5) and (6) in the attached file and have some related questions .
Q1:
<pre class="jivepre">
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
</pre>
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.
Q2:
<pre class="jivepre">
Constraint6: forall( v in V, i in NPD_v[v], t in T ) sum ( TMxTijv[<v,i,j>]..t+TW in T: (<v,i,j> in Arc_vij) ) x[<v,i,i>][t] <= TW;
</pre>
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.
Thank you.
arguen
Note: A previous and more complete version of my code was posted in my previous message.