Search found 26 matches

by Lutz
1 month ago
Forum: Syntax
Topic: Why should I use system.empty in a set
Replies: 1
Views: 108

Re: Why should I use system.empty in a set

Renger,

In general the system.empty is used to initialize an empty set and set its dimension (1 in this example) at the same time. But you are right, that it is actually not needed in this example.

Best regards,
Lutz
by Lutz
1 month ago
Forum: Syntax
Topic: Building super-sets
Replies: 2
Views: 142

Re: Building super-sets

Hi alodder, This is an excellent example for the use of the new GAMS feature called "implicit set definition": Sets food fruit(food<) / apple, orange / $onMulti veggie(food<) / carrot, tomato / ; Parameters FruitCost(fruit) / apple .99 orange .89 / VeggieCost(veggie) / tomato .63 carrot .83 /; Param...
by Lutz
4 months ago
Forum: Syntax
Topic: put_utilities does not work with several print control options
Replies: 2
Views: 160

Re: put_utilities does not work with several print control options

Hi, This is clearly a bug in the system (it happens with all settings for .pc which add quotes automatically). As a workaround you could set .pc=2 before the rename and set it back to 5 afterwards (note that I also used yearSim.tl in the rename command to actually generate different files, before yo...
by Lutz
6 months ago
Forum: Tools
Topic: GDXXRW - writing to excel - no header
Replies: 3
Views: 1043

Re: GDXXRW - writing to excel - no header

Hi,

if it is about getting the values into the right place, you might want to use the "merge" option of gdxxrw, like described here: https://www.gams.com/latest/docs/T_GDXX ... HEET_MERGE

Best,
Lutz
by Lutz
1 year ago
Forum: Modeling
Topic: Lindo error in stochastic programming
Replies: 2
Views: 343

Re: Lindo error in stochastic programming

Hi, I found a few (formatting) problems in your emp.info file: - You missed a line break before the last line - traffic_sc does not exist in the model, you should not mention it as stage 2 symbol - You did not name the random variables in the loop, but put in some numbers instead According to these ...
by Lutz
1 year ago
Forum: Modeling
Topic: Can GAMS do random sampling from given dataset?
Replies: 2
Views: 376

Re: Can GAMS do random sampling from given dataset?

Hi, You can try something like this: Set scen /s1*s5/; Parameter Dataset(scen) / s1 1.2 s2 3.4 s3 5.6 s4 7.8 s5 9.0 /; Scalar a,scenToPick; scenToPick = uniformInt(1,card(scen)); a = sum(scen$(ord(scen)=scenToPick),Dataset(scen)); Display scenToPick, a; scenToPick = uniformInt(1,card(scen)); a = sum...
by Lutz
1 year ago
Forum: Syntax
Topic: Stochastic Linear Programming - Multiple Randomness
Replies: 5
Views: 756

Re: Stochastic Linear Programming - Multiple Randomness

Now my question is, what actually does GAMS EMS solver solve, a mean-value problem? a deterministic equivalent problem? a wait-and-see problem? I am not really sure how EMS dictionary solve, especially for continuous distribution. Does EMS do sampling automatically if I call a dictionary to deal wi...
by Lutz
1 year ago
Forum: Modeling
Topic: Random sampling problem of Stochastic Programming
Replies: 2
Views: 440

Re: Random sampling problem of Stochastic Programming

Hi, There are some smaller issues in your model (e.g. "Option emp=lindo;" should be set before your solve statement and not afterwards), but I could not reproduce that "sample" is an unknown keyword. Maybe the GAMS version you are using is too old? "Sample" as keyword was introduced with GAMS 24.1.1...
by Lutz
1 year ago
Forum: Syntax
Topic: Stochastic Linear Programming - Multiple Randomness
Replies: 5
Views: 756

Re: Stochastic Linear Programming - Multiple Randomness

Gabriel, There are two problems which I found in your model: The first one is an easy one, probably just a typo: In the emp.info file you defined "randvar d2 ..." twice. I guess the second one should actually be "randvar d3 ...". The second problems seems to be deeper: You say that your model should...
by Lutz
1 year ago
Forum: Announcements
Topic: GAMS Distribution 25.1.0 (Beta Version) Announcement
Replies: 1
Views: 1005

GAMS Distribution 25.1.0 (Beta Version) Announcement

Hi GAMS Users, We would like to announce the availability of the GAMS Release 25.1.0 (Beta Version). This release contains the first public beta version of GAMS Studio - a completely new integrated development environment for GAMS. Please consult the beta release notes for details about GAMS Studio,...