GAMS-dev / gams.jl

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

Unable to Pass 'Equilibrium' Keyword to Solver in GAMS.jl for Equilibrium Problem #24

Closed mcwaga closed 8 months ago

mcwaga commented 8 months ago

Problem

I am trying to solve an equilibrium problem using the GAMS/EMP with GAMS.jl in Julia. I am encountering an issue where I am unable to pass the 'Equilibrium' keyword to the solver.

Environment

Expected Behavior

I expect to be able to specify the 'Equilibrium' keyword either within the GAMS model file or via the GAMS.jl interface to inform the solver that it should handle the problem as an equilibrium problem.

renkekuhlmann commented 8 months ago

Sorry, but EMP is currently not supported by the interface. The only workaround I see at the moment is to write the EMP info file yourself and put it into the working directory. You can query the working directory by calling get_optimizer_attribute(model, "WorkDir") or set it to something non-temporary by set_optimizer_attribute(model, "WorkDir", <path/to/workdir>). However, it will be difficult as the model that is written to this working directory (and then solved) by GAMS.jl is a scalar model and may look very differently to what you have specified via the JuMP interface. Does this work for you or are you experiencing further issues with this approach?

mcwaga commented 8 months ago

Hi, sorry for the delay on answering, I did not see your e-mail, Renke. I am actually writing the .gms file from Julia and running GAMS, then I write the results to a .csv and read it in Julia :).

That is the best I could do...

On Thu, Nov 9, 2023 at 9:03 AM Renke Kuhlmann @.***> wrote:

Sorry, but EMP is currently not supported by the interface. The only workaround I see at the moment is to write the EMP info file yourself and put it into the working directory. You can query the working directory by calling get_optimizer_attribute(model, "WorkDir") or set it to something non-temporary by set_optimizer_attribute(model, "WorkDir", <path/to/workdir>). However, it will be difficult as the model that is written to this working directory (and then solved) by GAMS.jl is a scalar model and may look very differently to what you have specified via the JuMP interface. Does this work for you or are you experiencing further issues with this approach?

— Reply to this email directly, view it on GitHub https://github.com/GAMS-dev/gams.jl/issues/24#issuecomment-1803331929, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHUDYFT7DK2K3KCO5LZI5LYDSE43AVCNFSM6AAAAAA7A2XFBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTGMZTCOJSHE . You are receiving this because you authored the thread.Message ID: @.***>

renkekuhlmann commented 8 months ago

Okay, sorry that there is no better solution for this at the moment.