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

#include <diffn_util.h>

Public Attributes

std::vector< Rectangle > conflicts
 
std::vector< Rectangle > candidates
 

Detailed Description

Monte-Carlo inspired heuristic to find a rectangles with an energy conflict:

  • start with a rectangle equals to the full bounding box of the elements;
  • shrink the rectangle by an edge to the next "interesting" value. Choose the edge randomly, but biased towards the change that increases the ratio area_inside / area_rectangle;
  • collect a result at every conflict or every time the ratio used_energy/available_energy is more than candidate_energy_usage_factor;
  • stop when the rectangle is empty.

Definition at line 585 of file diffn_util.h.

Member Data Documentation

◆ candidates

std::vector<Rectangle> operations_research::sat::FindRectanglesResult::candidates

Rectangles without a conflict but having used_energy/available_energy > candidate_energy_usage_factor. Those are good candidates for finding conflicts using more sophisticated heuristics. Those rectangles are ordered so the n-th rectangle is always fully inside the n-1-th one.

Definition at line 593 of file diffn_util.h.

◆ conflicts

std::vector<Rectangle> operations_research::sat::FindRectanglesResult::conflicts

Known conflicts: the minimal energy used inside the rectangle is larger than the area of the rectangle.

Definition at line 588 of file diffn_util.h.


The documentation for this struct was generated from the following file: