Error 141 Topic is solved

Problems with modeling
Post Reply
i201824
User
User
Posts: 4
Joined: 3 years ago

Error 141

Post by i201824 »

Hello everybody,
ı wrote a model but when ı run ıt ı face an error 141. How can ı solve this problem.
NYwastecol2 - (Son).gms
(2.8 KiB) Downloaded 170 times
. Please help me.
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Error 141

Post by abhosekar »

What is C(i, j) on line 60 and 63? It is never defined in the code and being used in the if condition.

Hope this helps.

- Atharv
i201824
User
User
Posts: 4
Joined: 3 years ago

Re: Error 141

Post by i201824 »

Thank you so much for your help but my main problem is error 141. As you say, ı defined C(i,u) in the code and ı face an error 141. how can ı solve this error 141.
NYwastecol2 - (Son-1).gms
(2.81 KiB) Downloaded 177 times
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Error 141

Post by abhosekar »

Error 141 is because of the error I mentioned. If you fix the issue with parameter c(i, j) by providing values, your model will be solved (clearly enough, it cannot be solved at the moment as GAMS does not know C). If you click on the text below error 141, .lst file will open and show you exactly which element is causing it.

If you see that, you will realize the error is coming from two places. First is C(i,j) and second is " display z.l, x.l;". This makes perfect sense because if the model is not solved, there won't be any .l(level) values to show.

Therefore, it is very important to first fix the error with C(i,j)
Hope this helps.

- Atharv
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Error 141

Post by abhosekar »

Please note that C(i, u) is not defined anywhere in the code you have attached.

- Atharv
i201824
User
User
Posts: 4
Joined: 3 years ago

Re: Error 141

Post by i201824 »

Thank for your help, Best regards.
Post Reply