GAMS-dev / gams.jl

A MathOptInterface Optimizer to solve JuMP models using GAMS
MIT License
35 stars 3 forks source link

[FR] Accessing GDX files from Julia #4

Open yordiak opened 3 years ago

yordiak commented 3 years ago

Are you planning to release a tool, similar to gdxrrw in R? I know that you can access R packages by using RCall.jl. However, I would prefer a more direct data exchange between GAMS and Julia.

renkekuhlmann commented 3 years ago

Yes, this is on our list (incl. accessing our "expert-level" interfaces, e.g. gdx, gmo etc. from Julia). I hope to get this done for GAMS 34 or 35 (GAMS 33 will be released shortly). Is there any particular format you would like us to consider to write the gdx data to (like data frames)?

yordiak commented 3 years ago

I believe that data frames is perfect, even though it's a little bit restrictive to someone who wants a more general format. Thus, I would suggest to keep gdx data as generic as possible. If someone wants to convert it to data frame then she/he can simply do it by using DataFrames.jl package

For instance, it would be useful something like this

set_optimizer_attribute(model, GAMS.GdxFormat(), "data_frames")

renkekuhlmann commented 2 years ago

Hi, sorry for not providing an update for one year. Your feature request and a very similar feature request for Python lead to the project GAMS Transfer released with GAMS 37. Unfortunately (for you - sorry!), we first focused on Python and Matlab (and are currently working on a version for R). A Julia version of it is on our TODO list.

yordiak commented 2 years ago

@renkekuhlmann thanks for the update.

One more question. Does your Matlab API work on Octave as well?

renkekuhlmann commented 2 years ago

Yes, the GAMS Matlab API also works with Octave. In case of GAMS Transfer, there a few features though that Octave does not support. For example, GAMS Transfer uses categorical arrays and tables (those are optional, but you'll get the best user experience with categorical). Note that in GAMS 37 GAMS Transfer comes with a compiled Matlab version only. There are plans to make GAMS Transfer open source soon and then it'll be possible to compile the Octave version. If you need it earlier, just let me know and I'll send you the Octave version.

MartinBonde commented 2 years ago

Any news on this?

renkekuhlmann commented 2 years ago

Sorry, no news at this point.