hello everyone, i need little help and guidance regarding my GAMS code. i am getting the following error (*** Error at line 171: division by zero (0).

I am attaching .gms file for your reference. pls provide your your valuable suggestions and comments. Thank you.

The listing files helps you. The error is “**** Exec Error at line 171: division by zero (0)”. Line 171 in the lst file is “171 C(t)=[Dreq(t)]+[[sum(i,(lambda(i)/theta(i)))]/[sum(i,(1/theta(i)))]];”. Here you sum over all i and eventually divide by theta(i). If you look at your data of theta, there is no i19 and since GAMS is a sparse system, data not there is assumed to be 0.

-Michael

Thank you @bussieck.