52 if (!helper_.SynchronizeAndSetDirection())
return false;
54 mandatory_regions_.clear();
55 mandatory_regions_index_.clear();
56 bool has_zero_area_boxes =
false;
57 absl::Span<const TaskTime> tasks =
58 helper_.x_helper().TaskByIncreasingNegatedStartMax();
59 for (
int i = tasks.size() - 1;
i >= 0; --
i) {
60 const int b = tasks[
i].task_index;
61 if (!helper_.IsPresent(
b))
continue;
67 mandatory_regions_.push_back({.x_min = item.
x.
start_max,
71 mandatory_regions_index_.push_back(
b);
73 if (mandatory_regions_.back().SizeX() == 0 ||
74 mandatory_regions_.back().SizeY() == 0) {
75 has_zero_area_boxes =
true;
78 std::optional<std::pair<int, int>> conflict;
79 if (has_zero_area_boxes) {
80 num_calls_zero_area_++;
83 num_calls_nonzero_area_++;
87 if (conflict.has_value()) {
89 return helper_.ReportConflictFromTwoBoxes(
90 mandatory_regions_index_[conflict->first],
91 mandatory_regions_index_[conflict->second]);