How to sum an equation with index (i-1) in Gams?

Asked

Viewed 9 times

0

Hi, guys! I’m writing a program (Linear Programming Mixed Integer) that contains equations like the following:

   r2a(s,d,theta).. limitesuperior(s,d-1)*y4(s,d,theta) =l= sum(f,x1(f,s,d,theta));
   r2b(s,d,theta).. sum(f,x1(f,s,d,theta)) =l= limitesuperior(s,d)*y4(s,d,theta);
   r10(f,theta).. x4(f,theta-1) + sum((s,d),(x1(f,s,d,theta-tempoentregamp))) =l= sum(t$TarefaMP(t,f),sum(m$EquipTAREFA(m,t),sum(phi$SubperiodoTHETA(phi,theta),

However, I am getting an infactble solution and I believe it has to do with the cases of (d-1)" and "(theta-1)", when d=1 and theta=1, because my sets start at 1.

My sets:

      theta "period" /theta1*theta4/
      d "discount level" /d1*d5/

How can I fix this?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.