gurobi behavior after achieving maximization
回答済みI created a several models and ran them on different output, but in one case I encountered something weird.
All of the models need to choose some items from list under some condition (lets say choose 100 out of 1000 items).
On of the models can maximize its objective after choosing 10 items, and would expect it to choose other 90 random items from the list.
To test it, I created a function that choose the specific 10 items and than randomize the other 90, however, I saw that the outcome from the model was significantly better than the the random one (under different objective).
I'm trying to understand what gurobi does, how does it choose items if already reach the maximum value of objective, what does it do, if not random? And if it is not random how does it succeed so well under different objective which was not requested?
Thanks for any response.
-
正式なコメント
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 why not try our AI Gurobot?. -
Hi, Roy!
It's not very clear to me what you are asking or what you don't understand.
Gurobi will always find the optimal solution with respect to your objective function. Usually, there are multiple optimal solutions (due to numerical tolerances, model symmetries, etc.) and Gurobi will just report the first optimal solution found.
If you looking for other optimal or sub-optimal solutions, you should check out how our Solution Pool (gurobi.com) works.
Cheers,
Matthias0 -
Hi Matthias,
Thanks for the quick response.
I will try to better explain myself.
Lets say there two objectives A and B.
The situation I describe, is a case where there are many optimal solutions for objective A (for a given input, there are millions of different optimal solutions under this objective). Out of those possible optimal solutions, there are some which give bad result according to some objective B, and some which are good according to objective B. Somehow the model for objective A give an almost optimal solution for objective B.
Given that there are many optimal solutions for objective A (both good and bad for objective B), I can't find a reason why it will always return a solution which near optimal for objective B (the model isn't "aware" to objective B), and not more diverse (sometimes good and sometimes bad).
I'm trying to understand how this selection between multiple optimal solutions happens, to understand why this case might happen.
I hope this make my question more clear.
Thanks again for your help.
0 -
Hi Roy,
There really is no "selection" of any sort. Gurobi searches for new solutions in different ways and in different stages of the optimization process (heuristics, branch-and-bound, presolving, propagation, cutting planes, etc.). Whenever there is a new solution with a better objective value than the current incumbent, this solution will be the new incumbent. This simply goes on until the dual bound is close enough to satisfy the optimality gap or until the branch-and-bound tree is exhausted.
What you are observing here with regards to an objective unknown to Gurobi is most likely rooted in the problem structure itself. There may be certain connections that favor some solutions and can make them easier to find.
Cheers,
Matthias0
投稿コメントは受け付けていません。
コメント
4件のコメント