Error 141

Hello everybody,
ı wrote a model but when ı run ıt ı face an error 141. How can ı solve this problem.
NYwastecol2 - (Son).gms (2.8 KB)
. Please help me.

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

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 KB)

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

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

  • Atharv

Thank for your help, Best regards.