Error 141 Topic is solved

Problems with modeling
Post Reply
i201824
User
User
Posts: 3
Joined: 1 week ago

Error 141

Post by i201824 » 1 week ago

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 6 times
. Please help me.

abhosekar
Moderator
Moderator
Posts: 120
Joined: 5 months ago

Re: Error 141

Post by abhosekar » 1 week ago

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: 3
Joined: 1 week ago

Re: Error 141

Post by i201824 » 1 week ago

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 7 times

abhosekar
Moderator
Moderator
Posts: 120
Joined: 5 months ago

Re: Error 141

Post by abhosekar » 1 week ago

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: 120
Joined: 5 months ago

Re: Error 141

Post by abhosekar » 1 week ago

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

- Atharv

i201824
User
User
Posts: 3
Joined: 1 week ago

Re: Error 141

Post by i201824 » 1 week ago

Thank for your help, Best regards.

Post Reply