Decimal option in gdx-otput file

Problems with syntax of GAMS
Post Reply
Jarenka
User
User
Posts: 64
Joined: 5 years ago

Decimal option in gdx-otput file

Post by Jarenka »

Dear,

I have not found a similar topic or discussion about gdx-view, so I am creating a new one.

I would like to know how I can set up an option that suppresses number of decimals in gdx-file, for example to two.
Currently, I have a something like this - see the attached file.
gdx-output-employment.JPG
In GAMS there is an "option statement" called "decimals", but it only refers to "display" statement.

Can you help me?


Jarenka
User avatar
dirkse
Moderator
Moderator
Posts: 215
Joined: 7 years ago
Location: Fairfax, VA

Re: Decimal option in gdx-otput file

Post by dirkse »

Jarenka,

There is no option to change the number of decimals in a GDX file. The numbers in a GDX file are stored in double-precision binary form, so it's not helpful to think about storing them with a certain number of decimals.

However, any tool that displays values (from GDX or otherwise) needs to consider how it will do so, and usually this includes an option to set the number of decimals to round to. Your JPEG file looks like it comes from the GDX viewer in GAMS Studio. The current shipping version of Studio (0.12.4) has no option for controlling this, but I have a version 0.12.7 that includes an option for controlling the decimals displayed.

I expect that our next release will include this option.

-Steve
Jarenka
User
User
Posts: 64
Joined: 5 years ago

Re: Decimal option in gdx-otput file

Post by Jarenka »

Thank you for your answer!!
Post Reply