Hi,
Considering that I have two parameters:
Parameter1(a,b,c,"age")
Parameter2(a,b,c,"SiteIndex")
How can I create:
Parameter3(a,b,c,"age.SiteIndex")?
I mean, what I'm wondering is if there is a way of putting together both parameters creating a "unique" index, which I will use to extract value from a lookup table.
Ps.: I don't want to sum up both parameters, I simply want to "glue" them.
Any hints are more than welcome =)
Cheers,
Ana
How to create an index in GAMS Topic is solved
Re: How to create an index in GAMS
Hi Ana
You could just use one parameter:
or like this:
Cheers
Renger
You could just use one parameter:
Code: Select all
age(a,b,c) 'Your original parameter1',
siteIndex(a,b,c) 'Your original parameter2'
allstuff(a,b,c,*)
allstuff(a,b,c,"Age') = age(a,b,c);
allstuff(a,b,c,"siteIndex") = siteIndex(a,b,c);
Code: Select all
set d /"Age", "Index"):
parameters
age(a,b,c) 'Your original parameter1',
siteIndex(a,b,c) 'Your original parameter2'
allstuff(a,b,c,d)
allstuff(a,b,c,"Age') = age(a,b,c);
allstuff(a,b,c,"siteIndex") = siteIndex(a,b,c);
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist