How to exclude a value

Problems with syntax of GAMS
Post Reply
williamss97
User
User
Posts: 2
Joined: 2 years ago

How to exclude a value

Post by williamss97 »

Hello everyone, i need to know how to exclude a value in gams; i need to exclude the firts element of j to the equation below

Set
i 'type of oil' /i1*i5/
j 'months' /j1*j6/;

Equation

Balance( i , j );

Balance( i , j ).. A(i, j-1) + B(i,j) =e= D(i,j) + E(i,j);

I need to exclude j1, so the equation only evaluates j2,j3,j4,j5,j6. Please help

Thanks in advance
cnbrksnr
User
User
Posts: 13
Joined: 4 years ago

Re: How to exclude a value

Post by cnbrksnr »

Try this:

Balance( i , j )$(j.pos > 1).. A(i, j-1) + B(i,j) =e= D(i,j) + E(i,j);
Post Reply