Search found 38 matches
- 3 years ago
- Forum: Syntax
- Topic: Set Operations
- Replies: 8
- Views: 4372
Re: Set Operations
Now it works perfectly! Thank you
- 3 years ago
- Forum: Syntax
- Topic: Set Operations
- Replies: 8
- Views: 4372
Re: Set Operations
Yes, exactly. But unfortunately my code example does not work when I try to implement your solution. Something is wrong with the syntax. Here is my example: SET f_c_r(s,m,i,j); SET dummy_TS(i); SET fprojected(i) SET t(s,i); set f1(i); *To get i in fourth column f1(i) <= f_c_r; set f2(i); *To get i f...
- 3 years ago
- Forum: Syntax
- Topic: Set Operations
- Replies: 8
- Views: 4372
Re: Set Operations
I want to achieve that I automatically know which c is assigned to a dummy_TS and only the combinations I want to have in this set t(s,dummy_TS).
- 3 years ago
- Forum: Syntax
- Topic: Set Operations
- Replies: 8
- Views: 4372
Re: Set Operations
Hey Atharv, f(s,m,i,j) is not a function. It is a set. here a short example: set i respectively j: i.JPG set h(dummy_TS): h_dummy_TS.JPG set f(s,m,i,j): f.JPG The solution should be: t(s, dummy_TS) = /Bet.TransferB, Middlegate.terminalC_d, Alliance_Europe.terminalE_d, Top.TransferB, Top.TransferA) I...
- 3 years ago
- Forum: Syntax
- Topic: Set Operations
- Replies: 8
- Views: 4372
Set Operations
Hello all, I want to define a new set from two sets. In my example: s,m,i,j are sets alias(i,j) Of i and j there is a subset: dummy_TS(i) and dummy_TS(j) respectively defined sets: f(s,m,i,j) and h(dummy_TS) Now I want to define a new set: t(s,dummy_TS) s shall always be assigned to dummy_TS if at f...
- 3 years ago
- Forum: Syntax
- Topic: Equations with index
- Replies: 7
- Views: 3891
Re: Equations with index
Thank you It works great!
Janisch
Janisch
- 3 years ago
- Forum: API
- Topic: Feedback if GAMS code has been executed successfully
- Replies: 5
- Views: 11586
Feedback if GAMS code has been executed successfully
Hello all, Is there any way to find out if the optimization that I run from excel via a batch file has been successful, so there were no errors in the code execution in GAMS? I always see only the cmd window. But even if there is a syntax error in the code, it is not reported back to me. Maybe someo...
- 3 years ago
- Forum: Syntax
- Topic: Equations with index
- Replies: 7
- Views: 3891
Re: Equations with index
How can I explicitly optimize only one variable when calling the Solve command? This expression does not work.
Code: Select all
Model example /all/;
SOLVE example USING mip MINIMIZING Z("k1");
- 3 years ago
- Forum: Syntax
- Topic: Equations with index
- Replies: 7
- Views: 3891
Re: Equations with index
Great! Thanks for the tips
Fortunately the equations are not so complicated.
Fortunately the equations are not so complicated.
- 3 years ago
- Forum: Syntax
- Topic: Equations with index
- Replies: 7
- Views: 3891
Re: Equations with index
The comma was a typo.... Thanks for your help. I have not tested your solution yet. Have instead tried to solve it differently. If I'm not mistaken, the approach should also work or? SET k /"k1","k2","k3" table term(k,*) coefficients general f_inv k1 1 0 k2 1 1 k3 1 0 ;...