Page 1 of 1

Excel printing problem

Posted: Thu Oct 11, 2018 8:58 pm
by Luca
Dear all users,

I am using GAMS to solve an optimisation problem and I am printing the results to an excel sheet. I wold ask you if there is a way to print in excel all the entries of a variable included the zero entries.

Thanks in advance. Best regards,
Luca

Re: Excel printing problem

Posted: Fri Oct 12, 2018 8:09 am
by Renger
Hi Luca

The trick is to add the Gams value EPS (a very small number) to your parameter:
myparameter(s) = X.L(s) + EPS;
and then use the GDXXRW option EPSOUT = 0 to change the EPS into 0 when you export them to Excel.

You can find the solution here: https://support.gams.com/gams:export_al ... into_excel.

Cheers
Renger

Re: Excel printing problem

Posted: Fri Oct 12, 2018 8:46 am
by Luca
Thanks very much. Now it works.
Best regards,
Luca

Re: Excel printing problem

Posted: Fri Oct 12, 2018 2:22 pm
by Renger
Just a small clarification:
EPS is not a small value, as I was informed by GAMS. EPS is a stored zero value.
Furthermore: If the dollar control option onEPS is active, zeros in a parameter or table statement are treated as EPS
Cheers
Renger