Search found 15 matches

by henryhu.89
1 year ago
Forum: Syntax
Topic: Question on double-dash parameters and the $call command
Replies: 2
Views: 2469

Re: Question on double-dash parameters and the $call command

Ah! That makes sense, I guess I need to tell GAMs to pass on these variables in the subsequent "$call" command. Thanks for the tip, this was helpful!
by henryhu.89
1 year ago
Forum: Syntax
Topic: Question on double-dash parameters and the $call command
Replies: 2
Views: 2469

Question on double-dash parameters and the $call command

Hello, I have been trying to use a .bat file with double-dashed parameters to execute a series of models (say, model1, model2 & model3). In addition, I wrote a shell program to execute the 4 models in sequence: $call '"E:\GAMS\36\gams.exe" folder1/model1.gms' $call '"E:\GAMS\36\ga...
by henryhu.89
2 years ago
Forum: Modeling
Topic: Seeking help for strange behavior of multiple solves of a model
Replies: 2
Views: 1345

Re: Seeking help for strange behavior of multiple solves of a model

Thanks for the confirmation and your time! Yes, I have considered using a .bat file with double dashed variables, however, this is unfortunately a collaborative project and I have no control over the .bat files (so I need to adapt my model to whatever it gives me). Outside of a .bat file solution wi...
by henryhu.89
2 years ago
Forum: Modeling
Topic: Seeking help for strange behavior of multiple solves of a model
Replies: 2
Views: 1345

Seeking help for strange behavior of multiple solves of a model

Hello, I have set up small economic model where I feed it inputs via a .gdx file and seek to execute the model 4 times in total. This is because the model is the same for 4 regions, and the .gdx file I've generated through stata-python contains the required inputs for all 4 regions in one file. What...
by henryhu.89
2 years ago
Forum: Syntax
Topic: How to Augment existing pre-defined sets
Replies: 7
Views: 3072

Re: How to Augment existing pre-defined sets

Hello Michael, Thanks again for the pointers! The reason the .gdx is as it is is that my collaborator generated the file that way (though I have inputs and will likely change to your suggestions, or simply just generate 4 .gdx's). The python code example looks very useful! If I understand correctly,...
by henryhu.89
2 years ago
Forum: Syntax
Topic: How to Augment existing pre-defined sets
Replies: 7
Views: 3072

Re: How to Augment existing pre-defined sets

I have the code that generates the .gdx, so I was hoping to pass one more input to it (e.g, region==A/B/C/D), then once the data is loaded using that region variable to drop things from the "h" set that don't belong. However, since I can't kick items out of a set that is a domain, that mig...
by henryhu.89
2 years ago
Forum: Syntax
Topic: How to Augment existing pre-defined sets
Replies: 7
Views: 3072

Re: How to Augment existing pre-defined sets

Hello Michael, Thanks so much for the assistance! Yes that makes sense to me, I didn't realize I could pre-define the set as a filter; this is an elegant solution, as opposed to other methods I have been trying. However, I'd still like to compare and contrast a few different solutions (ideally not i...
by henryhu.89
2 years ago
Forum: Syntax
Topic: How to Augment existing pre-defined sets
Replies: 7
Views: 3072

How to Augment existing pre-defined sets

Hello, I have been working on a project in GAMs and encountered an issue and was hoping that dynamic sets would help me deal with this: 1.) So I have a .gdx file of data for four regions, indexed A, B, C and D. Within each region there are 3 groups (like household types, 3 income categories etc.,), ...
by henryhu.89
2 years ago
Forum: Modeling
Topic: Matching 2 sets in a loop, in sequence
Replies: 4
Views: 2392

Re: Matching 2 sets in a loop, in sequence

Thanks so much for the tips! I'll definitely look into the embedded python, it seems like a handy tool.
by henryhu.89
2 years ago
Forum: Modeling
Topic: Matching 2 sets in a loop, in sequence
Replies: 4
Views: 2392

Re: Matching 2 sets in a loop, in sequence

Hello Michael, Thanks for the reply! Currently, we are passing data to a model using 2 excel sheets (using GDXRRW to convert to .gdx and then read into GAMs), one for large amounts of data (from a data set) and one to control model parameters. It's the model parameter excel file I am trying to repla...