I have a attached a production cost model for a large power system below (Trial2.gms). The syntax seems alright as it compiles fine. However after looking at the .lst file post compilation I have a doubt about why GAMS is formulating the equations associated with a particular constraint as it is now. The equations of interest in the .lst file have been copied in the Trial2_lst.txt file attached.
The equation of interest is the objective function, line 322 of Trial2.gms which defines the total production cost as the sum of production cost across each interval. The formulation is : PRODCOST =E= SUM(INTERVAL, PRODCOST_BY_INTERVAL(INTERVAL)). So after compiling the .lst file should report back the constraint as PRODCOST - SUM(INTERVAL, PRODCOST_BY_INTERVAL(INTERVAL)) = 0. However if we take a look at line 3 in Trial2_lst.txt the formulation in the .lst file seems to be missing a -ve sign. As a result the production cost calculated is also turning out to be negative. Any help would be really appreciated.

Attached the full lst file below. I rechecked the equation listings and they appear fine for me too. However the next question I guess is figuring out why my objective function is negative when all its constituents bear a positive value.
Anyways thanks a lot for the help.
Regards,