The present invention pertains to producing layouts from a collection of items and in particular to methods and systems for automatically producing said layouts.
Printing shops commonly produce layouts for printing press sheets that include items from multiple jobs. The prior art teaches various approaches for producing such layouts. Some approaches employ simple but fast algorithms. These algorithms tend to find reasonably efficient layouts but they are typically not the most efficient layouts that can be identified. Other approaches employ more complex layout algorithms that have a greater chance of identifying more efficient layouts.
One example of a very simple layout algorithm is a grid algorithm that segments a sheet into one or more uniform grids. The size of a grid cell may be chosen to fit at least one item from a job queue. This algorithm is amongst the fastest when a small number of items, and therefore grid cell sizes, are selected. With current computing power, thousands of layouts per second can be generated when employing a small number of grids.
Unused sheet space can occur, for example, if the grid size doesn't align with the sheet size or if the placed items do not have the same size as the grid cell. For a queue with many items of varying size and desired quantities, this algorithm may require computing many possible layouts before finding one that facilitates adequate pressrun efficiency. Further, since the algorithm may not be able to consider an arbitrary set of items from the queue, it may be unable to find a preferred layout for the pressrun.
By pressrun efficiency, we mean the degree of efficiency in the utilization of the sheet's usable area and the consumption of press resources (e.g. paper stock, ink, time). In other words, an efficient pressrun is one with an efficient utilization of the sheet and with little or no waste from the pressrun (e.g. minimal extras of each item included in the layout). Optionally, pressrun efficiency can include a value weighting for the items and can include the efficiency of downstream processing of the pressrun sheets (e.g. finishing, billing and delivery tasks).
Another example of a simple layout algorithm is a Best-Fit Decreasing Height (BFDH) algorithm which segments a sheet area into levels and populates the sheet level-wise with items from a queue such that each item placed has the same or lesser height than all items previously placed on that level. This algorithm can require somewhat more time per layout but has the advantage of accommodating a larger variety of item sizes and desired quantities.
Another example of a simple layout algorithm is the algorithm disclosed by in the above-referenced U.S. patent application Ser. No. 11/849,534. This algorithm is similar to BFDH in that it employs levels and is able to identify efficient sheet layouts for reasonably large queues by attempting layouts at the rate of approximately 60 layouts per second.
An example of a more complex layout algorithm is the algorithm disclosed in commonly-assigned copending U.S. patent application Ser. No. 12/038,013 filed Feb. 27, 2008 (Klippenstein). This algorithm searches for an optimal layout of an ordered set of items by using a multi-phased build tree approach. One part of the algorithm discloses attempting layouts for a subset of an ordered set of items using build trees. Another part of the algorithm discloses searching the neighborhood of an unsuccessful build tree in an attempt to find one that fits the sheet.
This algorithm was found to produce highly efficient layouts for an ordered set of items in about 5 seconds for most ordered set of items. Without the neighborhood searching part enabled, the basic build tree algorithm tends to identify somewhat less efficient layouts but with approximately an order of magnitude reduction in time required (e.g. a few tenths of a second). One limitation of this algorithm is that it requires an ordered set of items as a starting point. For a queue with many items of varying sizes and desired quantities, many starting points are possible and thus a significant amount of time would be required to find a preferred layout.
One can categorize the algorithms in various ways. In one scheme, based on computing resource consumption, a complex layout algorithm can be defined to consume at least an order of magnitude more resources than a simple layout algorithm. Since resource consumption can vary on a continuum, one can define complex layout algorithms relative to the most complex of the simple layout algorithms considered.
For example, if the algorithm of U.S. patent application Ser. No. 11/849,534 is identified as the most complex of the simple layout algorithms, the algorithm of U.S. patent application Ser. No. 12/038,013 can be classified as a complex layout algorithm. The choice of the cutoff point for simple layout algorithms can vary somewhat according to computing power available and print shop preferences.
Since the trend for pressrun durations is shrinking from hours to minutes, searching for an optimal layout should practically be limited to a small fraction of the pressrun time (e.g. 1-2 minutes). This allows time to consider jobs that arrive just before press time, which may facilitate more efficient pressruns. It also allows the print shop to re-prioritize jobs as late as possible to provide additional flexibility.
A need still exists to identify a preferred layout for a pressrun from a queue comprising an arbitrary number of items of varying sizes and desired quantities. The preferred layout should produce an efficient pressrun and be identified within a small fraction of the time required to perform the pressrun. Utilization of different layout algorithms with different strengths and weaknesses may be advantageous in searching for a preferred layout within practical time constraints.
The present invention provides a system and method for arranging a plurality of items on a sheet. According to one aspect of the invention, information about a printing sheet and a queue of items is obtained. Information for each item includes dimensions and a desired quantity. Simple layout algorithms can be used to generate a first set of candidate layouts for the sheet based on various combinations of items from the queue. Simple algorithms are preferred because they complete quickly. However, a layout attempt with a simple layout algorithm may or may not produce a layout.
According to another aspect of the invention, a pressrun is identified for each candidate layout produced. A pressrun includes the layout and a press run-length required to produce at least the desired quantity of each item.
According to another aspect of the invention, a profit for each candidate pressrun can be produced so that pressruns may be compared. The pressrun with the highest profit is identified.
According to another aspect of the invention, a search for item-lists having the potential to produce higher profit pressruns can be performed. An item-list includes a collection of items, including one or more copies of an item from the queue, and a run-length for the sheet but lacks a successful layout to form a pressrun.
According to one embodiment, searching for an item-list can comprise searching amongst neighbors of a home item-set, comprising single copies of items from the queue. In preferred embodiments, home item-sets can be identified from candidate pressruns and neighbor item-sets can be identified by adding and/or removing items from the home item-set.
According to another aspect of the invention, when a simple layout algorithm fails to produce a successful layout, an item-list may be identified that would produce a higher profit pressrun if a layout was possible for that item-list. Such an item-list can be recorded so that a subset of such hopeful item-lists can be evaluated using a complex layout algorithm that has a greater chance of finding a successful layout.
According to another aspect of the invention, dual-feasible functions can be used to determine whether a layout is possible using a complex layout algorithm.
According to another aspect of the invention, the set of hopeful item-lists can be ranked using a function that provides a tradeoff between layout value and layout difficulty. Layout attempts for highly ranked hopeful item-lists can be performed first.
These and other aspects of the present invention are illustrated in the detailed description of the invention.
Job information includes, at a minimum, one or more items to be reproduced. Items can be document pages, photographs, artwork, scanned images or other information that can be rendered as an image. Original job information may explicitly include additional information about the job and/or each item or this information can be identified after receiving the original job information. As an example, additional information may include customer information, pricing information, due date information, item dimensions, desired item quantities, item color requirements, and the like.
Workflow system 1 processes the job information and produces information for image reproduction device 6. Image reproduction device 6 may be a printing press or other device capable of reproducing multiple copies of an image. Alternatively, device 6 may be a display device or hardcopy device capable of reproducing one or more copies of an image for proofing or other purposes. Any number and type of device 6 can be connected with system 1.
Workflow system 1 includes a job submitter 2 that receives original job information and allows the entry or synthesis of additional job information that may be required by workflow system 1. As an example, job priority may be synthesized from a due date or other job information or may be assigned by a user. As another example, item dimensions may be identified by reading meta-data associated with an item or by analyzing an item.
Job submitter 2 can create a job 4 that includes all of the job information necessary for workflow system 1 to process job 4. This can include the job information described above as well as other information such as processing instructions to be performed by job processor 5. As examples, job processor 5 can be instructed to convert an item to a standard format (e.g. PDF), to preflight an item, to color process an item, to include an item in a layout, and to render an item or a layout for delivery to an image reproduction device 6. Some workflow systems 1 can provide multiple job processors 5 to enable concurrent operation of job processing tasks.
Job submitter 2 can insert job 4 into queue 3 so that workflow system 1 can sequence the operation of job processing tasks efficiently. For example, multiple jobs 4 may be processed independently to the point where their items are ready to be rendered for reproduction. Workflow system 1 can then, automatically or with user assistance, generate a layout of items selected from image-ready jobs 4 that will provide an efficient pressrun for device 6. Practically, queue 4 may contain relatively few items or a large quantity of items that are image-ready. Each item may be of an arbitrary size and may have an arbitrary desired quantity.
Determining a preferred layout for one or more of these image-ready items to facilitate an efficient pressrun can be a formidable task. This is especially true when the queue includes a large number of items with varying attributes. Workflow system 1, according to the present invention, performs this task by attempting a variety of potential layouts for various sets of image-ready items. The task can be time-limited and selects a preferred layout based on a profit function that seeks to maximize pressrun efficiency.
As described above, workflow system 1 can include many job processing tasks. However, in some embodiments workflow system 1 can be limited in scope to a layout tool capable of receiving job information with items that require little or no additional processing.
According to one embodiment of the present invention, system 1 derives an unordered queue of item. Each item can be associated with certain information, including at least: item dimensions and desired quantity. To illustrate the present invention in the remaining description, Table 1 identifies an exemplary queue of items to be considered when determining a layout for a pressrun.
For each item, a reference can be determined to identify the item. In addition, a desired quantity, width, height and computed area can be associated with each item. Other item characteristics, such as an indication of whether an item can be rotated when placed in a layout, can be included.
The method then proceeds to block 12 where system 1 identifies characteristics of image reproduction device 6. These characteristics may be determined by a user or by other means. Minimally, dimensions (height and width) of the imageable area of device 6 (e.g. press sheet) are identified. Other characteristics of device 6 can include paper stock, colorants and the like. These characteristics can be used to further limit the queue of items to be considered for the layout.
The method then proceeds to block 13 where system 1 identifies the first preferred pressrun for device 6. When used in this application, the term pressrun includes at least the following information about the reproduction process for device 6; a layout of items and a device run-length. A layout comprises an arrangement of items relative to the geometry of the press sheet to be used by device 6. A run-length specifies the number of press sheets to be reproduced by device 6.
Clearly, for layouts incorporating items having different desired quantities, different quantities of each item should be placed in a layout to increase pressrun efficiency. The terms item-set and item-list are defined for use in this application. By item-set we mean a collection of items that are considered for a layout. By item-list we mean a collection of one or more copies of each item of an item-set such that a pressrun of a given run-length for a layout of the item-list produces at least the desired quantity of each item of the item-set.
For example, “Item 0” and “Item 4” from Table 1 may be considered an item-set S=(“Item 0”, “Item 4”). Since the desired quantities for “item 0” and “Item 4” are vastly different, an efficient pressrun will include 15 copies of “tem 4” for every copy of “Item 0”. Thus, an efficient item-list I for item-set S may be 1=(“Item 0”, “Item 4”1, “Item 4”2, “Item 4”3 . . . “Item 4”15). An item-list can be used to identify a run-length by determining the number of press sheets required to produce at least the desired quantity of each item of the item-set.
Block 13 identifies the first preferred pressrun by attempting a variety of layouts using simple layout algorithms. A profit can be calculated for each successful layout (i.e. one that fits the sheet) and corresponding run-length and the highest profit pressrun can be retained as the first preferred pressrun. According to preferred embodiments, a substantial portion of an overall time limit can be allocated to block 13. This follows from an expectation that many layout combinations can be generated and, thus, a reasonable sampling of the search space can be explored.
Experiments have shown that pressruns identified by block 13 can have efficient area utilization but pressrun efficiency may be lacking.
The method then proceeds to block 14 where system 1 searches for higher profit pressruns. This can be done by searching the neighborhood of selected item-sets for item-lists that have at least the potential to produce a higher profit pressrun. Block 14 may attempt a layout for an item-list using a simple layout algorithm. If no layout is generated, the possibility that a successful layout can be generated using a complex layout algorithm can be determined and if a layout is deemed possible, the item-list can be identified as a hopeful item-list.
According to preferred embodiments, a substantial portion of an overall time limit can be allocated to blocks 13 and 14. In one preferred embodiment, approximately ⅔ of an overall time limit (e.g. 2 minutes) can be allocated to blocks 13 and 14 combined.
The method then proceeds to block 15 where system 1 attempts to find successful layouts for hopeful item-lists.
The method then proceeds to block 16 where the highest profit pressrun identified can be used to generate a layout of the associated item-set. In some embodiments, the layout can be presented to a user for approval/rejection. In some embodiments, the user can also have the opportunity to edit the layout (e.g. reposition items, add/delete items). If the layout is approved, the items of the item-set can then be removed from the queue of items so that a subsequent layout can be identified by the method of
According to one embodiment, system 1 considers all item-sets of cardinality less than three. Further, for item-sets of cardinality three or larger, system 1 ranks an item-set according to a scheme that favors item-sets that are more likely to produce higher-profit layout. For example, item-sets comprising items with desired quantities that form integer ratios can be ranked very high. Further, item-sets whose desired quantities form real ratios that approach integer values can be ranked somewhat lower. Similarly, other item attributes can be used to determine item-sets that have the potential to generate higher profit.
System 1 can select an item-set at random or can use a more deterministic approach. For example, a portion of the allotted time can be used to exhaustively search the item-sets with limited cardinality. Further, a pool of highly ranked item-sets can be generated for an ordered or random search.
Upon selecting an item-set, the method proceeds to block 22 where system 1 attempts a layout using a simple layout algorithm. As described above, a selection of layout algorithms may qualify as simple based on current computing power and printing shop preferences (e.g. time limits or preferred algorithms). For example, in one preferred embodiment a simple layout algorithm will complete within one second and preferably much less than one second. System 1 may be able to identify an association between item-set characteristics and one or more qualifying simple layout algorithm. For example, a user can establish an association or system 1 can automatically determine an association.
In one preferred embodiment, system 1 can select an algorithm based on the cardinality of the item-set. In particular, item-sets with cardinality of one can be exclusively associated with a grid layout algorithm. Further, item-sets with cardinality of two can be associated with several algorithms (e.g. grid, BFDH, and Huenemann). Since these algorithms are so fast, more than one algorithm may be attempted for an item-set. Further, item-sets with cardinality of three or more can be associated with the Huenemann and/or the basic build tree algorithms. In other words, selecting a layout algorithm can be based on algorithm complexity and item-set cardinality wherein selected algorithm complexity is proportional to item-set cardinality.
Upon attempting one or more layouts for an item-set, the method proceeds to block 23 where system 1 determines if a layout was found. If a layout was found, the method proceeds to block 24. Otherwise it proceeds to block 27.
Proceeding at block 24, system 1 determines whether a new layout has a higher profit than any successful layout found by block 13. Profit can be evaluated in a number of ways. According to one embodiment a function can be used to calculate the profit of the pressrun based on the layout and associated item-set.
The profit function can employ a number of characteristics, including, for example: sheet area, press run-length, fixed press cost, per-sheet cost, item area, item copies on sheet, item desired quantity, item revenue, and item priority. Appendix A provides a source code listing for one preferred profit function embodiment. Other profit functions, perhaps customizable by a print shop, can be identified.
According to one aspect of the invention, information about each successful layout, including profit, can be saved. If a new layout has the highest profit so far, that layout and run-length can be identified as the first preferred pressrun in block 25. The method then proceeds to block 26. If a new layout does not have the highest profit so far, the method proceeds to block 26 from block 24.
Proceeding at block 26, system 1 determines if the time limit for block 13 has been reached. If not, the method proceeds to block 21 to select another item-set. Otherwise the method proceeds to block 29 where the method of block 13 ends.
Proceeding at block 27, system 1 determines if the selected item-set has a reasonable possibility of producing a layout using a complex layout algorithm. According to one embodiment, dual-feasible functions (DFF) can he used. Examples of DFF can be found in “A survey of dual-feasible functions for bin-packing problems”, by F. Clautiaux et al, which is due to be published in “Annals of Operations Research” in 2009. A DFF may identify that a layout for a sheet is unlikely for a given item-list. In this case, the method proceeds to block 26. Otherwise, the method proceeds to block 28.
Proceeding at block 28, system 1 adds the item-list to a set of hopeful item-lists and then proceeds to block 26.
The method then proceeds to block 32 where a neighbor of the selected item-set can be identified. A neighbor item-set can be formed by adding or removing an item from a reference item-set. According to one embodiment, identifying neighbor item-sets by adding items may be preferred. Similarly, identifying neighbor item-sets that are only one item away from a home item-set may be preferred. In other words, searching the immediate locale of many home item-sets can be preferred to searching distant neighbors of a few home item-sets. In some embodiments, the choice of whether to add or remove an item from an existing item-list can also be based on the history of item additions and removals made throughout the course of performing the method of block 14.
The method then proceeds to block 33 where an item-list corresponding to the neighbor item-set can be identified. On entry from block 32, system 1 can derive the item list, for example, by adding copies of items of the neighbor item-set to a new item-list. Items can be added, for example, in an order that seeks to reduce the run-length implied by the item-list Items can be added, for example, until the aggregate area of the item-list reaches a pre-determined limit. Through experimentation, we've found that a limit of approximately 80% is desirable. Of course, other methods can be used. For example, when a layout exists for the home item-set, the item-list can be formed by retaining the original run-length associated with the layout and adding enough copies of the added item to achieve the desired quantity of the added item.
In entry from other than block 32, block 33 can extend the existing item-list by adding one or more items from the neighbor item-set with the intent to reduce overall run-length required to yield the desired quantities of each item of the neighbor item-set. Thus, establishing an initial conservative aggregate area limit for items is not necessarily restrictive.
The method then proceeds to block 34 where system 1 can attempt a layout by using a simple layout algorithm with the item-list as an input and with an option set to terminate early if the algorithm employs iteration (e.g. terminate on first failed attempt). Next, at block 35, system 1 determines whether a successful layout was found. If successful, the method proceeds to block 36. Otherwise, the method proceeds to block 41.
Proceeding at block 36, system 1 determines the profit for the new layout. If the profit is less than the profit of the pressrun associated with the home item-set the method proceeds to block 33 where a different, and possibly more profitable, item-list may be identified. If the profit is greater than the preferred pressrun the method proceeds to block 37. If the profit is greater than or equal to the pressrun associated with the home item-set the method proceeds to block 38.
Proceeding at block 37, replaces the current preferred pressrun with a pressrun based on the newly created layout. The method then proceeds to block 38 where the neighbor item-set replaces the current home item-set. Then the method proceeds to block 39 where system 1 determines whether a limit for searching this neighborhood has been exceeded.
Through experiments, it has been found that more profitable pressruns may sometimes be found from distant neighbors of a home item-set even though layouts for intervening neighbor item-sets are not as profitable as the layout for the home item-set. Limits for extended neighborhood searches can be based on time or number of items added/removed. For example, a limit of two items added and two items removed from a home item-set selected at block 31 can be established.
Regardless of how the limit is established, if the limit is reached at block 39, the method proceeds to block 32. Otherwise, the method proceeds to block 40 where system 1 determines whether a limit has been reached for searching all home item-sets neighborhoods. If the limit has been reached, the method proceeds to block 43 where the method ends. Otherwise, the method proceeds to block 31 where a different item-set can be selected as a home item-set as the subject of another neighborhood search.
Proceeding to block 41, after a layout attempt failure, system 1 determines whether a layout is possible. As above, use of a DFF can be used. If a layout is impossible, the method proceeds to block 39. If a layout is still possible, the method proceeds to block 42 where the item-list can be added to a set of hopeful item-lists and then proceeds to block 33.
According to one aspect of the present invention, sorting can be based on a computed rank that represents a tradeoff between value and difficulty. System 1 can compute a high rank for item-lists with high value and low difficulty. System 1 can compute a low rank for item-lists with low value and high difficulty.
According to one embodiment, system 1 computes rank using Equation 1.
Rank=Relative_Profit−(Relative_Area)10 (Equation 1)
Relative_Profit can be computed as the profit for an item-list normalized to the maximum profit amongst all hopeful item-lists. Similarly, Relative_Area can be computed as the aggregate item area for an item-list normalized to the available sheet area. According to another embodiment, system 1 can compute rank using Equation 2.
Rank=Relative_Profit−(DFF)10 (Equation 2)
Other ranking functions are also possible.
Having sorted the hopeful item-lists, the method proceeds to block 52 where the highest ranked remaining item-list can be selected. In some embodiments, DFF may not be computed prior to block 15 because it can be a relatively expensive computation. In this case, a first sort can be performed at block 51 using Equation 1. As each item-list is selected in block 52, DFF can be computed and the initial sort position for the selected item-list can be adjusted by comparing the new rank to the initially calculated ranks.
Next the method proceeds to block 53 where an attempt can be made to produce a layout using a complex layout algorithm. According to one aspect of the invention, a complex algorithm should have a greater chance of finding more efficient layouts than a simple algorithm. In some embodiments, a complex algorithm should have at least a 50% greater chance of finding a more efficient layout than the best simple algorithm used for an arbitrary queue of items.
One way to increase the chance of finding more efficient layouts is to evaluate more potential layouts than a simple algorithm. Other analytical methods may also be employed. Thus, a complex algorithm will likely consume more resources than a simple algorithm. In some embodiments, a complex algorithm should consume at least an order of magnitude more resources than any of the simple algorithms used. According to one preferred embodiment, a multi-phased build tree algorithm can be selected as a complex layout algorithm.
In some embodiments, the complex layout algorithm can be time limited by a pre-determined amount. For example, the time-limit can be based on a statistical measure of successful completion times for the algorithm. As another example, the time-limit can be based on the number of hopeful items-lists (e.g. aim to evaluate at least some fraction of the hopeful item-lists).
Upon completion of the layout attempt, the method proceeds to block 54 where system 1 determines if a successful layout was found. If successful, the method proceeds to block 55 where the item-list and layout replace the preferred pressrun. Otherwise the method proceeds to block 57.
Proceeding at block 56, selected item-lists are removed from the hopeful item-lists to increase efficiency of block 15. According to one embodiment, item-lists with lower profit than the preferred pressrun can be removed. According to another embodiment, item-lists whose profit does not exceed the preferred pressrun profit by more than a pre-determined amount can be removed.
Proceeding at block 57, system 1 determines if the overall time limit has been exceeded. If so, the method proceeds to block 58 and ends. Otherwise, the method proceeds to block 52 to select the next item-list.
These Figures were generated using a prototype embodiment of the present invention operating on the exemplary job queue of Table 1. Each diagram 10 represents a successful layout having a higher profit than the layouts of the preceding diagrams. The prototype was configured with a 180 second overall time limit and was executed on a computer, configured with the Mac OS X operating system, a 2.16 GHz Intel Core Duo CPU, and 2 GB memory.
Block 13 completed within the first second of operation and produced the layouts illustrated in
Block 14 completed after 154 seconds of operation and produced the layouts illustrated in
Block 15 started with 14 hopeful item-lists and completed after 12 seconds, having completed searches for 3 layouts. The best one found is illustrated in
Embodiments of the present invention may comprise any medium which carries a set of computer-readable signals comprising instructions which, when executed by a computer processor, cause the computer processor to execute a method of the invention. Embodiments may be in any of a wide variety of forms. Embodiments may comprise, for example, physical media such as magnetic storage media including floppy diskettes, bard disk drives, optical data storage media including CD ROMs, DVDs, electronic data storage media including ROMs, flash RAM, or the like or transmission-type media such as digital or analog communication links. The instructions may optionally be compressed and/or encrypted on the medium.
The invention has been described in detail with particular reference to certain preferred embodiments thereof, but it will be understood that variations and modifications can be effected within the scope of the invention.
Reference is made to commonly-assigned co-pending U.S. patent application Ser. No. 12/038,013 filed Feb. 27, 2008, entitled AUTOMATED LAYOUT, by Klippenstein, and commonly-assigned co-pending U.S. patent application Ser. No. 11/849,534, filed Sep. 4, 2007; Publication No. 2009/0059298 published Mar. 5, 2009, and entitled SIMULTANEOUS PRINTING OF PAGES FROM MULTIPLE JOBS, by Huenemann the disclosures of which are incorporated herein.