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

User Cuts, Callback Efficiency, and Internal Cut Generation

回答済み

コメント

1件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi Ozge,

    Is there a recommended way to avoid checking every node, or to check only every X nodes, for performance

    There's a couple of ways this could be achieved, for example, say you wanted to check approximately 20% of nodes

    i) generate a random number between 0 and 1 in your callback and exit if it is below 0.8, and run your cut routine otherwise

    ii) check if MIPNODE_NODCNT mod 5 is 0, if it is then run the cut routine, otherwise exit the callback

     

    Is it correct to assume that Gurobi filters out most of the cuts (e.g., near-duplicate, weak, etc.), and only adds those that significantly help LP relaxation?

    Yes.  There are other reasons a cut may be filtered too, such as orthogonality to other candidate cuts.  Note that even if the cut is not filtered out, it is not necessarily applied.  The solver will maintain a pool of potential cuts and apply (or even remove ones that have been applied) as it sees fit.

    Why does Gurobi generate significantly more internal cutting planes when user cuts are added?

    I'd need to run a lot of experiments before deciding what is causal, what is correlation and what is coincidence.  For example, you'd need to test not adding cuts, but keeping PreCrush=1, otherwise it is not a fair comparison.  There is a longer solve when adding your cuts, there would be a positive correlation between solve time and the number of cuts added.  You could set a time limit so that the solves all take the same time (and do not terminate due to MIP gap) but the time is still being affected by the callback, so maybe you'd need to run your cut routine to generate a cut, but not add it.  In summary - I don't think this question can be easily answered and any conclusions based on it would be spurious.

    Given I'm adding cuts in MIPNODE with cbCut(...), and setting PreCrush = 1, am I using the correct approach for user cuts? Just confirming that LazyConstraints = 1 is not required in this context.

    Indeed LazyConstraints=1 is not required for user cuts.

    - Riley

    0

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