Code: Select all

`Q(m,n) = sum(am$(ord(am) < ord(m)+1), Q(am-1,n)X(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**

Using this expretion

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?

Code: Select all

`Q(m,n) = sum(am$(ord(am) < ord(m)+1), Q(am-1,n)X(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**

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

I founded the answer:

Special Features for Mathematical Programs:

https://www.gams.com/latest/docs/UG_Lan ... tures.html

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

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

GAMS understand :

eq(i,j)..

but GAMS undestand:

- 3 months ago
- Forum: Syntax
- Topic: problem with syntax of the equation
- Replies:
**12** - Views:
**843**

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

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

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

Thanks a lot.

- 3 months ago
- Forum: Syntax
- Topic: problem with syntax of the equation
- Replies:
**12** - Views:
**843**

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