Page 1 of 1

Error 141

Posted: Sun Feb 21, 2021 8:49 pm
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 177 times
. Please help me.

Re: Error 141

Posted: Mon Feb 22, 2021 2:49 pm
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

Re: Error 141

Posted: Mon Feb 22, 2021 7:20 pm
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 182 times

Re: Error 141

Posted: Mon Feb 22, 2021 8:04 pm
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

Re: Error 141

Posted: Mon Feb 22, 2021 8:13 pm
by abhosekar
Please note that C(i, u) is not defined anywhere in the code you have attached.

- Atharv

Re: Error 141

Posted: Tue Feb 23, 2021 6:55 am
by i201824
Thank for your help, Best regards.