Rectangular packing algorithms determine optimal placement of rectangular items in a non-overlapping manner within a rectangular boundary. The current art consists of two primary approaches: (a) pure guillotine, and (b) maxrect. A third, more primitive, “shelf” algorithm is used to a lesser extent. Such existing approaches determine a solution by placing individual items, then resolving the “cutting” implications of the placement by determining what remaining area is available for placement of additional items. For example, with reference to
Overview
Existing approaches determining an optimal placement of items in a non-overlapping manner within a boundary of a shape can be slow to process and can result in inefficient solutions. To address these issues, an improved technique is introduced. In an example embodiment, items of the same or similar size are pre-grouped into “blocks” and placed as units into a target shape (e.g., a rectangle) during optimization. A two-dimensional variant of dynamic programming is then applied to recursively fill the target shape with the blocks of items while avoiding analyzing redundant areas of the solution space.
The introduced technique has broad applications ranging from packing items into a box for shipment to allocating a substrate into rectangular areas to manufacture multiple items from a common “parent” piece of substrate. The introduced technique has particular application in rectangular packing where the contained items must be separable from all other items by a series of guillotine “cuts” running from one edge of an “uncut” rectangle to the opposite edge of that same rectangle. Accordingly, for simplicity, various embodiments of the introduced technique are described in the context of defining guillotine “cuts”; however, a person having ordinary skill in the art will recognize that the technique can also be applied to other areas such as packing items in a box for shipment. Further, while various embodiments of the introduced technique are described into the context of packing rectangular shapes into a target rectangular shape, a person having ordinary skill in the art will recognize that the introduced technique can similarly be applied to pack other types of shapes including non-rectangular shapes such as triangles, rhombuses, rhomboids, trapezoids, etc. Still further, while various embodiments of the introduced technique are described in the context of packing two-dimensional (2D) shapes into a target 2D shape, a person having ordinary skill in the art will recognize that the introduced technique can similarly be applied to pack three-dimensional (3D) volumetric shapes (e.g., cubes, cuboids, triangular prisms, etc.) into target 3D volumetric shapes.
The introduced technique improves on existing approaches by addressing several problems with existing approaches such as the following:
Example process 300 begins at step 302 with receiving an input indicative of a plurality of items to be placed in a target shape. An “item” in this context may refer, for example, to individual instances of image to be printed, a box to be packaged, a part to be cut from a substrate, etc. For example, in the commercial printing industry, the production of commercially imaged media sheets may include more than one media instance of a product, or more than one product, that can be positioned on a media sheet. Before imaging, the instances may be displayed in a layout, which for purposes of this description means a virtual depiction of a number of media instances. After imaging, the individual instances or items in the layout are cut into individual products, for example, using a “guillotine cutting” process.
Accordingly, each item indicated in the input received at step 302 may have a corresponding shape with associated dimensions. For example, in some embodiments, each of the items indicated in the input received at step 302 is a rectangle having two dimensions: height and width. In some embodiments, the item is a two-dimensional (2D) representation of an otherwise three-dimensional (3D) physical object such as a physical box. For example, an “item” in this context may include a 2D rectangular footprint of the 3D physical box. In some embodiments, the item itself may be associated with more than two dimensions. For example, in some embodiments, shape associated with a given item may be a volumetric shape having three dimensions: height, width, and length. For example, an item having a 3D volumetric shape may represent the volume of a physical product that is to be packed into a physical box.
Example process 300 continues at step 304 with sorting at least some of the plurality of items indicated at step 302 into one or more item groups. In some embodiments, the items are sorted based on size and/or shape. For example, the sorting of items based on size and/or shape may include sorting a set of items having different dimensions into multiple groups where each of the multiple groups includes a subset of the overall set of items having the same or similar dimensions. In other words, this step may include grouping a subset of items that satisfy a similarity criterion and assigning those items to a particular item group. The similarity criterion may specify that all items in an item group have the exact same dimensions and/or may specify a threshold requirement to be considered similar. The threshold requirement may include a specified value such as within 0.2 inches of each other. In this example, items that are 1.9 inches in width may be grouped with other items that are 2.0 inches or 2.1 inches in width. In other embodiments, the threshold requirement may specify a percentage values such as within 10% of a mean value. In this example, an item that is 1.8 inches in width may be grouped with another item that is 2.2 inches in width where the mean value for the group is 2.0 inches. Further, the sorting of items may be performed without regard to orientation. For example, a first item properly oriented with a width of 2 inches and a height of 5 inches may be grouped together with a second item properly oriented with a width of 5 inches and a height of 2 inches. These are just illustrative examples of similarity criteria and are not to be construed as limiting. Other types of similarity criteria can also be applied depending on the requirements of a given embodiment.
In some embodiments, step 304 includes processing data received in the input of step 302 to sort the one or more items. The type of processing performed at step 304 will depend on the nature of the data received at step 302. For example, in some embodiments, data received at step 302 may include a set of dimensions associated with the plurality of items. In such an embodiment, the dimensions of the plurality of items may be input into a sorting algorithm to group the items based on their dimensions.
In other embodiments, the data received at step 302 may require further processing to determine the dimensions associated with the items. For example, the input received at step 302 may include a set of images that are to be printed on a substrate. In such an example, step 204 may include processing the images to determine the dimensions associated with items (e.g., rectangular shapes) that represent the images. In some embodiments, this can include extracting metadata from an image file that indicates the dimensions of the image, reading page setup information included in a print job that indicates the final print size for the images, etc. In some embodiments, step 304 may include querying or otherwise accessing an external database for information regarding the dimensions of the various items indicated at step 302. For example, the input received at step 302 may include an indication of a number of products that are to be packed in a physical box. This indication may be in the form of a set of identifiers (e.g., universal product codes (UPC)) associated with the products that are to be packed in a box. In such an example, step 304 may include accessing an external database to retrieve the dimensions of the products associated with the identifiers.
In some embodiments, a machine learning model implementing one or more clustering algorithms may be applied to sort the various items into one or more groups based on size and/or shape. For example, dimensions of the various items may be input into a clustering model to output a set of items sorted based on dimensional similarities. Examples of clustering algorithms that can be applied include K-means clustering, mean-shift clustering, hierarchical clustering, etc.
The example process 300 continues at step 306 with creating, generating, or otherwise defining potential “blocks” using the sorted items of the same or similar size (i.e., dimensions). In an example embodiment, the “blocks” are rectangular arrangements of similarly sized rectangular items in rows and columns ranging from a single item up to the maximum number of items of this similar size indicated in the input received at step 302. In other words, in some embodiments, step 306 may include defining one or more potential blocks for each item group of substantially similar items. For example,
In some embodiments, the potential blocks are constrained to be rectangular such that irregular arrangements such as arrangement 408a do not qualify as a block. Further, the potential blocks are constrained to the dimensions of a target shape rectangle. For example, although a rectangle, arrangement 410a may not qualify as a block if its longest dimension (e.g., width) exceeds that of the longest dimension of the target rectangle. The target rectangle may be based on the dimensions of, for example, a piece of substrate (e.g., a media sheet on which items are to be printed and cut from) a box within which items are to be packaged, or any other real-world dimensional constraint.
It shall be appreciated that the potential blocks 402a, 404a, and 406a depicted in
Further, as previously discussed, the introduced technique can also be applied to pack shapes other than rectangles.
Also, as discussed with respect to
Returning to
Example process 500 begins at step 502 with placing a first potential block in the target rectangle. The first potential block to be placed is selected from the set of potential blocks generated, for example, at step 304 in process 300. The potential blocks to be placed may be sorted by size (e.g., primarily by width and secondarily by height). A target rectangle is then defined, for example based on input information regarding dimensions of a substrate such as a paper media sheet. In some embodiments, the first block placed at step 502 is the largest (e.g., primarily by width) potential block that fits within the target rectangle. For simplicity of explanation, placement of a block will be in the lower left corner of the destination rectangle, but due to symmetry could be in any corner.
In some embodiments, a block may be selected for placement in the target rectangle if the block satisfies the following conditions:
The third constraint noted above is based on dynamic programming inspiration to avoid redundant testing of block placements. By avoiding testing redundant block placements, the technique improves efficiency.
After the first block (e.g., the largest block) is placed (e.g., in the lower left corner of the target rectangle at step 502), the remainder of the target rectangle is divided or “cut” at both a right edge of the placed block and a top edge of the placed block to define two remaining rectangles, potentially of zero area. Note that the act of cutting at this step may include just defining a cut line or dividing the area of the remainder of the target rectangle.
At step 504, a new target rectangle is defined based on the remainders of the initial target rectangle. For example, in some embodiments, the cut that produces the rectangle of the largest area is selected first, and both rectangles resulting from this cut are used to define new target rectangles to be filled recursively by other blocks. In some embodiments, the rectangles resulting from the other cut are also filled recursively. In other words, a next potential block may be placed at step 506 in any of the new target rectangles and this process can continue (as indicated at step 508) to recursively define new target rectangles and fill the new target rectangles with potential blocks until all the blocks have been placed or no other blocks are able to be placed.
Step 508 can be recursively repeated while avoiding redundant placement solutions, for example, by applying the previously mentioned block placement constraints.
The results of the multiple placement solutions can then be compared at step 510 to select an optimal placement solution. The optimal placement solution selected at step 510 may be the placement solution that results in most of the target shape being filled with potential blocks. Alternatively, or in addition, the optimal placement solution may be the placement solution that places the fewest blocks and/or requires the fewest cuts. Other constraints may similarly be applied to define which of the multiple placement solutions is an optimal solution.
In some embodiments, the introduced technique first attempts to find a solution with a minimal number of placed blocks. If no solution is found using this approach, the number of blocks allowed can be increased one block at a time. This provides a more focused first search of the solution space which may lead to more ideal solutions since fewer placed blocks require fewer cuts, and solutions can be found more quickly. As the number of blocks allowed is increased, the depth of the solution space being searched is also increased. For example, the solution depicted in
Example process 500 concludes at step 512 with generating an output based on the selected placement solution. In some embodiments, this step may include presenting the selected placement solution to a user, for example, by displaying a visual representation of the placement solution via a display of a user computing device (e.g., personal computer, mobile device, etc.). In other embodiments, the output generated at step 512 may include instructions or other information that is useable by one or more components of an automated production system to perform a production process. For example, the output generated at step 512 may include a print layout that is useable by a printer (e.g., inkjet, laser printer, etc.) to print a plurality of images on print media (e.g., paper). As another example, the output generated at step 512 may include a cutting pattern that is useable by an automated cutting system (e.g., an automated guillotine cutter) to cut a substrate (e.g., a print media) into multiple partitions. As another example, the output generated at step 512 may include a placement sequence that is useable by an automated packaging system to place multiple physical products into a box for shipping. As another example, the output generated at step 512 may include a resource allocation. Resources in this example may include computing resources such as processing, memory, storage, etc. In such an example, items place in a target shape may represent resource allocation requests for certain computing tasks. In some embodiments, the two dimensions of an item shape may represent two different resources (e.g., processing and memory). The target shape in this example would represent the available resources. The placement solution would therefore represent a resource allocation solution to process one or more of the task using the available resources.
In some embodiments, the output generated at step 512 may include control commands that are readable by a device such as a printer or automated cutter to perform a production process. In other embodiments, the output generated at step 512 may include data (e.g., instructions, job definition files, etc.) that are interpreted and translated by a controller device into control commands that are readable by a device such as a printer or automated cutter to perform a production process. For example, a computer system may output a job file at step 512 that is based on the placement solution. The job file may be input to a printer controller that interprets the job file and translates the job file into control commands or other machine-readable instructions that are used by a printer to print images onto a substrate according to the placement solution.
The process begins by placing a first block 602 in the target rectangle 600 as shown in
Since there is still available space to be filled to the right of block 602a, and since that remainder space is too small to fit any other potential blocks, the process may try a next smaller potential block 602b that includes the same items as block 602a and then try to place another potential block in the new remainder space, for example, as shown in
Since there is still available space to the right of blocks 602b and 604b, the process may try to fill a remainder space after the first block with the widest block that can fit in that remainder space and that does not represent a sub-block of any previously placed block. For example, as shown in
Due to guillotine cutting geometry, starting with the largest block guarantees any sub-block of the same height or width of any placed block has effectively already been tested and will never need be tested in the dimension that would increase the placed block size to a size that was already tested. Specifically, any sub-block that can be created by a horizontal cut of an already placed block never needs to be tested above the placed block, as this will represent the testing of a redundant solution. Similarly, any sub-block that can be created by a vertical cut of an already placed block never needs to be tested to the right of the placed block.
Consider, for example, the arrangement depicted in
As previously mentioned, the sequence shown in
Example Implementations for the Shape Packing Technique
As previously mentioned, packing solutions generated using the introduced technique can be implemented in a number of different applications such as arranging items in a box for shipment or allocating a substrate into rectangular areas to manufacture multiple items from a common “parent” piece of substrate.
The layout planner 702 may comprise a computing system (e.g., such as computing system 900 described with respect to
Once the layout planner generates a layout solution using the introduced technique, the layout planner 702 may output information (e.g., the placement solution, a cutting pattern, cutting instructions, etc.) to a cutting system controller 708, which may then generate control commands configured to cause an automated cutter apparatus 710 (e.g., a guillotine cutter) to perform a cutting process on the substrate 712 based on the layout.
The automated cutter apparatus 710 may include one or more blades capable of cutting the substrate 712 and one or more actuators (e.g., mechanical, electromechanical, hydraulic, pneumatic, etc.) arranged to articulate the one or more blades to cut the substrate 712. The types of blades used will depend on various factors such as the types of cuts (e.g., orthogonal vs. oblique), the thickness of the substrate 712, and/or the material of the substrate 712. In some embodiments, the cutter 710 may include multiple different types of blades that are each used for different scenarios. In some embodiments, the output sent to the cutter controller 708 may specify the types of cuts and characteristics of the substrate 712. The cutter controller 708 will then interpret the information to control the multiple blades of the cutter 710 to most effectively cut the substrate 712 according to a cutting pattern.
In some embodiments, the introduced technique may be implemented in a print production pipeline that includes both printing processing and cutting processes.
In some embodiments, the layout planner 802 may coordinate orders of operations between the printing system and the cutting system. For example, in some embodiments, the layout planner 802 may cause the printer 816 to print on the substrate 812 before causing the cutter 810 to cut the substrate 812. In some embodiments, substrate 812 may be moved (manually or automatically) from the printing system after printing to the cutting system to cut the printed items into individual products according to the generated layout. Although not depicted in
It shall be appreciated that the systems described with respect to
Example Computing System
The computing system 900 may include one or more processing units (e.g., central processing units (CPU) and/or graphical processing units (GPU) (collectively the “processor”)) 905, one or more memory units (collectively “memory”) 910, one or more input/output devices 925 (e.g., keyboard and pointing devices, touch devices, display devices, audio input/output devices, etc.), one or more storage devices 920 (e.g., disk drives, solid state drives, etc.), and one or more network adapters 930 (e.g., network interfaces) that can communicatively couple via an interconnect 915. The interconnect 915 is illustrated as an abstraction that represents any one or more separate physical buses, point-to-point connections, or both connected by appropriate bridges, adapters, or controllers. The interconnect 915, therefore, may include, for example, a system bus, a Peripheral Component Interconnect (PCI) bus or PCI-Express bus, a HyperTransport or industry standard architecture (ISA) bus, a small computer system interface (SCSI) bus, a universal serial bus (USB), IIC (I2C) bus, an Institute of Electrical and Electronics Engineers (IEEE) standard 1394 bus (also called Firewire), or any other suitable system for facilitating communication between the various components of the example computing system 900.
The memory 910 and storage device 920 are computer-readable storage media that may store instructions that implement at least portions of the various embodiments. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium (e.g., a signal on a communications link). Various communications links may be used such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection, etc. Thus, computer-readable media can include computer-readable storage media, e.g., non-transitory media, and computer-readable transmission media.
The instructions stored in memory 910 can be implemented as software and/or firmware to program the processor 905 to carry out actions described above. In some embodiments, such software or firmware may be initially provided to the processor 905 by downloading the software or firmware from a remote system through the computing system 1500, e.g., via network adapter 930.
The various embodiments introduced herein can be implemented by, for example, programmable circuitry, e.g., one or more microprocessors, programmed with software and/or firmware, or entirely in special-purpose hardwired (non-programmable) circuitry, or in a combination of such forms. Special-purpose hardwired circuitry may be in the form of, for example, one or more ASICs, PLDs, FPGAs, etc.
This application claims the benefit of U.S. Provisional Application No. 62/712,879, filed on Jul. 31, 2018, and titled “Rectangle Packing Technique for Guillotine Cutting,” which is incorporated in its entirety by reference.
Number | Name | Date | Kind |
---|---|---|---|
5430831 | Snellen | Jul 1995 | A |
6650433 | Keane | Nov 2003 | B1 |
6976798 | Keane | Dec 2005 | B2 |
7542155 | Paskalev | Jun 2009 | B2 |
7554689 | Tonisson | Jun 2009 | B2 |
9298404 | Niblett, Jr. | Mar 2016 | B2 |
9539828 | Yasinover | Jan 2017 | B2 |
10642551 | Sloan, IV | May 2020 | B2 |
10679106 | Burch, Jr. | Jun 2020 | B2 |
20060100727 | Dash et al. | May 2006 | A1 |
20080144121 | Malatesta | Jun 2008 | A1 |
20130174702 | Holt et al. | Jul 2013 | A1 |
20140132988 | Keane et al. | May 2014 | A1 |
20170344316 | Keane | Nov 2017 | A1 |
20180085962 | Holt et al. | Mar 2018 | A1 |
Entry |
---|
Berm0nd et al., “Bin packing with colocations ”, Jansen K., Mastrolilli M. (eds) Approximation and Online Algorithms. WAOA 2016. Computer Science, vol. 10138., Jan. 7, 2017 (Year: 2017). |
Bermond , et al., “Bin packing with colocations”, Jansen K., Mastrolilli M. (eds) Approximation and Online Algorithms. WAOA 2016. Computer Science, vol. 10138., Jan. 7, 2017 [retrieved Oct. 3, 2019] https://link.springer.com/chapter/10.1007/978-3-319-51741-4 entire document, especially Abstract; p. 3-10, Jan. 7, 2017. |
Ortmann , et al., “New and improved level heuristics for the rectangular strip packing and variable-sized bin packing problems ”, European Journal of Operational Research vol. 203, Iss. 2, Jun. 1, 2010 [retrieved on Oct. 3, 2019] https://www.sciencedirect.com/science/article/pii/S0377221709005360, entire document, especially abstract; p. 4, col. 1-2, Jun. 1, 2010. |
Cintra, G. F., et al., “Algorithms for two-dimensional cutting stock and strip packing problems using dynamic programming and column generation”, Science Direct; European Journal of Operational Research 191; Discrete Optimization, Aug. 23, 2007, pp. 61-85. |
Jylanki, Jukka, “A Thousand Ways to Pack the Bin—A Practical Approach to Two-Dimensional Rectangle Bin Packing”, retrieved from http://clb.demon.fi/files/RectangleBinPack.pdf., Feb. 27, 2010, pp. 1-50. |
Martinez, Antonio , et al., “Constructive Procedures to Solve 2-Dimensional Bin Packing Problems with Irregular Pieces and Guillotine Cuts”, Omega 52; retrieved online from url: https://doi.org/10.1016/j.omega.2014.10.007, Oct. 28, 2014, pp. 1-33. |
Scheithauer, G., “Introduction to Cutting and Packing Optimization”, Chapter 6, Optimal Guillotine Cutting; International Series in Operations Research & Management Science 263, 2018, pp. 157-181. |
Zhang, Defu , et al., “A priority heuristic for the guillotine rectangular packing problem”, Information Processing Letters 116, Aug. 21, 2015, pp. 15-21. |
Number | Date | Country | |
---|---|---|---|
20200038917 A1 | Feb 2020 | US |
Number | Date | Country | |
---|---|---|---|
62712879 | Jul 2018 | US |