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

How are lazy constraints used?

回答済み

コメント

1件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi Federica,

    The Lazy attribute is only relevant to constraints that you generate before the solve, so if you're using a callback to add lazy constraints, then you don't have to worry about this attribute.

    The cutting planes section will list the cuts at the last node evaluated.  This is not necessarily the node where the optimal solution is found - in fact I would say it almost certainly isn't.

    We do make a distinction between lazy constraints and lazy cuts, but I wouldn't read into the lazy constraints being listed under cutting planes.  This is just for convenience.

    Lazy constraints (and lazy cuts) are required to be globally valid.  They will be added to a pool, and future solves (whether node LPs or as part of heuristics) will include them.  So yes, they are shared across threads and branches, although not always immediately.

    There are a couple of reasons why your count might not match what is reported in the log.  The first being that a lazy constraint is not needed in the final LP solution, and the other being that you may be counting duplicated lazy constraints (since the threads do not immediately sync the lazy constraint information).

    - Riley

    0

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