Handling small constraint violation warnings after adding constraints and re-optimizing
回答済みI am solving a Gurobi optimization model iteratively. Between iterations, I add new constraints to the existing model and then re-optimize. In some iterations, I receive the following warning:
Warning: max constraint violation (x e-06) exceeds tolerance
I have already tried improving the model scaling so that the coefficient ranges appear reasonable, and I have also experimented with feasibility-related tolerances. However, the warning still appears in some iterations. When this happens, the solution often does not appear to change meaningfully after the additional constraints are added.
Other than rebuilding the model from scratch and optimizing it again, what is the recommended approach to handle this situation?
-
Hi Ahmet,
The parameters mentioned in Solver Parameters to Manage Numerical Issues may help? In particular I would try (not all at once) Aggregate=0, NumericFocus, IntegralityFocus, ScaleFlag.
You mentioned experimenting with feasibility-related tolerances - I'm guessing that you tried tightening FeasibiltyTol?
If you drop a link to a MPS model file I will take a look and see if there is anything else to consider.
- Riley
0 -
Dear Riley,
Thank you for your comment and suggestions.
I scaled the added constraints with appropriate multipliers so that their violations are visible to the optimization model. Specifically, I ensured that the minimum scaled violation is at least 100 * FeasibilityTol.
In my case, this scaling preserved the intended meaning of the constraints without introducing any issues.
Best regards,
Ahmet0 -
Good to hear Ahmet, that is indeed the best approach.
0
サインインしてコメントを残してください。
コメント
3件のコメント