How to read .gdx files in Julia?

I have a Multistage SP written in GAMS and I want to exchange data between GAMS and Julia via gdx files (Maybe another method if there exists any).
I tried using GAMS.jl but it what it does is just convert the model written in JuMP to a .gms file to be executed in GAMS.
Is there a way to do the reverse?

It seems that GAMS offers a function CONVERT that supports JuMP: CONVERT

And welcome to the forum :slight_smile:

1 Like

There is an open feature request for this in GAMS’s official interface: [FR] Accessing GDX files from Julia · Issue #4 · GAMS-dev/gams.jl · GitHub

Your best bet is to dump the data from the GDX format into something else, like a set of CSV files, and then read those into Julia: GDXDUMP

Selfish plug, but if you’re doing multistage stochastic programming, you may want to take a look at GitHub - odow/SDDP.jl: Stochastic Dual Dynamic Programming in Julia.

1 Like