Search found 57 matches

by GabrielYin
1 year ago
Forum: Modeling
Topic: SMPS stochastic file in GAMS
Replies: 0
Views: 493

SMPS stochastic file in GAMS

Hi All, I have a project with SMPS files illustrating a two-stage stochastic linear programming (2-SLP) problem, including cor. file representing the core model, tim. file representing the stages and stoc. file representing the stochastic terms. GAMS has a very friendly environment for 2-SLP like co...
by GabrielYin
1 year ago
Forum: Syntax
Topic: How to update parameters iteratively within a Loop?
Replies: 5
Views: 1615

Re: How to update parameters iteratively within a Loop?

Thank you sir, it worked as I expected. Why I could not get the same output before was I messed up with the iteration. Actually I had one set of parameters which should be returned to all 0 at the beginning of one iteration, and one set of parameters which are free. Both of the two sets of parameter...
by GabrielYin
1 year ago
Forum: Syntax
Topic: How to update parameters iteratively within a Loop?
Replies: 5
Views: 1615

How to update parameters iteratively within a Loop?

Hi All, Sorry for asking so many questions but I really need help. I tried to use iteratively updated parameters to do my algorithm, named Column and Constraint Generation, which has been enlightened by the Benders Decomposition. Then I am a little bit confused about how I can update my parameters f...
by GabrielYin
1 year ago
Forum: Syntax
Topic: How to refresh Dynamic Set within a Loop
Replies: 2
Views: 717

Re: How to refresh Dynamic Set within a Loop

Thank you very much! it worked perfectly!

Cheers! :D
by GabrielYin
1 year ago
Forum: Syntax
Topic: How to refresh Dynamic Set within a Loop
Replies: 2
Views: 717

How to refresh Dynamic Set within a Loop

Hi all, I got really confused about how dynamic sets work in the loop. I tried to use dynamic sets to make my iterative model more efficient, but when I checked the output, it failed. The following is how I defined my dynamic sets: Sets g_ava(g) dynamic set l_ava(l) dynamic set; g_ava(g)$(G_avail0(g...
by GabrielYin
1 year ago
Forum: Syntax
Topic: Stochastic Programming with multiple stochastic parameters
Replies: 2
Views: 750

Re: Stochastic Programming with multiple stochastic parameters

Hi Lutz, I had them obey the same discrete distribution. And I have found a solution, that GAMS can only recognize variables in all notations instead of set. So, I should write the codes as: $onput stage 1 y(’n1’) y(’n2’) stage 2 u(’n1’) u(’n2’) v(’n1’) v(’n2’) d(’n1’) d(’n2’) w(’m1’) w(’m2’) w (’m3...
by GabrielYin
1 year ago
Forum: Syntax
Topic: Stochastic Programming with multiple stochastic parameters
Replies: 2
Views: 750

Stochastic Programming with multiple stochastic parameters

Hi dudes, I have one problem with the SP in GAMS. When I run a simple code with multiple stochastic terms, denoted by n, such as d(n), the output returns "System Failure", which I could not identify what happened. Here is my part of stochastic definition: File emp / '%emp.info%' /; put emp '* proble...