Search found 13 matches

by Alexanre.ito
16 hours ago
Forum: Archive Google Group
Topic: trigonometric functions
Replies: 3
Views: 816

Re: trigonometric functions

Hi, I was studding in how to implement trigonometric functions. I founded this site, about Extrinsic Functions. https://www.gams.com/latest/docs/UG_ExtrinsicFunctions.html#UG_ExtrinsicFunctions_BuildYourOwn-TrigonometricLibraryExample I need to use the angle with radian unit. So at GAMS website they...
by Alexanre.ito
6 days ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

Re: problem with syntax of the equation

Yes, you're right I need to improve!! I need this lower bound, during the calculation. But the diameter need to be Zero, when is not allowed a tube, in other words, when flow is Zero, the diameter is zero too. Hi, You set a lower bound of 0.15 for d(n1 .n5): d.lo(n,np)$a(n,np) = dmin; Hence, it cann...
by Alexanre.ito
6 days ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

Re: problem with syntax of the equation

I'm developing a simple problem of water transport. But I need a help, someone please could help me. In my code the flow conservation equation at each node, is working. (I'm using waterx.gms as reference). But I need a code that exclude tubes which have zero flow. I tried to multiply by the binary h...
by Alexanre.ito
5 months ago
Forum: Syntax
Topic: Flow equation
Replies: 3
Views: 1217

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?
by Alexanre.ito
5 months ago
Forum: Syntax
Topic: Flow equation
Replies: 3
Views: 1217

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....
by Alexanre.ito
5 months ago
Forum: Syntax
Topic: commercial diameter - declare
Replies: 1
Views: 301

Re: commercial diameter - declare

I founded the answer:
Special Features for Mathematical Programs:
https://www.gams.com/latest/docs/UG_Lan ... tures.html
by Alexanre.ito
6 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

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...
by Alexanre.ito
6 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

Re: problem with syntax of the equation

Renger wrote:
6 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)).. ???
by Alexanre.ito
6 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

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)) ??
by Alexanre.ito
6 months ago
Forum: Syntax
Topic: problem with syntax of the equation
Replies: 15
Views: 1167

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