Hi Shash
You can add the line
Acronym Grains, Rice;
Before your table and it should compile. But you must think carefully about what you want to do with your parameter before continuing.
Alternative it to use a multidimensional set:
Set G / grain, Rice /
Set ProductType(i,j,k,g)
/may.UP.Winter.Grains
july.HP.Summer.Rice
/;
Good luck
Arne
\
Arne Stolbjerg Drud
ARKI Consulting & Development A/S
Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark
Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of shash
Sent: Thursday, July 10, 2014 3:00 PM
To: gamsworld@googlegroups.com
Subject: Getting Real Number Expected Error
Hello all,
I am working on a project and want string values as parameters as compared to real numbers but seems like GAMS does not support this.
sets i /may,july,june/
j /UP,MP,HP/
k /Winter,Summer/;
Parameter ProductType(i,j,k)
/may.UP.Winter Grains
july.HP.Summer Rice
/;
So, can anybody please tell me if there is a way to pass string values in a parameter in GAMS.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.