You are working in a factory that produces rectangular glass sheets. You have a large stock plate of size W x H. Customers have placed order for N differents types of smaller rectangular pieces. Each piece type i has dimensions
and a specific market value
.
The Challenge:
You need to cut the stock plate to maximize the total value of the pieces obtained. However, you must follow the Guillotine Cut constraint:
- Every cut must go from one edge of the current plate to the opposite edge in a straight line (horizontal or vertical), splitting the plate into two smaller rectangles.
- You can rotate the pieces 90 degrees if it helps.
- This is a "2nd-stage" guillotine problem, meaning you first cut the stock plate into several strips (first stage), and then each strip is cut into individual pieces (second stage). Or, to make it harder, we allow recursive guillotine cuts to any depth.
Input:
- StockSize: A 1x2 vector [W, H] ( The dimensions of the large plate ).
- Items: An N x 3 matrix. Each row is [width, height, value].
Output:
- maxValue: The maximum total value you can extract from the stock plate
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers2
Suggested Problems
More from this Author15
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!