Recursively Solving for N Solutions in Pool with Overlap Parameter
OngoingHello! I'm using Gurobi in R to develop a solution set of size n with a maximum overlap parameter k (i.e., no solutions share more than k variables in common with another solution - the format of my solution is a bunch of binary variables indicating whether objects should be selected or not). I'm currently using PoolSearchMode = 2 and PoolSolutions = a much larger number than n so I can use a different function after solving to filter my solution set down based on overlap.
Is there a way to recursively solve one at a time, and only add solutions to my solution pool if they don't overlap more than k times with other solutions? And then stop when I get to a solution pool size of n?
I'm new to using Gurobi so any help with coding/pseudocode would be much appreciated!
-
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 Kat,
Is there a way to recursively solve one at a time, and only add solutions to my solution pool if they don't overlap more than k times with other solutions? And then stop when I get to a solution pool size of n?
It is possible. However, it requires quite some work, because you have to make sure that previous solutions are excluded from the feasible space. This would most likely result is some form of B&B algorithm. I think that is it way more convenient to use your approach, i.e., use PoolSearchMode and PoolSolutions to generate many solution point and then check those for overlapping.
I am not familiar with R so unfortunately I cannot really help with a pseudo code.
Best regards,
Jaromił0 -
Hi Jaromił,
Thanks for the reply. Unfortunately I'm finding my run time is extremely long if I keep PoolSearchMode and PoolSolutions - I've seen a similar question where the person recursively re-solved with additional constraints here:
This is what I'm trying to accomplish, but don't know how to set that up. Thanks!
0
Post is closed for comments.
Comments
3 comments