14#ifndef OR_TOOLS_SAT_2D_TRY_EDGE_PROPAGATOR_H_
15#define OR_TOOLS_SAT_2D_TRY_EDGE_PROPAGATOR_H_
47 bool y_is_forward_after_swap,
bool swap_x_and_y,
51 x_is_forward_after_swap_(x_is_forward_after_swap),
52 y_is_forward_after_swap_(y_is_forward_after_swap),
53 swap_x_and_y_(swap_x_and_y) {}
88 IntegerValue new_x_min);
91 void PopulateActiveBoxRanges();
95 bool x_is_forward_after_swap_;
96 bool y_is_forward_after_swap_;
98 std::vector<IntegerValue> cached_y_hint_;
100 std::vector<IntegerValue> potential_x_positions_;
101 std::vector<IntegerValue> potential_y_positions_;
103 int64_t num_conflicts_ = 0;
104 int64_t num_propagations_ = 0;
105 int64_t num_calls_ = 0;
108 bool CanPlace(
int box_index,
109 const
std::pair<IntegerValue, IntegerValue>& position,
PropagatorInterface()=default
Simple class to add statistics by name and print them at the end.
std::vector< int > GetMinimumProblemWithPropagation(int box_index, IntegerValue new_x_min)
~TryEdgeRectanglePropagator() override
std::vector< Rectangle > placed_boxes_
TryEdgeRectanglePropagator(bool x_is_forward_after_swap, bool y_is_forward_after_swap, bool swap_x_and_y, NoOverlap2DConstraintHelper *helper, Model *model)
int RegisterWith(GenericLiteralWatcher *watcher)
std::vector< bool > is_in_cache_
std::vector< int > changed_mandatory_
std::vector< Rectangle > mandatory_regions_
std::vector< int > changed_item_
virtual bool ExplainAndPropagate(const std::vector< std::pair< int, std::optional< IntegerValue > > > &found_propagations)
std::vector< RectangleInRange > active_box_ranges_
Bitset64< int > has_mandatory_region_
std::vector< bool > is_active_
void CreateAndRegisterTryEdgePropagator(NoOverlap2DConstraintHelper *helper, Model *model, GenericLiteralWatcher *watcher, int priority)
In SWIG mode, we don't want anything besides these top-level includes.