Search found 60 matches

by Lutz
4 years ago
Forum: Bugs
Topic: Can't Select Text Using Arrow Keys in GAMS Studio on Ubuntu
Replies: 6
Views: 11634

Re: Can't Select Text Using Arrow Keys in GAMS Studio on Ubuntu

Hi Viktor, I am sorry to hear that! We saw the same problem on some Fedora version in the past, but this got resolved by now. Back than this was caused by some AppImage incompatibility and the workaround was to compile Studio yourself on your platform and not to use the AppImage we provide. Is that ...
by Lutz
4 years ago
Forum: Solvers
Topic: How to set the default solver for gams studio 27.3?
Replies: 2
Views: 19435

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
4 years ago
Forum: Tools
Topic: Error Embedded Python Code - sqlalchemy
Replies: 1
Views: 4083

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
5 years ago
Forum: Syntax
Topic: Why should I use system.empty in a set
Replies: 1
Views: 2040

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
5 years ago
Forum: Syntax
Topic: Building super-sets
Replies: 2
Views: 2820

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 .8...
by Lutz
5 years ago
Forum: Syntax
Topic: put_utilities does not work with several print control options
Replies: 2
Views: 2466

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
5 years ago
Forum: Tools
Topic: GDXXRW - writing to excel - no header
Replies: 3
Views: 4580

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
6 years ago
Forum: Modeling
Topic: Lindo error in stochastic programming
Replies: 2
Views: 2732

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
6 years ago
Forum: Modeling
Topic: Can GAMS do random sampling from given dataset?
Replies: 2
Views: 3000

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