no in my problem I am using
eq(i)..sum((k,t),a.l(k,i,t))=l=b(i);
tell me the use of relational operator within the loop is possible or not.
If not possible then please tell me any alternate way to solve this problem.
Thanks
Garvis Garg
Search found 5 matches
- 6 years ago
- Forum: Syntax
- Topic: relational operators within GAMS
- Replies: 6
- Views: 7113
- 6 years ago
- Forum: Syntax
- Topic: relational operators within GAMS
- Replies: 6
- Views: 7113
relational operators within GAMS
Hi all, Please tell me, can we use relational operators within loop in GAMS. Please refer following code: loop(k, loop(i, loop(t, a.l(k,i,t)=l=b(i); ); ); ); where k,i,t are sets while a (k,i,t) is variable and b(i) is parameter. Thanks Garvis Garg
- 6 years ago
- Forum: Syntax
- Topic: excel to gams
- Replies: 12
- Views: 21380
excel to gams
Hello, I want to retrieve my data from excel to gams by following this code. set t /1*48/; parameter ac(t) $call gdxxrw.exe acforecasted.xls par=ac rng=sheet1!a1 $gdxin acforecasted.gdx $load ac $gdxin display ac but here error 492 and 141 are occurred then please tell me what is the mistake in this...
- 6 years ago
- Forum: Syntax
- Topic: if statement with constarints
- Replies: 2
- Views: 6144
if statement with constarints
hello,
In GAMS model, can I use 'if' statement in any constraint. Please tell me it is possible or not. If yes then please tell me syntax of that.
Thanks
In GAMS model, can I use 'if' statement in any constraint. Please tell me it is possible or not. If yes then please tell me syntax of that.
Thanks
- 6 years ago
- Forum: Syntax
- Topic: problem in if statement
- Replies: 1
- Views: 4724
problem in if statement
hello, I am new to GAMS and I have started coding in GAMS with some small problems. Currently, in one problem I am using 'if' statement as follow: if (a(t) <=b(t), p(i,t)=a(t); else p(i,t)=b(t); ); in this code error_119(related to primary number) is occurred. Thanks in advance for help in future.