## Search found 10 matches

2 months ago
Forum: Syntax
Topic: Flow equation
Replies: 3
Views: 1135

### Re: Flow equation

Using this expretion

Code: Select all

``Q(m,n) = sum(am\$(ord(am) < ord(m)+1),  Q(am-1,n)X(am-1,n))``
Q(m,n) and Q(am-1,n)

GAMS will use the same matrix of data, in this case, will use the same matriz of the flow data?
2 months ago
Forum: Syntax
Topic: Flow equation
Replies: 3
Views: 1135

### Flow equation

Hi, I'm trying to write a code to calculate the flow of a snippet. The section should receive the flow of the previous sections. But my problem is the matrix "q(n,np)" depends on itself. Apresentação1.jpg Set n nodes / n1 * n48 / a(n,n) arcos / n1.(n2,n9), n2.(n1,n3), n3.(n2,n4), n4.(n3,n5,n10), n5....
3 months ago
Forum: Syntax
Topic: commercial diameter - declare
Replies: 1
Views: 231

### Re: commercial diameter - declare

Special Features for Mathematical Programs:
https://www.gams.com/latest/docs/UG_Lan ... tures.html
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### Re: problem with syntax of the equation

I'd like to know if GAMS undestand this situation ... n nodes / n1 * n48 / a(n,n) /..../; .... alias(n,np,i,j); ... q(n) - scalar q(a) - variable ... eq1(a(i,j)).. q(a(n,np)) =e= sum(q(a(n,np)\$(np=i)) + q(n) GAMS understand : eq(i) eq(i,j) but GAMS undestand: eq(a(i,j)) ??? my objective is to elabo...
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### Re: problem with syntax of the equation

Renger wrote:
3 months ago
Hi

It is not clear what you want to do with this equation. My advice: write it down as a proper mathematical expression, read how to use the sum in GAMS as well as the \$-sign, and proceed from there.

Cheers

Renger
GAMS understand :
eq(i)..
eq(i,j)..

but GAMS undestand:
eq(a(i,j)).. ???
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### Re: problem with syntax of the equation

I'd like to know if GAMS undestand this situation ... n nodes / n1 * n48 / a(n,n) /..../; .... alias(n,np,i,j); ... q(n) - scalar q(a) - variable ... eq1(a(i,j)).. q(a(n,np)) =e= sum(q(a(n,np)\$(np=i)) + q(n) GAMS undestand eq(i) and eq(i,j) but GAMS undestand eq(a(i,j)) ??
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### Re: problem with syntax of the equation

I'd like to know if GAMS undestand this situation ... n nodes / n1 * n48 / a(n,n) /..../; .... alias(n,np,i,j); ... q(n) - scalar q(a) - variable ... eq1(a(i,j)).. q(a(n,np)) =e= sum(q(a(n,np)\$(np=i)) + q(n) GAMS understand : eq(i) eq(i,j) but GAMS undestand: eq(a(i,j)) ??? my objective is to elabor...
3 months ago
Forum: Syntax
Topic: commercial diameter - declare
Replies: 1
Views: 231

### commercial diameter - declare

Hi, I have a problem where I have to calculate the diameter of a pipe, using the equations I will find the diameter value that is a decimal number. But the diameter I will use is the commercial value, always selecting the next commercial size of the value found by the equations. Then I must analyze ...
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### Re: problem with syntax of the equation

Renger wrote:
3 months ago
Looks fine, and as long as you have at least as many equations as variables in your model, there is nothing wrong with using an implicit definition of this variable.
Cheers
Renger
Thanks a lot.
3 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 12
Views: 843

### problem with syntax of the equation

I'm new with optimization and GAMS. I not sure how to declare the Manning equation. This equation describe the flow dynamic on free flow condition, considering geometry and viscosity. I declared scalar and variables as: man manning coef / 1.30e-2 / q(n,n) flow (m**3 per s) ir(n,n) inclination (m per...