Hi all,
Quick, hopefully simple question regarding $GDXIN. I’m trying to write some code to load a pre-existing gdx file, modify it, and then save it. I noticed that when I use the GDXIN or GDXOUT commands in conjunction with the LOAD and UNLOAD commands, it seems to only keep the non-zero elements. For example, here is the transport problem with modified numbers:
Sets
i canning plants / seattle, san-diego /
j markets / new-york, chicago, topeka / ;
Parameters
a(i) capacity of plant i in cases
/ seattle 350
san-diego 0 /
b(j) demand at market j in cases
/ new-york 325
chicago 0
topeka 275 / ;
$GDXOUT “C:\Users\Brian\Documents\P*******\N**********\trnsprt_test.gdx”
$UNLOAD a
$UNLOAD b
$GDXOUT
If I then go File->Open->choose trnsprt_test.gdx, it displays the following:
a: seattle 350
b: new-york 325
topeka 275
Is this correct behavior for GAMS? What would I do if I wanted to modify it so that b(chicago)=15?
Thanks,
Brian
–
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/groups/opt_out.