Search found 26 matches

by Lutz
1 year ago
Forum: Syntax
Topic: Stochastic Programming with multiple stochastic parameters
Replies: 2
Views: 595

Re: Stochastic Programming with multiple stochastic parameters

... randvar d(n) discrete 0.25 70 0.5 100 0.25 130 ... Then how could I establsih a multi-randomness model? In my case, I have two variables which both obey the discrete distribution. ... Hi, First to make sure, that I understand what you want to do: You mention two variables which follow the discr...
by Lutz
1 year ago
Forum: Syntax
Topic: The .fx variable attribute: Dumb question
Replies: 1
Views: 943

Re: The .fx variable attribute: Dumb question

Hi, About q1: It is correct, that .fx also sets .l (in contrast to setting .lo and .up separately). About q2: I don't know where exactly you found the things you quoted here from the documentation, but I just searched for the fx attribute and found this (https://www.gams.com/latest/docs/UG_Variables...
by Lutz
1 year ago
Forum: Modeling
Topic: Joint random variable sampling not work?
Replies: 1
Views: 493

Re: Joint random variable sampling not work?

Hi,

Could you post your model? Then it would be easier to help.

Best regards,
Lutz
by Lutz
1 year ago
Forum: Syntax
Topic: Piecewise Non-Linear Function
Replies: 1
Views: 798

Re: Piecewise Non-Linear Function

Hi,

Maybe this model from the GAMS Test Library gives you a good starting point:

https://www.gams.com/latest/testlib_ml/ ... lib01.html

Best,
Lutz
by Lutz
2 years ago
Forum: Modeling
Topic: Stochastic Programming: pre-sampled discrete random VECTOR
Replies: 1
Views: 836

Re: Stochastic Programming: pre-sampled discrete random VECTOR

Hi,

You need to use the emp keyword "jrandvar". Here is an example where this is used:

https://www.gams.com/latest/emplib_ml/l ... joint.html

More general information can be found here:

https://www.gams.com/24.9/docs/UG_EMP_SP.html

I hope that helps,
Lutz
by Lutz
2 years ago
Forum: Modeling
Topic: Daily subsets of annual data
Replies: 2
Views: 851

Re: Daily subsets of annual data

Hi, One way to do this, is using the "mod" function together with the "ord" operator: set t hours of a year /t1*t8760/; * Init everything to 5 parameter P_el(t) electricity price /#t 5/; * Set peak hours to 10 P_el(t)$(mod(ord(t),24)>=7 and mod(ord(t),24)<=18 ) = 10; If you need more structure about...
by Lutz
2 years ago
Forum: Solvers
Topic: GAMS vs Matlab vs Modelica
Replies: 2
Views: 1410

Re: GAMS vs Matlab vs Modelica

Hi, here are two simple power models (but that are probably the ones you found already): https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_magic.html https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_turkpow.html There is also a (very simple) CHP model packed into an Excel application: htt...
by Lutz
2 years ago
Forum: Tools
Topic: How to enable solver output when using Grid GAMS
Replies: 2
Views: 1284

Re: How to enable solver output when using Grid GAMS

Hi, When you use Grid, the Solver log is suppressed by default, since it would be all mixed if you have many solves in parallel. However, you can instruct GAMS to write the log to a file, which would also cause the solver log to be written to a file (better: to separate files for each solve). To do ...
by Lutz
2 years ago
Forum: Syntax
Topic: LXI File
Replies: 2
Views: 990

Re: LXI File

Hi Javaelx, The lxi file contains information to navigate through the lst file when using the GAMSIDE. So by default it is created only, when you start your model from the GAMSIDE. However, you can mimic this behavior on the command line, when you set the command line option "IDE=1", so gams mymodel...
by Lutz
2 years ago
Forum: Modeling
Topic: Projected
Replies: 1
Views: 1048

Re: Projected

Renger, This is about the solution reading of GAMS. If the solver return a level of a variable, which is close to one of its bound (where "close to" can be controlled by the mentioned model attribute tolProj, the default is 1e-8), GAMS "projects" this value to the bound, so reports the bound value i...