how to remove part of a set Topic is solved

Problems with syntax of GAMS
Post Reply
cladelpino
User
User
Posts: 108
Joined: 7 years ago

Re: how to remove part of a set

Post by cladelpino »

It's better to think in positive terms in GAMS, in my experience.

ie
I want to remove elements in set B from set A
==> I want to create a set with elements in A not in B

Which is done in this way:

Code: Select all

set A /a1*a10/;
set B(A) /a1*a3/;
set C(A);

C(A)=YES;
C(B)=NO;
gl
Post Reply