メインコンテンツへスキップ

MIP with bilinear constraints not converging for large datasets

回答済み

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    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?.
  • Maliheh Aramon
    • Gurobi Staff

    Hi Elizabeth, 

    We can think of improving the performance of Gurobi from two different aspects: modelling and parameter tuning. 

    Modeling:

    • Gurobi supports modelling simple general constraints such as absolute values directly. To model a constraint in the form of y=|x|, you can use the Gurobi general constraint Model.addGenConstrAbs(). As explained in the documentation, each general constraint has an equivalent MIP formulation that consists of linear and SOS constraints, and possibly auxiliary variables. You can model these constraints yourself without using Gurobi general constraints as you already did. However, using Gurobi general constraints might have the extra benefit of simplifying the equivalent MIP formulation.
    • Gurobi does not support strict inequality constraints because of the floating-point arithmetic and defining the feasible set as an open set. You need to change b>0 to b≥0 (or to b≥ϵ if you want b to be strictly positive).
    • It is a good practice to define lower and upper bounds for the decision variables. You might want to define an upper bound for your decision variables b. Given your model, it seems max(d) would work if d values are always positive.
    • Make sure that you are using the latest version of Gurobi Optimizer (version 9.1.2). Running the model on a machine with more cores can help as well.

    Parameter tuning

    It would be best if you can share the log file of your hard instance with i={1,2,...,800}. You might want to consider tuning the parameters of your model using the Gurobi Parameter Tuning Tool. This is an automated tool and you do not need to provide any parameter settings. However, if you do not have access to enough computational resources to speed up the tuning process, you can also consider experimenting with the following parameters to gain more insight into your model.

    • Presolve=2 and/or PreSparsify=1. The former applies presolving more aggressively and can result into a smaller model to optimize. The latter might help to reduce the number of non-zeros.
    • If the best bound is the bottleneck, consider Cuts=2 or 3. This applies cuts more aggressively and can tighten the relaxation, resulting into a tighter bound.
    • If the incumbent solution is the bottleneck, consider increasing the amount of time spent in the MIP heuristics by Heuristics=0.1 or higher. You might also want to increase the frequency of applying the RINS heuristic.
    • SymmetryMIPFocusImproveStartGap, and ImproveStartTime are other parameters you can consider experimenting with.
    • If it is easy to build a good heuristic solution for your model, it is a very good idea to provide that solution as a start solution to Gurobi.

    Please consider the above just as guidelines and be aware that parameters in Gurobi are inter-dependent and it is impossible to precisely know their effects rather by experimentation. 

     

    Best regards,

    Maliheh

    1

投稿コメントは受け付けていません。