Hello,
I’m relatively new to GAMs and have managed to get myself confused in trying to create some double-dash parameters. Apologies in advance if I am just missing something obvious…
The issue is this: right now I am feeding the model data through $gdxrrw and $gdx in over an excel sheet, however it would be optimal for database management purposes to skip the excel procedure entirely. I recently stumbled across double-dash parameters, which seems like it could potentially solve the issue and have written the following (in a .gms file):
set g goods /good1, good2/;
set h households /hh1, hh2/;
parameter consumed(g,h) the quantity consumed of good “g” by household “h”.
Next, I was hoping to create a python script that would enter the values for each of the 4 combinations possible:
call gams filename --consumed(good1, hh1)=100, --consumed(good2, hh1)=200, --consumed(good1, hh2)=100, --consumed(good2, hh2)=200
However, it is not clear to me how this would work. The manual states that I should have defined the variables in GAMs as something akin to:
parameter consumed(“%g%”,“%h%”)=%value%;
However, this doesn’t work as %g% isn’t defined. What am I missing here? Thanks!