Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Propagates using a box energy reasoning. More...
#include <diffn.h>
Public Member Functions | |
NonOverlappingRectanglesEnergyPropagator (SchedulingConstraintHelper *x, SchedulingConstraintHelper *y, Model *model) | |
~NonOverlappingRectanglesEnergyPropagator () 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 > &) |
|
inline |
|
override |
|
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.
Our algo is quadratic, so we don't want to run it on really large problems.
Avoid integer overflows if the area of the boxes get comparable with INT64_MAX
We found a conflict, so we can afford to run the propagator again to search for a best explanation. This is specially the case since we only want to re-run it over the items that participate in the conflict, so it is a much smaller problem.
We prefer an explanation with the least number of boxes.
The new explanation isn't better than the old one. Stop trying.
Implements operations_research::sat::PropagatorInterface.
int operations_research::sat::NonOverlappingRectanglesEnergyPropagator::RegisterWith | ( | GenericLiteralWatcher * | watcher | ) |