Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class NoOverlap2DConstraint
Note: This documentation is automatically generated.
Method |
AddRectangle | Return type: void Arguments: IntervalVar x_coordinate, IntervalVar y_coordinate Adds a rectangle (parallel to the axis) to the constraint.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNoOverlap2DConstraint\u003c/code\u003e in C++ prevents overlapping of rectangles in a 2D space.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes \u003ccode\u003eIntervalVar\u003c/code\u003e for x and y coordinates to define rectangles added via the \u003ccode\u003eAddRectangle\u003c/code\u003e method.\u003c/p\u003e\n"]]],["The `NoOverlap2DConstraint` class in C++ manages constraints for non-overlapping rectangles. The core action is adding rectangles to the constraint via the `AddRectangle` method. This method accepts two `IntervalVar` arguments, `x_coordinate` and `y_coordinate`, which define the intervals of the rectangle's position parallel to each axis. Each added rectangle must not overlap with other rectangles added to the same constraint.\n"],null,["# NoOverlap2DConstraint\n\nC++ Reference: class NoOverlap2DConstraint\n==========================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`AddRectangle`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model.h#L682) | Return type: `void ` Arguments: `IntervalVar x_coordinate, IntervalVar y_coordinate` Adds a rectangle (parallel to the axis) to the constraint. |"]]