Infeasibility Row Error

Problems with syntax of GAMS
Post Reply
arvindmarandi
User
User
Posts: 7
Joined: 3 months ago

Infeasibility Row Error

Post by arvindmarandi » 2 months ago

Warm Greeting GAMS Community,

I am new very new to GAMS and just started using it.

Here is my problem. Observe the following equation:

Code: Select all

Equation3(d,t,i)..  Vup(d,t,i) =e= Vup(d,t-1,i) + Dp(d,t,i) - Dg(d,t,i);
Symbol: d,t,i are sets.
Symbol: Vup, Dp, Dg are variable.

d,t,i are properly defined earlier in the code. And variables Vup,Dp and Dg are provided with their
upper and lower bound using variable attributes .lo .up.

After running this code, I am receiving the following error saying:

Code: Select all

Infeasibility row 'Equation3(1,1,p49)':  0  = 14.2.
Presolve time = 0.04 sec. (9.20 ticks)
The RHS of the equation is indeed 14.2 but why does the LHS variable (Vup) is not taking up the value.
Why I am getting '0 = 14.2' and infeasibility row error.

Kindly, any veteran user point out my mistake. What I have missed?

abhosekar
Moderator
Moderator
Posts: 273
Joined: 2 years ago

Re: Infeasibility Row Error

Post by abhosekar » 2 months ago

When you have t-1 on the RHS, GAMS does not produce an equation for t = 1 because t = 0 is not defined. You can check this by using option limrow = 1000; and by reducing the size of your sets.

This is a common type of equation in something like inventory balance.
It is important to pay attention to what happens at the boundaries. For example, what do you imagine this equation to be for t =1? is vup(d,t-1, i) defined?

Usually, the initial value is defined with the help of a parameter. say vup0(d, i). You can then rewrite your equation.

Code: Select all

Equation3(d,t,i)..  Vup(d,t,i) =e= Vup(d,t-1,i) $(ord(t) ge 1) + Vup0(d, i) $(ord(t) eq 1) + Dp(d,t,i) - Dg(d,t,i);
This way for t =1, you will have vup0 in the equation and for all other equations you will have vup.

I don't know what your sets look like so it is possible that you get this error because of some other set but the idea to debug it will be the same.
HTH.

- Atharv

Post Reply