## Search found 54 matches

- 1 year ago
- Forum: Modeling
- Topic: Individual LP v.s. Integrated LP in GAMS
- Replies:
**6** - Views:
**1142**

### Individual LP v.s. Integrated LP in GAMS

Hi all, I have found an interesting characteristics in GAMS that it solves multiple simple LPs much slower than solving the integrated version of them. Here I show one illustrating example codes. I defined 27 simpe LP problems. Firstly I solved them individually with respect to the indices. Then I s...

- 1 year ago
- Forum: Modeling
- Topic: Can GAMS do random sampling from given dataset?
- Replies:
**2** - Views:
**483**

### 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 = su...

- 1 year ago
- Forum: Modeling
- Topic: Can GAMS do random sampling from given dataset?
- Replies:
**2** - Views:
**483**

### Can GAMS do random sampling from given dataset?

Hi experts, I am considering if I can define one random parameter, which can randomly pick one value from one dataset (assume stored in a parameter or table) each scenario. This can be also referred as sampling, and I know in stochastic programming GAMS can use EMS to do this. However, my goal here ...

- 1 year ago
- Forum: Syntax
- Topic: Stochastic Linear Programming - Multiple Randomness
- Replies:
**5** - Views:
**1020**

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

- 1 year ago
- Forum: Syntax
- Topic: Stochastic Linear Programming - Multiple Randomness
- Replies:
**5** - Views:
**1020**

### Re: Stochastic Linear Programming - Multiple Randomness

Thank you so much Lutz. I have solved this problem by using just a deterministic equivalent form, since it just involves a simple LP and discrete uncertainty. But still I have some questions regarding GAMS' Stochastic Programming (SP). Let me reply your answer first. 1. Yeah that is a typo...sorry f...

- 1 year ago
- Forum: Syntax
- Topic: Stochastic Linear Programming - Multiple Randomness
- Replies:
**5** - Views:
**1020**

### Re: Stochastic Linear Programming - Multiple Randomness

If it is needed, the model detail is as follows. Nothing but a simple linear programming problem. Positive Variables a1 a2 a3 a4 e1d1 e1d2 e1d3 e2d1 e2d2 e2d3 e3d1 e3d2 e3d3 e4d1 e4d2 e4d3 p1 p2 p3 p4; Scalars d1 /5/ d2 /4/ d3 /3/ ; Free Variable obj; Equations objj mxdemd budget capeq1 capeq2 capeq...

- 1 year ago
- Forum: Syntax
- Topic: Stochastic Linear Programming - Multiple Randomness
- Replies:
**5** - Views:
**1020**

### Stochastic Linear Programming - Multiple Randomness

Hi Experts, I am new to Stochastic Programming in GAMS, so sorry if this question is dumb. I have one small and simple linear programming problem with 16 variables and 9 constraints. Three of the 9 constraints have their right hand side parameters random, which are also obeying a discrete distributi...

- 1 year ago
- Forum: Modeling
- Topic: SMPS stochastic file in GAMS
- Replies:
**0** - Views:
**384**

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

- 1 year ago
- Forum: Syntax
- Topic: How to update parameters iteratively within a Loop?
- Replies:
**5** - Views:
**1167**

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

- 1 year ago
- Forum: Syntax
- Topic: How to update parameters iteratively within a Loop?
- Replies:
**5** - Views:
**1167**

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