Search found 5 matches

by garvisgarg
3 months ago
Forum: Syntax
Topic: relational operators within GAMS
Replies: 3
Views: 184

Re: relational operators within GAMS

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
3 months ago
Forum: Syntax
Topic: relational operators within GAMS
Replies: 3
Views: 184

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
by garvisgarg
4 months ago
Forum: Syntax
Topic: excel to gams
Replies: 9
Views: 408

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

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
by garvisgarg
4 months ago
Forum: Syntax
Topic: problem in if statement
Replies: 1
Views: 140

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.