How to use Solution Pool in GAMS model?
AnsweredHello All,
First of all, I am quite new in modeling in GAMS 37 with solver Gurobi. As part of my master's thesis, my aim is to model a multi-criteria vehicle routing problem in GAMS and solve it with different test scenarios using Gurobi 9.5.
I would like to use the solution pool function in this context to get an output of my Vehicle Routing Problem with all feasible solutions. I am familiar with the documentation on the solution pool on Gurobi website and the individual parameters such as PoolSolutions and PoolSearchMode. Nevertheless, I had no success to implement those parameters.
What I am missing is concrete information on how exactly these parameters are to be integrated into the coding, i.e. how they are to be used in GAMS.
Is there someone who can support my with instructions or samples how to use solution pool with parameters PoolSolution and PoolSearchMode for models in GAMS?
I would be very grateful if someone could help me.
Many thanks in advance.
Best regards & greetings from Germany
Lisa
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Lisa,
I think you'll find the information you need here, under the Solution Pool header.
Best regards
Jonasz0 -
Hi Jonasz,
First of all, thank you very much for your quick response
I actually already know the link in GAMS you shared with me. Nevertheless, many thanks.
Among other things, the information provided there explain which values to assign to the Solution Pool parameters and what they can be used for, quite similar to the explanations in the Gurobi documentation.What I am missing, however, is an approach on how to integrate and activate the solution pool in the GAMS modelling. I had tried to simply specify PoolSearchMode and PoolSolutions as parameters in my GAMS model and to assign the corresponding values, but this did not work.
Unfortunately, I have no idea how else i could approach it or how i could use the parameters correctly so that I really get the n best feasible solutions of my MIP in the end.
It would be great, if you could help me with further instructions or examples.
Many thanks in advance.
Best regards
Lisa0 -
Hi Lisa,
What I am missing, however, is an approach on how to integrate and activate the solution pool in the GAMS modelling. I had tried to simply specify PoolSearchMode and PoolSolutions as parameters in my GAMS model and to assign the corresponding values, but this did not work.
Unfortunately, I have no idea how else i could approach it or how i could use the parameters correctly so that I really get the n best feasible solutions of my MIP in the end.
If setting the option parameter in GAMS does not work, then I would recommend to contact GAMS support and ask for their input.
As an alternative, you could migrate to one of Gurobi's native APIs to easily set and manipulate any parameters and feature provided with Gurobi. Gurobi's Python API should be the easiest entry point.
Best regards,
Jaromił0 -
Hi Lisa,
When using GAMS, you need to put the options in a so called solver options file. This is also mentioned in the GAMS/GUROBI documentation (see here).
I hope this helps!
Fred
0 -
Hi Fred,
Many thanks for your help.
I have created a solver options file for the two parameters PoolSearchMode and PoolSolutions as well as solnpool gdx file, so that it now works as expected.
Best regards
Lisa0
Post is closed for comments.
Comments
6 comments