Search found 38 matches
- 3 years ago
- Forum: Modeling
- Topic: Jacobian elements in the row are very small
- Replies: 2
- Views: 3770
Jacobian elements in the row are very small
Hi, I'm using the SBB solver as MINLP. in my model have some equations that the variables are very small, between [0.001 , 0.1]. So I use ".scale". But some equations still have this problem. Some equations have power lower than 1 (ex. var**0.47), so I change the equation to ( var1 **100 =...
- 4 years ago
- Forum: Syntax
- Topic: commercial diameter - declare
- Replies: 4
- Views: 3780
Re: commercial diameter - declare
Thanks!! that's right!! I understood and it is perfect! But Where should I declare this?? In Equation?? Like Equation eq1(n,nd) equation 1 eq2(n,nd) equation 2 ...; eq1(n,nd).. dr(n,nd)$(dcal(n,nd) gt 150 and dcal(n,nd) le 200.01) = 200; eq2(n,nd).. dr(n,nd)$(dcal(n,nd) gt 200 and dcal(n,nd) le 250....
- 4 years ago
- Forum: Syntax
- Topic: commercial diameter - declare
- Replies: 4
- Views: 3780
Re: commercial diameter - declare
My problem with the syntax in GAMS is how can I limit the result to being specific values, like for example: the result of the diameter should be 150mm, or 200mm or 250mm or 300mm or 350mm or 400 or 500. In my case the diameter is a variable, so reading the McCarl GAMS User guide I found two ways to...
- 4 years ago
- Forum: Archive Google Group
- Topic: trigonometric functions
- Replies: 8
- Views: 14044
- 4 years ago
- Forum: Archive Google Group
- Topic: trigonometric functions
- Replies: 8
- Views: 14044
Re: trigonometric functions
GAMS supports trigonometric functions. What are the functions you have problems with? Extrinsic functions are to implements your own functions. Best My problems is with this equation: * Diameter for each tube with flow dred(a).. dr(a) =e= vcPower((abc1(a)*man*qr(a)/sqrt(ir(a))),(3/8)); eq1(a).. abc...
- 4 years ago
- Forum: Archive Google Group
- Topic: trigonometric functions
- Replies: 8
- Views: 14044
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...
- 4 years ago
- Forum: Syntax
- Topic: problem with syntax of the equation
- Replies: 15
- Views: 18334
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...
- 4 years ago
- Forum: Syntax
- Topic: problem with syntax of the equation
- Replies: 15
- Views: 18334
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...
- 4 years ago
- Forum: Syntax
- Topic: Flow equation
- Replies: 3
- Views: 3522
Re: Flow equation
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?
- 4 years ago
- Forum: Syntax
- Topic: Flow equation
- Replies: 3
- Views: 3522
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...