Class RectanglesPlacementThreads
java.lang.Object
topics.branchandbound.utils.threads.BranchAndBoundThreads
topics.branchandbound.rectangles.RectanglesPlacementThreads
Optimal Placement of Rectangles (Concurrent Execution)
This class solves the 2D bin packing variant where a given set of rectangular pieces must be placed on an N × N grid to minimize the bounding box area. It extends the multithreaded Branch and Bound framework to evaluate multiple branches of the state space tree simultaneously, leveraging parallel execution for performance gains on multi-core architectures.
*Complexity
- Time Complexity:
O((2 × N²)P)- The theoretical worst-case remains exponential relative to the grid size N and pieces P. However, concurrent evaluation accelerates the discovery of tight upper bounds, triggering earlier and more aggressive global pruning across parallel threads. - Space Complexity:
O(T × N²)- Where T is the number of concurrent worker threads. Each thread requires isolated memory allocation to track its specific subset of board configurations during traversal.
- Author:
- vicegd
-
Field Summary
Fields inherited from class BranchAndBoundThreads
bestNode, globalUpperBound, nodeHeap, rootNode -
Constructor Summary
ConstructorsConstructorDescriptionRectanglesPlacementThreads(int boardSize, List<Piece> pieces) Initializes the concurrent problem solver and establishes the execution tree root. -
Method Summary
Methods inherited from class BranchAndBoundThreads
branchAndBound, getBestNode, getRootNode, printSolutionTrace
-
Constructor Details
-
RectanglesPlacementThreads
-