![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
This class implements a propagator for non_overlap_2d constraints that uses the BinaryRelationsMaps to detect precedences between pairs of boxes and detect a conflict if the precedences implies an overlap between the two boxes. For doing this efficiently, it keep track of pairs of boxes that have non-fixed precedences in the BinaryRelationsMaps and only check those in the propagation.
Definition at line 36 of file 2d_distances_propagator.h.
#include <2d_distances_propagator.h>
Public Member Functions | |
Precedences2DPropagator (NoOverlap2DConstraintHelper *helper, Model *model) | |
~Precedences2DPropagator () override | |
bool | Propagate () final |
int | RegisterWith (GenericLiteralWatcher *watcher) |
Public Member Functions inherited from operations_research::sat::PropagatorInterface | |
PropagatorInterface ()=default | |
virtual | ~PropagatorInterface ()=default |
virtual bool | IncrementalPropagate (const std::vector< int > &) |
operations_research::sat::Precedences2DPropagator::Precedences2DPropagator | ( | NoOverlap2DConstraintHelper * | helper, |
Model * | model ) |
Definition at line 39 of file 2d_distances_propagator.cc.
|
override |
Definition at line 206 of file 2d_distances_propagator.cc.
|
finalvirtual |
This will be called after one or more literals that are watched by this propagator changed. It will also always be called on the first propagation cycle after registration.
We have a mandatory overlap on both x and y! Explain and propagate.
Implements operations_research::sat::PropagatorInterface.
Definition at line 116 of file 2d_distances_propagator.cc.
int operations_research::sat::Precedences2DPropagator::RegisterWith | ( | GenericLiteralWatcher * | watcher | ) |
Definition at line 199 of file 2d_distances_propagator.cc.