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/ .

I will simply do this:

Set t /1

10/7/

T1(t) / 1

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