Search found 72 matches

by GabrielYin
5 years ago
Forum: Modeling
Topic: Aggregate Parameter Indices
Replies: 3
Views: 3816

Aggregate Parameter Indices

Hi all, I have to use one parameter to store the following information: n variables, each variable can take Sn values. I have a toy example, 3 variables and each of them can take 1 or 2. The desired outcome should be like this: 1 1 1 1 1 2 1 2 1 1 2 2 2 1 1 2 1 2 2 2 1 2 2 2 It can be easily achieve...
by GabrielYin
5 years ago
Forum: Modeling
Topic: Is GAMS able to do parallel computing?
Replies: 2
Views: 4403

Re: Is GAMS able to do parallel computing?

Gabriel, You may be interested interested in a) The Grid and Multi-Threading Solve Facility for asynchronous submission and collection of models and their solutions https://www.gams.com/latest/docs/UG_GridComputing.html and b) The Gather-Update-Solve-Scatter (GUSS) to allow collections of similar m...
by GabrielYin
5 years ago
Forum: Modeling
Topic: Is GAMS able to do parallel computing?
Replies: 2
Views: 4403

Is GAMS able to do parallel computing?

Hi All, I am doing stochastic programming research but I am relatively new to GAMS. One interesting I have found in GAMS is when you model a large number of Linear Programming (LP) problems and try to solve it, it would build each individually and solve sequentially. This process will consume a lot ...
by GabrielYin
5 years ago
Forum: Modeling
Topic: Is there a GAMS formulation for the Response Time Variability Problem?
Replies: 1
Views: 2072

Re: Is there a GAMS formulation for the Response Time Variability Problem?

Hi Tobi, It is weird that in this image, the model is stated as MILP problem. However, the objective is not linear. If you can fix this issue, or use some other techniques like linear relaxation or second-order cone to "linearize" it, GAMS can surely handle this problem. Because it would b...
by GabrielYin
5 years ago
Forum: Modeling
Topic: Why does GAMS change binary variables to positive ones in a loop?
Replies: 3
Views: 3790

Re: Why does GAMS change binary variables to positive ones in a loop?

Hi, I am just curious if you have defined xa and xaa as binary variables, why you still need to set the lower/upper bound in your loop? Actually in SAA you only need to calculate the sampling expectation as lower bound and the replication expectation as upper bound to formulate the confidence interv...
by GabrielYin
6 years ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 5096

Re: Individual LP v.s. Integrated LP in GAMS

Gabriel, Please find a few comments below. 1) Even if you would have found *one* meaningful example (sorry that I doubt you did) where the solution of multiple simple LPs takes longer than the integrated large LP, deriving a general rule from a single observation seems like a hasty conclusion. 2) A...
by GabrielYin
6 years ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 5096

Re: Individual LP v.s. Integrated LP in GAMS

I got your point. Nevertheless here is still some way to let the user know the time consumption. This is just a tiny example and it should have been considered meaningless by GAMS system to show its time. I'll try a bigger one with millions of rows/columns to check the time. Thank you so much! Best,...
by GabrielYin
6 years ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 5096

Re: Individual LP v.s. Integrated LP in GAMS

Hi, why did you discard your first hypothesis ? If you look at the .lst file, you can see that the time is in fact spent in GAMS "execution" and "generation", rather than in the actual "solve" time (which is detailed as "resource use" of each solve. Check: ht...
by GabrielYin
6 years ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 5096

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

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