How to make GDX files save data "0"

Problems with syntax of GAMS
Post Reply
Posts: 5
Joined: 2 months ago

How to make GDX files save data "0"

Post by 吴可盈 » 2 months ago

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
Posts: 165
Joined: 5 years ago
Location: Fairfax, VA

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

Post by dirkse » 2 months ago


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. ... orHandling



Post Reply