Open joanna-sitarz opened 3 weeks ago
@joanna-sitarz sorry for the very late response. the gdx
package is relying on the gdxrrw
package of the GAMS team which is deprecated, which is why we also moved from gdx
to gdx2
which is now based on the new GAMS packages gamstransfer
. gdx2
does not provide a writeGDX
functionality anymore, but gamstransfer
itself does. Can you perhaps have a look whether this can help you here?
Issue 1) writeGDX() runs into an error when the data I am trying to write was previously read in using "restore_zeros = FALSE", format="simplest".
"Error in if (out$type == "set") { : argument is of length zero"
The error does not occur if restore_zeros = TRUE. However I am running into memory problems when I set it to TRUE.
Issue 2) writeGDX() changes some underlying information about data if the data is in the format "raw".
If my variable I am reading/writing into gdx has 0 records information about sets gets removed during the process of writing the gdx.
I am attaching a folder with very simple code demonstrating the issues 1 and 2. WriteGDXProblem.zip