Excel printing problem Topic is solved

Problems with syntax of GAMS
Post Reply
Luca
User
User
Posts: 23
Joined: 6 years ago

Excel printing problem

Post 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
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Excel printing problem

Post 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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Luca
User
User
Posts: 23
Joined: 6 years ago

Re: Excel printing problem

Post by Luca »

Thanks very much. Now it works.
Best regards,
Luca
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Excel printing problem

Post 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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply