various values

Problems with syntax of GAMS
Post Reply
noob
User
User
Posts: 7
Joined: 1 week ago

various values

Post by noob » 4 days ago

i was wondering how can a decision variable like X get its value from a set like {1,2,3,4,5}

i know its kind of basic but i am new to gams so...

any kind of help is much appreciated

User avatar
Renger
Posts: 87
Joined: 1 year ago

Re: various values

Post by Renger » 3 days ago

Hi

Just use an upper bound for your integer variable.
integer variable
myboundedinteger;

myboundedinteger.UP = 5;
CHeers
Renger

Post Reply