Search found 5 matches

by garvisgarg
1 month ago
Forum: Syntax
Topic: relational operators within GAMS Topic is solved
Replies: 3
Views: 135

Re: relational operators within GAMS Topic is solved

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
by garvisgarg
1 month ago
Forum: Syntax
Topic: relational operators within GAMS Topic is solved
Replies: 3
Views: 135

relational operators within GAMS Topic is solved

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
by garvisgarg
1 month ago
Forum: Syntax
Topic: excel to gams Topic is solved
Replies: 8
Views: 179

excel to gams Topic is solved

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...
by garvisgarg
2 months ago
Forum: Syntax
Topic: if statement with constarints Topic is solved
Replies: 2
Views: 145

if statement with constarints Topic is solved

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
by garvisgarg
2 months ago
Forum: Syntax
Topic: problem in if statement Topic is solved
Replies: 1
Views: 103

problem in if statement Topic is solved

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.

Go to advanced search