How to make GDX files save data "0"

Problems with syntax of GAMS
Post Reply
吴可盈
User
User
Posts: 5
Joined: 2 years ago

How to make GDX files save data "0"

Post by 吴可盈 »

Dear all, :D
I'm a green hand. Because when I convert an Excel file to a GDX file, the number 0 in the Excel table is automatically deleted and can not be saved when converted to a GDX file. What do I need to do if I want to save data 0 in the GDX file? The situation is urgent, I really need your help, thank you very much!
How to make GDX files save data 0.png
,
User avatar
dirkse
Moderator
Moderator
Posts: 214
Joined: 7 years ago
Location: Fairfax, VA

Re: How to make GDX files save data "0"

Post by dirkse »

Hello,

One of the central ideas in data storage in GAMS and GDX is that data is sparse, i.e. mostly zero, so sparse storage schemes are used to store only the nonzero values. So like most or all of the GDX tools I am aware of, gdxxrw will not store zeros in a GDX file.

If you have just a few zeros in your spreadsheet, you can replace them with the string EPS to get a GDX file with EPS values. The value EPS is a special value: a stored zero. These are useful in many cases.

https://www.gams.com/36/docs/UG_Paramet ... orHandling

HTH,

-Steve
Post Reply