How can I remember index and call it as the between function?

Problems with modeling
Post Reply
Agustino
User
User
Posts: 8
Joined: 1 year ago

How can I remember index and call it as the between function?

Post by Agustino »

image.png
image.png (13.87 KiB) Viewed 2001 times
How can I code these two constriants. It looks like the between function that we need to remember t value in the first constraint and then use this t value in the second constraint for termination. Suppose t /1*10/ .
Rodrigue
User
User
Posts: 36
Joined: 6 years ago

Re: How can I remember index and call it as the between function?

Post by Rodrigue »

I will simply do this:

Set t /1*10/
T1(t) / 1*7/
T2(t) /8*10/

Variable
S(I, J, t), e(I, J, t), y(I, J)
;

Equation
EQ1(I, J), EQ2(I, J)
;

EQ1(I, J).. Sum(t1, S(I, J, t1) =g= y(I, J);

EQ2(I, J).. Sum(t2, e(I, J, t2) =g= y(I, J);

Best regards,

Rodrigue
Post Reply