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

User Cuts are not accepted

回答済み

コメント

6件のコメント

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    When I count the number of executions of the latter method I have a way bigger number than the actual added cuts that are displayed in the log at the end of the optimization (e.g. 10 vs 4.333).

    Gurobi accepts all of your cuts. The final log output lists the number of cuts that are active at the optimal solution point.

    So what the final log output means is that 10 out of your 4333 user cuts are fulfilled with equality at the final optimal solution point.

    Best regards, 
    Jaromił

    0
  • Jan Krause
    First Comment
    First Question

    Hi Jaromil,

    thx for your clarification.

    How could one interprete this - are the other of the 4333 user cuts, that are not displayed in the log at the end, definitely dominated by some other constraints -  either internal user cuts or reformulated original constraints during presolve? 

    Furthermore: Is there a way to retrieve some more information on the user cuts that were active at the end?

    I saw that when I scaled my user cuts that it had an influence of the number in the log in the end. So how can this be when an equivalent set of user cuts has been added?

    Best regards,
    Jan

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Jan,

    How could one interprete this - are the other of the 4333 user cuts, that are not displayed in the log at the end, definitely dominated by some other constraints -  either internal user cuts or reformulated original constraints during presolve? 

    All other cuts could have been used at some point to prune some B&B nodes, or to determine new variable bounds through propagation. They don't have to be necessarily dominated by other cuts, it can just happen that at some point in the optimization process these cuts are no longer necessary, i.e., they become redundant, but it does not mean that they were not used at all. Every cut has some big or small impact during the optimization process.

    Furthermore: Is there a way to retrieve some more information on the user cuts that were active at the end?

    Unfortunately, this is currently not possible. You can get this information manually, by saving all your cuts and after the solution process finished, going through all your cuts and evaluating them at the found optimal solution point.

    I saw that when I scaled my user cuts that it had an influence of the number in the log in the end. So how can this be when an equivalent set of user cuts has been added?

    Scaling of cuts and constraints can have a significant impact on the solution process. Scaling can shift the feasibility tolerance. Take for example the constraint \(10^{-7} \cdot x = 10^{-6}+10^{-1}\). For this constraint the value \(x = 10^6\) is feasible within the default FeasibilityTol, because \( 10^{-6} + 10^{-1} - 10^{-7}\cdot 10^{6} = 10^{-6}\). But if we scale the constraint to \(10^{-1} \cdot x \leq 1 + 10^5\), then \(x=10^6\) is no longer feasible, because \(1 + 10^5 - 10^{-1} \cdot 10^6 = 1\), which is not within the default FeasibilityTol. For more details on numerical details, I recommend having a look at our Guidelines for Numerical Issues.

    Moreover, differently scaled constraints/cuts can lead to different presolve and bound tightening reductions, which ultimately lead to a different optimization path.

    Best regards, 
    Jaromił

    0
  • Jan Krause
    First Comment
    First Question

    Hi Jaromil,

    again thanks for your explanations.

    Now, we've manually counted the number of cuts that were added via user callback and that satisfy the latest solution with equality but strangely found that this number is not equal to the number in the log.

    Could it be, that the log only displays the number of cuts that are fulfilled with equality and additionally are not removed before due to redundance?

    Best regards,
    Jan

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Jan,

    Could it be, that the log only displays the number of cuts that are fulfilled with equality and additionally are not removed before due to redundance?

    Yes, this is what you should be seeing. Please note that a cut is counted as active if it is fulfilled with equality within the given FeasibilityTol.

    Best regards, 
    Jaromił

    0
  • Jan Krause
    First Comment
    First Question

    Hi Jaromil,

    okay, that makes sense. Thanks!

    Best regards,
    Jan

    0

サインインしてコメントを残してください。