bussieck wrote: ↑1 year ago Read up on conditional assignment in the following section: https://www.gams.com/latest/docs/UG_Con ... rOnTheLeft
-MichaelCode: Select all
dr.L (n,np)$arc(n,np) = 0.1;
Search found 38 matches
- 1 year ago
- Forum: Syntax
- Topic: Initial Value - Condition
- Replies: 2
- Views: 4793
Re: Initial Value - Condition
thank you very much.
- 1 year ago
- Forum: Syntax
- Topic: Initial Value - Condition
- Replies: 2
- Views: 4793
Initial Value - Condition
Dear, I need to specify the initial value of a variable, but it should only apply to the conditions that are presented in the table. SET n / n1 * n20 / nn (n,n) alias(n,np) TABLE arc(n,n) (GRAPH - ARCS and NODES) n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14 n15 n16 n17 n18 n19 n20 n1 n2 1 n3 1 n4 ...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Re: Negative exponential
Hi Steve, Thanks for your time. I have an equation (binary) that I use to select the direction flow, as you explained, using the example WATER and WATERX from GAMS Model Library. Probably my problem concerns the conditional flow equation. am, ir, rh and Q are variables and "mann" is a para...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Re: Negative exponential
Atharv, thanks again
Now I see, I"ll try this condition.
I used the BigM to a another equation, I hadn't thought of using this one too.
And a small number together.
I'm glad for your attention
Now I see, I"ll try this condition.
I used the BigM to a another equation, I hadn't thought of using this one too.
And a small number together.
I'm glad for your attention
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Re: Negative exponential
Thanks Atharv, I'm understanding a little more about GAMS. first thank you very much for your patience, So, I have a condition that I need to test, if the transport occurs from the node (n) to the (np), or the opposite (np,n). One of this 2 situations will occurs. The other will be zero, or not occu...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Re: Negative exponential
Yes, my Qi and Qf are positive variables. But in my problem I have to select the direction (binary variable) that if is 1 the Qi is the sum of the flow before of this pipe. So, some times Qi will be zero, if not ocorre the flow. 1) Should I add the binary variable in this equation? something like: E...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Re: Negative exponential
uote=abhosekar post_id=29253 time=1637252514 user_id=1684] what you show in equations and what you are writing in GAMS are two very different equations. Which one is right? Based on what you wrote, your equation should be ir =g= 0.0055*Qi**(-0.47) ir =l= 4.65*Qf**(-0.67) not sure how that translates...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 8584
Negative exponential
Hi I have an equation as ir >= 0,0055* Qi^(-0,47) ir <= 4,65 * Qf^(-0,67) ir (m/m) and Q (L/s) are variable. I tried to declare into the GAMS as: Equation: Slope1.. ir**15 * (Qi)**7 =g= 0.0055**15 Slope2.. ir**3 * (Qf)**2 =l= 4.65**3 ; But returns an error: "All Jacobian elements in the row are...
- 2 years ago
- Forum: Modeling
- Topic: Disjunctive programming with Big M approach
- Replies: 2
- Views: 2064
Re: Disjunctive programming with Big M approach
Hi,
I'm not sure how it could be helpful
Try this, using
X - variable
D - Parameter or constantly
y - binary
M - BigM
i and j - the SET.
I'm not sure how it could be helpful
Try this, using
X - variable
D - Parameter or constantly
y - binary
M - BigM
i and j - the SET.
Code: Select all
X(j)-D(i) =l= M*(1-y(i,j));
- 3 years ago
- Forum: Syntax
- Topic: Cost from table
- Replies: 1
- Views: 2342
Cost from table
Hi I'm with a problem, I don't know how to declare an equation to calculate the cost. I have to find a diameter, this diameter have a cost exemple: SET d /d1*d7 /; nn /n1.n2, n1.n3, n3.n1, n3.n2/; PARAMETERS dc(d) diam. comercial (m) / d1 0.100 d2 0.150 d3 0.200 d4 0.250 d5 0.300 d6 0.350 d7 0.400 /...