Search found 29 matches

by Lutz
1 year ago
Forum: Modeling
Topic: Random sampling problem of Stochastic Programming
Replies: 2
Views: 689

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

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

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,...
by Lutz
1 year ago
Forum: Syntax
Topic: Stochastic Programming with multiple stochastic parameters
Replies: 2
Views: 731

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

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

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
2 years ago
Forum: Syntax
Topic: Piecewise Non-Linear Function
Replies: 1
Views: 915

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

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

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

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