bbeyza
1
Hello all,
I have diffuculties to code the equation in the image attached, I will appreciate if someone can help me.
My sets are:
I set of nodes
K set of all transportation modes
T set of time units
Alias (i, j, h)
Alias (k, m)
Parameter
𝛕ijk travel time(hour) from node i to node j with mode k
y and Iy are decision variables.
I don’t understand which variable you are referring to but you can add multiple indices to a variable
In your case
variable
y(i, i, k, t)
Iy(i, k, t)
;
should work since you have defined alias.
While defining summation, you have to index equation with i and the summation operator with some alias. For example,
constraint(i).. sum(h,...)