coin-or / SHOT

A solver for mixed-integer nonlinear optimization problems
https://shotsolver.dev
Eclipse Public License 2.0
117 stars 25 forks source link

in GAMS interface, write alternative solutions to GDX file, if requested #97

Closed svigerske closed 3 years ago

svigerske commented 3 years ago

This adds writing all alternative solutions to a GDX file in the GAMS interface analogous to the (famous) gams/dumpsolutionsmerged option of GAMS/SCIP.

I'm assuming here that Results::primalSolutions[0] is the solution that is already passed back to GAMS via the usual channels. Can one assume that?

andreaslundell commented 3 years ago

Thanks @svigerske. I did some modifications (renamed the setting to Subsolver.GAMS.SolutionsFile, and some formatting). It works from the command line. There should be no changes when calling it from GAMS I would assume, but can you verify?

svigerske commented 3 years ago

Why would you put this option into the "Subsolver" category? This is about writing solutions that SHOT has found if SHOT was called on GAMS files or via GAMS, but not about solutions from a GAMS solver used on some NLP subproblems.

andreaslundell commented 3 years ago

True. However, I would like to somehow identify that this is GAMS functionality in the name. For other use cases, the solutions are saved in the OSrL-file... What about Output.GAMS.SolutionFile?

svigerske commented 3 years ago

True. However, I would like to somehow identify that this is GAMS functionality in the name. For other use cases, the solutions are saved in the OSrL-file... What about Output.GAMS.SolutionFile?

Yes, Output category is good. Should it be "SolutionsFile" or SolutionFile"?

andreaslundell commented 3 years ago

Perhaps it should be AlternateSolutionsFile? Because it wont be populated if there is only one solution right?

svigerske commented 3 years ago

yes, that would be precise