Topic
  • 1 reply
  • Latest Post - ‏2012-10-11T07:48:17Z by arguen
arguen
arguen
23 Posts

Pinned topic Help in dot products and defining range.

‏2012-10-09T20:41:02Z |
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 ( 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.

Thank you.
arguen

Note: A previous and more complete version of my code was posted in my previous message.
Updated on 2012-10-11T07:48:17Z at 2012-10-11T07:48:17Z by arguen
  • arguen
    arguen
    23 Posts

    Re: Help in dot products and defining range.

    ‏2012-10-11T07:48:17Z  
    I found solutions.