How to explicitly mention equations of .inc file in the model description

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

How to explicitly mention equations of .inc file in the model description

Post by Jubeyer »

Hi,
I have been using the 'pwlfunc.inc' for my work. However, I have hundreds of equations among which I want to exclude some and include some at times. When I was looking at the example where the 'pwlfunc.inc' was used: https://www.gams.com/latest/gamslib_ml/ ... idpwl.html

I have noticed that there under the model description they have used /all/ which for my case is not possible. I want to include all the equations that come from that .inc file but for my circumstances I cannot use the /all/ syntax. So, it seems like that I need to include them individually one by one. Is there any way to do that?
For example, If I execute the above code I can see the equation defBidPwlOne in the .lst file but it was not mentioned in the code explicitly. So, is there any way to include them in the model description or do I need to include them with the similar names as the .lst file contains like defBidPwlOne, defBidPwlSeg, etc.

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

Re: How to explicitly mention equations of .inc file in the model description

Post by bussieck »

If you check the inc file (https://www.gams.com/latest/gamslib_ml/pwlfunc.inc) you see that it defines a compile time variable called %p%_EquList where %p% is replaced by the name you give on the $batInclude line as first argument (here "BidPwl"), so in the example this is BidPwl_EquList. This is variable contains the equations declared and defined by the pwlfunc.inc include file and can be added to you model statement to include these equations: model mymodel / A,B,C, %BidPwl_EquList% /;

-Michael
Post Reply