Skip to main content

Solver stopping criteria currently I am using MIPGAp and Time Limit and looking to add another stopping criteria

Answered

Comments

2 comments

  • Gurobot (AI-generated response)
    Gurobi Staff Gurobi Staff

    It's great to hear that most of your scenarios are solving efficiently within 10 minutes with a MIP gap of 0.01. However, it's not uncommon for certain scenarios, particularly those with more complex or larger-scale models, to reach the time limit.

    Implementing an additional stopping criterion based on improvement in the objective value can indeed be a useful strategy in managing the trade-off between solution time and solution quality. This approach is indeed standard and is often used in practice, especially in situations where the solver struggles to improve the objective function value significantly over time.

    Here are a few points to consider:

    1. Setting the Stopping Criterion: The idea of stopping the solver if there is no significant improvement (e.g., 0.1% or 0.2%) in the objective value over a certain period (like 5 or 10 minutes) is a sound approach. This strategy is particularly useful in scenarios where the solver might spend a considerable amount of time making very marginal gains.

    2. Tuning the Parameters: The specific thresholds and time windows you mentioned (0.1% or 0.2% improvement over 5 or 10 minutes) are reasonable, but they might need to be tuned based on the specific characteristics of your problem. It's often a good idea to experiment with these parameters to find a balance that works well for your particular scenarios.

    3. Other Stopping Criteria: Apart from the MIP gap and time limit, other stopping criteria include setting a limit on the number of nodes to be explored, a limit on the number of solutions found, or a limit on the improvement in the objective value over a certain number of nodes. These can be used in combination with your proposed criterion.

    4. Solution Quality Consideration: While implementing additional stopping criteria can significantly reduce computation time, it's important to balance this with the quality of the solution. Ensure that the criteria you set still allows for a solution that is acceptable for your application's needs.

    5. Solver Parameters: Gurobi offers a range of parameters that can be tuned to improve performance on specific types of models. It's worth exploring these to see if any could be specifically beneficial for the scenarios you're struggling with.

    6. Model Refinement: Sometimes, if certain scenarios consistently take longer to solve, it might be indicative of an underlying issue with the model formulation itself. Consider reviewing the model to see if there are opportunities for simplification or reformulation that could make it more tractable.

    In summary, your approach of adding a stopping criterion based on the lack of improvement in the objective value is a standard and practical one. It's all about finding the right balance between solution quality and computational efficiency for your specific needs. Remember to test and validate the impact of any changes in your stopping criteria to ensure they meet your operational requirements.

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Sudheer,

    Please also see:
    How do I use callbacks to terminate the solver? 

    and a similar question asked last week:
    MIP stopping criteria - Rate of objective value change

    - Riley

    0

Please sign in to leave a comment.