Search found 18 matches

by achristensen
4 years ago
Forum: Tools
Topic: using GDXXRW on Linux Ubuntu
Replies: 1
Views: 3133

Re: using GDXXRW on Linux Ubuntu

there isn't a way to do this. I might suggest using python to read the excel file (the openpyxl package will work). then you can write a gdxfile with the gdxtools package

Code: Select all

pip install gdxtools
Example file: https://github.com/boxblox/gdxtools

best,
adam
by achristensen
4 years ago
Forum: Tools
Topic: Alternatives to NEOS?
Replies: 2
Views: 4089

Re: Alternatives to NEOS?

It kinda sounds like you are using gams to do scripting? This seems a bit off topic for the forum, but I like being helpful... if you are just doing a bunch of data manipulation you might want to go into a python environment and work there... or if you have a massive dataset you could put it all int...
by achristensen
4 years ago
Forum: Tools
Topic: Get a MPS file using NEOS/GAMS web interface
Replies: 1
Views: 3197

Re: Get a MPS file using NEOS/GAMS web interface

Hi Omidi, I am not as clear on why you would need an MPS file... but NEOS is a great tool... so this is worth figuring out. I typically engage with NEOS through the Kestrel 'solver' rather than their webforms. https://www.gams.com/latest/docs/S_KESTREL.html By using Kestrel the gams model is package...
by achristensen
4 years ago
Forum: Syntax
Topic: Loading 4D Tables
Replies: 2
Views: 2472

Re: Loading 4D Tables

Hi there ayledith, If you are familar with python you can use a tool I wrote to get data into a GDX and then you can load that data into a gams model through a $GDXIN statement... gdxtools can be installed with pip install gdxtools an example file of several different read/write operations can be fo...
by achristensen
4 years ago
Forum: Syntax
Topic: How to write this constraint
Replies: 4
Views: 3542

Re: How to write this constraint

hi there... i think we might need a bit of clarifying information here to help out. Do you have a superset that includes all elements j+n? Or are you trying to do some sort of circular lead/lag operation? If so, check out the documentation here: https://www.gams.com/latest/docs/UG_OrderedSets.html (...
by achristensen
4 years ago
Forum: Wishes
Topic: Is there a way to improve gams graphical interface
Replies: 2
Views: 49707

Re: Is there a way to improve gams graphical interface

If you use the Atom editor to write gams code (and run things in the terminal) there is some nice syntax highlighting built into the language_gams package (https://github.com/xhokir/atom-language-gams). it doesn't get everything but I find it really helpful.
-- adam
by achristensen
4 years ago
Forum: Archive Google Group
Topic: SOLVE statement in a loop
Replies: 4
Views: 9639

Re: SOLVE statement in a loop

I suspect that you might not be redefining your original parameter within the loop

something like:

PARAMETER sample(iter);
*create some fake parameter to sample from
sample(iter) = uniform(0,1);

loop(iter,
my_original_parameter = sample(iter);
SOLVE my model....
);

does that help?
best,
adam
by achristensen
4 years ago
Forum: Syntax
Topic: How to remove records from a table using values in a parameter
Replies: 1
Views: 1618

Re: How to remove records from a table using values in a parameter

Hi eisenhee, No problem about being new to GAMS! It's important to note that a table and a parameter are the same thing... just a slightly different syntax for entry. Tables are really helpful for 2D data, but can get a bit messy with higher dimensional data. I have gotten in the habit of just using...