Page 1 of 1

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

Posted: Sat Jan 27, 2024 6:22 pm
by Agustino
image.png
image.png (13.87 KiB) Viewed 2894 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/ .

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

Posted: Sun Mar 03, 2024 12:01 pm
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