Exploiting Integer Objective and Identical Feasible Regions across Problems
回答済みHi,
I have a MIP that takes the following form

Where f(x) is some linear, function of the x-matrix.
I have 2 questions:
1) I need to quickly get an upper bound for this problem for every i in {1,...,m} (i.e. for every row of the decision matrix). To do this, for a given i, I have a time limit of 5 seconds and am using the MIPFocus=2 parameter. However, I notice that the bounds that Gurobi gives are fractions (ex. 3.2432, 5.2342) — is it possible to tell the software that the objective is strictly integral, so it can round down bounds to improve its performance?
2) As I mentioned, I need to upper-bound this problem for many i's; however, the only thing that changes across different i's is the objective (the feasible region is exactly the same across problem instances). Is there a way to exploit this? Currently, I create a new model for every i, which I believe is not the best thing to do since forming the model and pre-solving may take significant time.
Thank you for your help in advance!
-
Hi Alexander,
Gurobi will identify that the objective value is integral, you don't need to provide this. The logs will print ObjBoundC but use the rounded value ObjBound for pruning the branch and bound tree.For your second question, there are several approaches you could take to speed up the process. The simplest approach is simply to define your first model and call Model.optimize(), then extract and store the solution, then use Model.setObjective to set a new objective and call Model.optimize() to reoptimize for the new objective, and so on...
Another option (perhaps the better one) is to define a multi-scenario model, where each scenario represents a different objective. You would need to use this functionality to redefine the variable coefficients in the objective function wherever they change from the base model. Our example multiscenario.py will help, although it shows modifications to the constraints, and not the objective function. If you haven't used this functionality before then there will be a small learning curve but I'd expect Gurobi to produce solutions for all models faster than the previous approach.
If you try both it then please consider posting some solve times below.- Riley
0
サインインしてコメントを残してください。
コメント
1件のコメント