Running problem with the piecewise linear example code in the GAMS portal

Problems with syntax of GAMS
Post Reply
Jubeyer
User
User
Posts: 41
Joined: 4 years ago

Running problem with the piecewise linear example code in the GAMS portal

Post by Jubeyer »

Hi,

I have been trying to execute the code given at :https://www.gams.com/latest/gamslib_ml/ ... idpwl.html

But I am getting this error message:
image.png
I have these lines in my pwlfunc.inc file:


BidPwl s x y l g v

loop(BidPwl_Seg(v,s)$(ord(s) > 2),
BidPwl(v,s,'y') = BidPwl(v,s-1,'y') + BidPwl(v,s-1,'g')*BidPwl(v,s-1,'l');

Can anyone help me understand what I am doing wrong here.

Regards,
Jubeyer
);
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: Running problem with the piecewise linear example code in the GAMS portal

Post by bussieck »

I can't reproduce this. The bidpwl works just fine, even with GAMS 35.2.0. I also don't understand what you mean by "I have these lines in my pwlfunc.inc file". The file pwlfunc.inc comes with the model bidpwl from GAMSlib (https://www.gams.com/latest/gamslib_ml/pwlfunc.inc) and should not be touched. Perhaps you upload all the files you use and the log and lst file.

-Michael
Jubeyer
User
User
Posts: 41
Joined: 4 years ago

Re: Running problem with the piecewise linear example code in the GAMS portal

Post by Jubeyer »

Hi,
I have figured out the cause perhaps. The pwlfunc.inc file was not found while executing the code, however when I changed to the .inc filename with its address then it works. Perhaps GAMS was not added to my environment variable path.
Anyway, thanks a lot. At the beginning I thought that the pwlfunc.inc is something user defined but it seems like I was wrong.

Regards,
Jubeyer
Post Reply