Search found 29 matches

by Lutz
1 month ago
Forum: Solvers
Topic: How to set the default solver for gams studio 27.3?
Replies: 2
Views: 119

Re: How to set the default solver for gams studio 27.3?

Hi,

This is currently not possible in Studio, but it is on the list for future improvements.

Here is some general information about changing the default solver: https://support.gams.com/solver:changin ... ult_solver

Best regards,
Lutz
by Lutz
1 month ago
Forum: Tools
Topic: Error Embedded Python Code - sqlalchemy
Replies: 1
Views: 1245

Re: Error Embedded Python Code - sqlalchemy

Hi,

As the error message indicates, you get the problem, since GAMS does not know the dimension of the symbol "sec" in your code. You can set it, for example, in the declaration like this to define "sec" as one dimensional set:

Code: Select all

Set
sec(*) sectors     
;
Hope that helps,
Lutz
by Lutz
8 months ago
Forum: Syntax
Topic: Why should I use system.empty in a set
Replies: 1
Views: 294

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
8 months ago
Forum: Syntax
Topic: Building super-sets
Replies: 2
Views: 385

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
11 months ago
Forum: Syntax
Topic: put_utilities does not work with several print control options
Replies: 2
Views: 350

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
1 year ago
Forum: Tools
Topic: GDXXRW - writing to excel - no header
Replies: 3
Views: 1310

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: 498

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: 573

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: 1149

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