various values

Problems with syntax of GAMS
Post Reply
noob
User
User
Posts: 7
Joined: 4 months ago

various values

Post by noob » 4 months 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: 127
Joined: 1 year ago

Re: various values

Post by Renger » 4 months ago

Hi

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

myboundedinteger.UP = 5;
CHeers
Renger

Post Reply