Search found 162 matches

by Fred
4 months ago
Forum: Syntax
Topic: How to Display values of all my Variables?
Replies: 1
Views: 169

Re: How to Display values of all my Variables?

Hi,

By default, the solution listing contains what you are asking for: https://www.gams.com/latest/docs/UG_GAM ... ionListing
You might also be interested in the display statement: https://www.gams.com/latest/docs/UG_Dis ... ement.html

I hope this helps!

Fred
by Fred
4 months ago
Forum: Modeling
Topic: Minimum Route
Replies: 3
Views: 274

Re: Minimum Route

Hi, First of all, the beauty of modeling languages like GAMS lies in its concise syntax which allows you to write compact indexed optimization models instead of huge incomprehensible scalar models. I assume your variables xij should be interpreted as "how often does the arc between nodes i and j nee...
by Fred
4 months ago
Forum: Modeling
Topic: Minimum Route
Replies: 3
Views: 274

Re: Minimum Route

Hi, Not sure if I fully understand what you are asking for. Sounds as if you want to compute a Hamiltonian path ( https://en.wikipedia.org/wiki/Hamiltonian_path ) and/or a Eulerian Path ( https://en.wikipedia.org/wiki/Eulerian_path )? It will increase your chances to get help if you elaborate your p...
by Fred
4 months ago
Forum: Syntax
Topic: Multi-thread computation
Replies: 2
Views: 244

Re: Multi-thread computation

Hi, Your last post might be confusing to readers because point 2. obviously does not apply to the example from this forum post where the readycollect function has a wait time (in contrast to the actual code you sent to support@gams.com). However, the absence of a wait time is not part of the problem...
by Fred
4 months ago
Forum: Modeling
Topic: help about an equation
Replies: 7
Views: 360

Re: help about an equation

Hi, A variable has several attributes: https://www.gams.com/latest/docs/UG_Variables.html#UG_Variables_VariableAttributes You need to specify which one you would like to use, e.g. x.l('1','3','2')=1; to set the variable's level to 1 or x.fx('1','3','2')=1; to fix the variable at 1 (upper and lower b...
by Fred
4 months ago
Forum: Modeling
Topic: help about an equation
Replies: 7
Views: 360

Re: help about an equation

Hi, As indicated in my previous post and by the first error message *** Error 145 in ...\new1.gms Set identifier or quoted element expected set elements must be quoted. After changing equation d to d(i,s).. 2*x(i,s,'2')+x(i,s+1,'1')+ x(i,s+1,'2') =l= 2; the model solves. I hope this helps! Fred
by Fred
4 months ago
Forum: Syntax
Topic: Using same as to comparing two dimensional parameter
Replies: 1
Views: 174

Re: Using same as to comparing two dimensional parameter

Lucas,

It would be much easier to help, if you would make sure that your posts are properly formatted, for example by using the "Preview" button.

Fred
by Fred
4 months ago
Forum: Modeling
Topic: help about an equation
Replies: 7
Views: 360

Re: help about an equation

Hi, Looks as if you want to refer to a particular set element explicitly in the third index position of x. In that case, set elements (aka labels) must be quoted. Helping you would become a lot easier if you share your code such that users can reproduce the exact issue. Just saying GAMS doesn't allo...
by Fred
4 months ago
Forum: Modeling
Topic: stochastic programming
Replies: 7
Views: 550

Re: stochastic programming

Hi, Not sure if I understand what you are asking for. Of course, sum(i, p(i,t)) can be greater than dataLP(t,'load')-pv, even for all realizations of random variable pv for example because you link subsequent time steps via Ramp1 and Ramp2 equations. Also not sure what is meant with after adding the...
by Fred
5 months ago
Forum: Syntax
Topic: Tell me
Replies: 1
Views: 243

Re: Tell me

Hi, you cannot go directly to the branch and bound method without solving the root node LP. If you would like to providea starting point, which is basically a (partial) integer feasible solution, you can do that by setting the level attribute .l of the variables before the solve statemment and instr...