Solver stopping criteria currently I am using MIPGAp and Time Limit and looking to add another stopping criteria
AnsweredMost of the scenarios are completing within 10 mins with MIP gap of 0.01, but only 2 scenarios are reaching the time limit.
The two scenarios mostly follows similar graphs as shown below.
I'm considering implementing an additional stopping criterion: if there is no improvement in the objective value by more than 0.1 or 0.2% for 5 or 10 mins, I would like to stop the solver instead of letting it run until the time limit is reached. Would this kind of approach is standard one, along with MIPGAP and Time limit. or Is there any better stopping criteria is there.
-
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:
-
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.
-
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.
-
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.
-
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.
-
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.
-
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 -
-
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.
Comments
2 comments