Hi Renger,
thanks for your answer!
I solved it another way, but it also works:
Prod_Costs.l(u,t)$(NOT Prod_Costs.l(u,t)) = EPS;
Report(“Prod_Costs”,u,t,l) = Prod_Costs.l(u,t) ;
Greetings!
Tim
Am Donnerstag, 6. Dezember 2012 06:24:49 UTC+1 schrieb Renger van Nieuwkoop:
Hi Mr Unknown
eps is numerically a true 0. GAMS handles data in a sparse way, so zeros are not stored. If you want to store a zero, you work with eps. So in numerical expressions, 0 and eps are exchangeable.
Just add EPS to your parameters :
report(u,t,l) = report(u,t,l) + EPS;
Cheers
Renger
Modelworks
Gewerbestrasse 16
3600 Thun – Switzerland
+41 79 818 53 73
Info@modelworks.ch
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of MrUnknown
Sent: Wednesday, December 05, 2012 6:11 PM
To: gams...@googlegroups.com
Subject: Reporting Error
Hi everbody,
I have a problem with the output of my model results and I don’t know what to do
In my model I use one variable and three sets and one parameter.
Sets:
u /u1u8/
t /t1t10/
l /l1*l3/
Variable:
Prod_Costs(u,t)
Parameter:
report(u,t,l)
The model does its job, but when I loop the solve over the set l and write the Prod_Costs.l to a parameter ‘report’, it skips the u’s which are 0.
So it can happen, I only see u1,u2,u3 and then u5,u7,u8. It skips u4 and u6
How can I tell the model to write the 0 into my parameter ‘report’ ?
Thanks you so much!
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/9FvO_3wTp4wJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/1KxLh8A4VMgJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.