Search found 108 matches

by cladelpino
1 year ago
Forum: Syntax
Topic: How can I force GAMS to compile this code in its written order?
Replies: 4
Views: 704

Re: How can I force GAMS to compile this code in its written order?

In fact, I want the first display Z.l shows the value "a" and the second display Z.l shows the value of "b". To make it more clear from my post and Gideon's: you can't . I think you missed my line opening the code example: Therefore, your code is actually executed in this way by gams: i.e. What we'...
by cladelpino
1 year ago
Forum: Syntax
Topic: dynamic growth syntax without max/min solve statement
Replies: 1
Views: 340

Re: dynamic growth syntax without max/min solve statement

(Using GAMS is overkill for this)

Perhaps

Code: Select all

display pop
is what you are missing ?
by cladelpino
1 year ago
Forum: Syntax
Topic: How can I force GAMS to compile this code in its written order?
Replies: 4
Views: 704

Re: How can I force GAMS to compile this code in its written order?

GAMS makes two different "passes" of the file when "preparing" the model, they are usually referred to as "compile" and "execution" phase or time. "compile" comes first, then "execution". As you can see in https://www.gams.com/latest/docs/UG_GDX.html $gdxin works at "compile" time, while "display" i...
by cladelpino
1 year ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 1150

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

The issue may not be so simple, look at this post by the great Michael Bussieck: https://forum.gamsworld.org/viewtopic.php?t=10080#p23097 But, as far as I understand, no, "Execution" in this context means GAMS execution, not the solver. From the page I linked: This is the time required for the secon...
by cladelpino
1 year ago
Forum: Modeling
Topic: Individual LP v.s. Integrated LP in GAMS
Replies: 6
Views: 1150

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: https://support.gams.com/gams:what_is_the_m...
by cladelpino
1 year ago
Forum: Syntax
Topic: Errors 654, 409, 148,125
Replies: 2
Views: 642

Re: Errors 654, 409, 148,125

First. Read https://www.gams.com/products/simple-example/ , you've got all your sum() operators syntax wrong. (this is your 148) Second. In equation cograde, it is written for every " i ". So, when you mean sum( (i,j), ... ) do you really mean " i " again, or do you mean sum(j,... (for the fixed " i...
by cladelpino
1 year ago
Forum: Syntax
Topic: index set control
Replies: 3
Views: 602

Re: index set control

I don't know VRP models and sincerely I can't understand from your description what this constraint is supposed to achieve. Do you mean: "If a vehicle arrives at a point p, it must also leave it" ? If so, this can be written as: arrAndDep(k,p).. sum(i$(not sameas(i,p)),x(i,p,k)) =e= sum(i$(not samea...
by cladelpino
1 year ago
Forum: Syntax
Topic: index set control
Replies: 3
Views: 602

Re: index set control

Hmm, this line is incorrect:

arrive(k).. sum((i,pp),x(i,pp,k)) - sum((p,j)$(p.val=pp.val),x(p,j,k))=e=0;

You don't have "control" of set pp at that point, more informally, which element of pp do you mean to appear ?

What is the constraint supposed to achieve ?
by cladelpino
1 year ago
Forum: Syntax
Topic: Getting error (rPower: FUNC DOMAIN: x**y, x < 0)
Replies: 4
Views: 974

Re: Getting error (rPower: FUNC DOMAIN: x**y, x < 0)

What do you think of this intrinsic function ?

signPower(x,Y)

It will get you the value of the real branch when it exists (which is your case).
by cladelpino
1 year ago
Forum: Modeling
Topic: Stuck at some tolerance value
Replies: 1
Views: 403

Re: Stuck at some tolerance value

Is this a MILP model ? Which solver are you using ?