INTEGER PARAMETERS

Problems with syntax of GAMS
Post Reply
kalkur2
User
User
Posts: 7
Joined: 4 years ago

INTEGER PARAMETERS

Post by kalkur2 »

Hi All,

I write paramater to use other parameters but ıt has to be ınteger. How can I define in gams ?

parameter
b(ir) ;
b(ir)=c(ir)*s(ir)/h ;
integer b(ir)

I try this but see error. I wanna make integer b(i)
Thank you,
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: INTEGER PARAMETERS

Post by bussieck »

Use round, ceil or floor (see e.g. https://www.gams.com/latest/docs/UG_Par ... s_22_round): b(ir)=round(c(ir)*s(ir)/h);

-Michael
Raga
User
User
Posts: 3
Joined: 4 years ago

Re: INTEGER PARAMETERS

Post by Raga »

Hi all of you
I think you would type the ; to end the statement.
Post Reply