Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::NonOverlappingRectanglesEnergyPropagator Class Reference

Propagates using a box energy reasoning. More...

#include <diffn.h>

Inheritance diagram for operations_research::sat::NonOverlappingRectanglesEnergyPropagator:
operations_research::sat::PropagatorInterface

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 > &)
 

Detailed Description

Propagates using a box energy reasoning.

Definition at line 39 of file diffn.h.

Constructor & Destructor Documentation

◆ NonOverlappingRectanglesEnergyPropagator()

operations_research::sat::NonOverlappingRectanglesEnergyPropagator::NonOverlappingRectanglesEnergyPropagator ( SchedulingConstraintHelper * x,
SchedulingConstraintHelper * y,
Model * model )
inline

Definition at line 41 of file diffn.h.

◆ ~NonOverlappingRectanglesEnergyPropagator()

operations_research::sat::NonOverlappingRectanglesEnergyPropagator::~NonOverlappingRectanglesEnergyPropagator ( )
override

Definition at line 241 of file diffn.cc.

Member Function Documentation

◆ Propagate()

bool operations_research::sat::NonOverlappingRectanglesEnergyPropagator::Propagate ( )
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.

Todo
(user): double-check/revisit the algo for box of variable sizes.

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.

Definition at line 261 of file diffn.cc.

◆ RegisterWith()

int operations_research::sat::NonOverlappingRectanglesEnergyPropagator::RegisterWith ( GenericLiteralWatcher * watcher)

Definition at line 513 of file diffn.cc.


The documentation for this class was generated from the following files: