How to fix variables of the presolved model and get the solution of original model ?
回答済みI want to try many kinds of fixations of the original model m and solve it. However, the optimization of m take much time on presolving. So i want to presolve m first(only once) and then do the fixations, in order to save time. p=m.presolve() , p.optimize() is impractical because i can't get the solution of m
0
-
正式なコメント
This post is more than two 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. -
The mapping between the original model and the presolved model is not exposed. We don't recommend working on the presolved model, because in general there's no way to recover a solution to the original model. Additionally, the variables you're interested in fixing may not even be present in the presolved model.
Some alternative ideas:
- Convert your model to a multi-scenario model, where you define a new scenario for each set of variable fixings. When solving a multi-scenario model, Gurobi performs a single presolve step, then attempts to find optimal solutions for all scenarios.
- Limit the amount of time Gurobi spends in presolve by modifying the PrePasses/Presolve parameters.
0
投稿コメントは受け付けていません。
コメント
2件のコメント