Search found 14 matches

by achristensen
6 months ago
Forum: Syntax
Topic: How to write this constraint
Replies: 4
Views: 431

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
6 months ago
Forum: Wishes
Topic: Is there a way to improve gams graphical interface
Replies: 2
Views: 11975

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
6 months ago
Forum: Archive Google Group
Topic: SOLVE statement in a loop
Replies: 4
Views: 1942

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
6 months ago
Forum: Syntax
Topic: How to remove records from a table using values in a parameter
Replies: 1
Views: 253

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...