Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
PARALLEL SOLUTION GENERATION
Document Type and Number:
WIPO Patent Application WO/2015/040282
Kind Code:
A1
Abstract:
The application describes parallel solution generation. A data processing apparatus (100) comprises a memory (104) including a computer program code, and at least two processors (110, 116, 120) configured to execute the computer program code (104). The computer program code comprises (104): a component program (112) run in parallel on at least two processors (110) to generate solution components (106) compiled in parallel of points, and to store the added solution components (106) in the memory (102); and a solution program (114, 118, 122) run in parallel on at least two processors to generate a solution (108) by adding one solution component (106) at a time, read from the memory (102), to the solution (108) based on a key point, and to store the added solution component (106) to the solution (108) in the memory (102).

Inventors:
BRÄYSY OLLI (FI)
Application Number:
PCT/FI2014/050723
Publication Date:
March 26, 2015
Filing Date:
September 22, 2014
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
PROCOMP SOLUTIONS OY (FI)
International Classes:
G06F9/50; G06F9/44; G06F19/10; G06Q10/04
Other References:
CHRIS GROËR ET AL: "A Parallel Algorithm for the Vehicle Routing Problem", INFORMS JOURNAL ON COMPUTING, vol. 23, no. 2, 1 May 2011 (2011-05-01), pages 315 - 330, XP055160570, ISSN: 1091-9856, DOI: 10.1287/ijoc.1100.0402
TEODOR GABRIEL CRAINIC ET AL: "Parallel meta-heuristics", IN REPORTS OF CIRRELT, UNIVERSITY OF MONTREAL, CANADA. CIRRELT-2009-22, 1 May 2009 (2009-05-01), University of Montrreal, pages 1 - 53, XP055161605, Retrieved from the Internet [retrieved on 20150113]
NAGATA Y ET AL: "A powerful route minimization heuristic for the vehicle routing problem with time windows", OPERATIONS RESEARCH LETTERS, NORTH-HOLLAND, AMSTERDAM, NL, vol. 37, no. 5, 1 September 2009 (2009-09-01), pages 333 - 338, XP026574018, ISSN: 0167-6377, [retrieved on 20090524], DOI: 10.1016/J.ORL.2009.04.006
OLLI BRÄYSY ET AL: "A multi-start local search algorithm for the vehicle routing problem with time windows", EUROPEAN JOURNAL OF OPERATIONAL RESEARCH, vol. 159, no. 3, 8 October 2003 (2003-10-08), pages 586 - 605, XP055161117, ISSN: 0377-2217, DOI: 10.1016/S0377-2217(03)00435-1
Attorney, Agent or Firm:
KOLSTER OY AB (Helsinki, Helsinki, FI)
Download PDF:
Claims:
Claims

1. A data processing apparatus comprising a memory including a computer program code, and at least two processors which are configured to execute the computer program code, said computer program code comprising:

a component program run on at least two processors to form solution components compiled of points in parallel, and to store the formed solution components in the memory; and

a solution program run in parallel on at least two processors to generate a solution by adding one solution component at a time, read from the memory, to the solution based on a key point, and to store the added solution component to the solution in the memory.

2. A data processing apparatus as claimed in claim 1 , wherein the solution program additionally generates the solution so that on each processor the solution is independently generated.

3. A data processing apparatus as claimed in claim 1 , wherein the component program additionally divides the points to at least two processor- specific subsets and generates the solution components of them separately for each processor, and the solution program additionally generates the solution in such a manner that on each of the at least two processors the solution is generated processor-specifically by the use of processor-specific solution components.

4. A data processing apparatus as claimed in any one of the preceding claims, wherein the solution program additionally selects, to the solution, the solution component which has the best key point and which has no overlaps with the solution components already selected to the solution.

5. A data processing apparatus as claimed in any one of the preceding claims, wherein the solution program additionally selects, to the solution, the solution component which contains a key point but has overlaps with the solution components already selected to the solution, and which has the best efficiency value after the overlaps have been removed.

6. A data processing apparatus as claimed in any one of the preceding claims, wherein the solution program additionally places, after the removal of overlaps, individual solution points still unselected by that time, in the solution components of the solution, which have already been selected.

7. A data processing apparatus as claimed in any one of the previous claims, in which, the solution program lastly additionally generates a dedi- cated solution component for such missing points of the solution, for which no solution component can be found and which cannot be placed in the solution components of the solution, which have already been selected.

8. A data processing apparatus as claimed in any one of the preceding claims, wherein:

the application area of the program code comprises route optimization in logistics;

the solution components comprise individual routes and/or parts of individual routes;

the evaluation of the solutions is based on at least one of the following: length of routes, capacity use of routes, total time of routes, fair allocation of routes, suitability of routes to time limits, compatibility of routes, priority of routes;

the key points are obtained by determining unrouted points; corrections are based on the placing and/or changes of individual points; and

the combined solution comprises a compatible set of routes for a predetermined area and/or time period.

9. A data processing apparatus as claimed in any one of the previous claims, wherein the first processor comprises a microprocessor, processor core, or graphics processor, and the second processor comprises a microprocessor, processor core, or graphics processor.

10. A computer program code as claimed in any one of the preceding claims 1 - 9, wherein the computer program code when run on at least one processor generates the solution components, and when run on at least two processors generates the solution as claimed in any one of claims 1 - 9.

Description:
Parallel solution generation

Field

[0001] The invention relates to a data processing apparatus and a computer program code, which are used to generate a parallel solution.

Background

[0002] Massive parallel computing has risen to become the central factor in boosting the power and speed of optimization. In this regard, the utilization of both the CPU and GPU technologies (Central Processing Unit / Graphics Processing Unit) play important roles. The challenge is that the current optimizing methods, in particular in the case of NP-hard (Non-deterministic Polynomial-time hard) discrete optimization problems, are poorly suited to massive parallel computing. In addition, the optimization of realistic practical problems is challenging by complex improvement heuristics and the maintenance of these methods is laborious.

[0003] Based on what was noted in the above, various kinds of methods that are based on partitioning, such as set covering and set partitioning, are a logical choice. In them, when optimizing routes, for example, first a set of routes or parts thereof are created, and then the created routes are combined into a solution either exactly of heuristically.

[0004] Some research exists on utilizing GPU for optimization. GPU has been used to distribute parts of the work to be performed between different processors. In practice, the evaluation of moves has been done with the aid of GPU. An evaluation always needs to be carried out with respect to a reference point, that is, whenever an improving move is found, evaluations must be interrupted, the reference point updated, and started from the beginning. Because the update is a arduous operation, the GPUs are in a wait state most of the time. Therefore, the obtained speed advantages are marginal. Some attempts have been made into making the evaluations proportionately more complex and/or updating operations proportionately lighter, whereby there would be less wait time for the processors, but, in pursuance of this, time is wasted on inefficient computing.

[0005] The fundamental problem of the set covering methods is that generating compatible and at the same time efficient and different enough routes is immeasurably challenging, if the routes are built independently/in parallel. This results in that to compile a good solution, the quantity of the built individual routes needs to be really high, which becomes a challenge despite the boost in computing power.

Brief description

[0006] The object of the invention is to provide an improved data processing apparatus and an improved computer program code.

[0007] One aspect of the invention is disclosed in the form of the data processing apparatus according to claim 1.

[0008] A second aspect of the invention is disclosed in the form of the computer program code according to claim 10.

[0009] The advantages of the invention at least include excellent support for massive parallel computing and diverse models, as well as its universality and feasibility. Because the combining is performed in order one component at a time, it is immediately apparent what the best selection is or whether the selected path of combining is worth continuing.

List of figures

[0010] Embodiments of the invention will be described below by way of example, referring to the attached drawings, of which:

[0011] Figures 1 , 2, 3, 4 and 5 show exemplary embodiments of a data processing apparatus;

[0012] Figures 6, 7 and 8 show exemplary embodiments of solution components and a solution;

[0013] Figures 9A, 9B, 9C, 9D, 9E, 9F, 9G, 9H, 9I, 9J and 9K show exemplary embodiment of generating a solution, and;

[0014] Figure 10 shows an exemplary embodiment of a data processing apparatus.

Description of embodiments

[0015] The embodiments to be disclosed next are merely examples. The invention is not restricted to the disclosed embodiments but they are examples of feasible ways of implementation. Features of various embodiments may also be combined unless they are specifically conflicting or alternative with regard to their technical implementation. The word "comprising" means that the disclosed embodiment includes the features referred to, but there may be additional features, too, that are not mentioned. It should be noted that the Figures present simplified block diagrams in which only the essential features from the viewpoint of the embodiments are described; a person skilled in the art will find it obvious that the data processing apparatus may include many other features and structures, too. However, such other parts may be irrelevant in regard of the actual invention, and thus there is no need to discuss them in greater detail here. Further, it is to be noted that although the elements are described as being separate, some of them may be integrated into one physical element, i.e. the elements described may be logical elements.

[0016] Figure 1 describes a data processing apparatus 100, which comprises a memory 102 including a computer program code 104, and at least two processors 110, 1 16, which are configured to execute the computer program code 104.

[0017] The computer program code 104 comprises a component program 1 12, 1 18 run on at least two processors 1 10, 1 16 to form solution components 106 compiled of points in parallel, and to store the formed solution components 106 in the memory 102. In an exemplary embodiment, the solution components 106 are not as such distributed between the processors 1 10, 1 16, but each processor 110, 1 16 has access to all the stored components 106. If the search times from the memory 102 become too high as a result of overlaps, the required number of copies may be made of the solution components 106. Because the memory requirements are small, this can be done. The identifier of the component library 106 may be distributed between the processors 1 10, 1 16. The solution components may be formed 106 according to predetermined rules: if the solution component is, for example, a distribution route, it is possible to determine, for example, the maximum length and time for the route, or the maximum number of points, so as not to exceed the driving time allowed by the collective labour agreement.

[0018] In addition, the computer program code 104 comprises a solution program 114, 120 run in parallel on at least two processors 1 10, 116 to generate a solution 108 by adding one solution component 106 at a time, read from the memory 102, to the solution 108 based on a key point, and to store the added solution component 106 to the solution 108 in the memory 102. With the aid of a key point, solution components 106 close to one another may be defined. In an exemplary embodiment, a key point is selected that already has the lowest placing cost in relation to the solution component 106 already selected to the solution 108. In an exemplary embodiment, a key point is selected which belongs to the first suitable solution component 106. In an exem- plary embodiment, a key point is selected which belongs to the best solution component 106 to be combined. In an exemplary embodiment, a strategy of the look ahead type may potentially be used to anticipate the effect of the selection made and to conclude based on it what the best solution is: so, various kinds of potential chains of selections may be reviewed in the same manner as, for example, the effects of a move on future moves are pondered in chess. In an exemplary embodiment, the solution component 106 containing the best key point determined according to some selection criterion is selected.

[0019] In an exemplary embodiment, each processor 1 10, 1 16 generates a solution entirely independently, and they may hence have a lot of overlap. Each processor 1 10, 1 16 may independently construct a full solution. In an exemplary embodiment, each processor 1 10, 1 16 may be assigned a different starting point, because the solution component 106 selected first has a major effect on the subsequently selected ones. The different starting point, that is, the first selected solution component, may be determined for each processor 110, 1 16 according to predetermined rules in such a manner, for example, that solution components 106 that are as far away as possible from each other are selected. Alternatively, the selection of the starting point for each processor 0, 1 16 may be carried out, for example, with a random number so that the selection algorithm is initialized for each processor 1 10, 1 6 by its own random number. The influence of randomness may also be expanded: one of the best options may be randomly selected at each stage as the subsequent solution component 106. Various kinds of improving moves may also be randomly performed at different stages. The solutions 108 produced by different processors 1 0, 1 16 need not be combined, only the solution components 106 as the solutions are being built 108. As the solution 108 is being formed, the combining is carried out just by updating the information structure included in the solution 108. So, at all times there may be a plurality of solutions 108 being made; in principle, each processor 110, 116 builds its own solution 108 or at least an independent part of the solution 108 by using the same solution components 106, whereby parallel updates present no problem.

[0020] If the processors 1 10, 116 make independent parts of the solution 108, the combining of the solution 108 may be facilitated in such a manner that the points are divided into separate subsets in advance, in other words, they do not overlap. In this case, combining is mainly a reporting technological issue. So, to take snow-ploughing as an example, where a town has been divided into three contract areas, for example, then each contract area is an independent part that has got nothing in common with the other areas. The snow-ploughing of the town then only consists of these contract areas that have been separately optimized.

[0021] If each of the processors 1 10, 1 16 makes its own perfect solution 108, more resources are obviously consumed than if only one solution 108 were being generated, but on the other hand, solving such difficult optimization problems is feeling one's way in the dark, anyway, in which substantial amount of work "goes down the drain." The best way to combine different kinds of good solution components 106 can only be found by trying out as many combinations as possible, and the exemplary embodiments described allow that and utilize the computer power as much as possible. As the end result, either one solution 108 is obtained, with the best value for its target function, or then a set of best solutions 108 that are the best as measured with at least one indicator, and the user then selects the most suitable one for the purpose.

[0022] As seen in Figure 1 , there are at least two processors 110, 1 16, in other words, there may be more of them: as described in Figure 1 , there may be N pieces of processors 1 10, 116, 122, where N is an integer larger than two. Therefore, the solution program 1 14, 120, 126 may be run in parallel on more than two processors 1 10, 116, 122, up to as many as N processors 1 10, 16, 122. The component program 1 12, 1 18, 124 is also run on at least two processors 10, 1 6, 122, that is, it may be run on more, as many as N processors 1 10, 1 16, 122.

[0023] In an exemplary embodiment, the first processor 1 10 comprises a microprocessor, processor core, or graphics processor, and the second processor 1 16 comprises a microprocessor, processor core, or graphics processor.

[0024] In the exemplary embodiment of Figure 2, the processors 1 10, 116, 122 are implements as microprocessors 202, 204, 206 whereby the component program 112, 1 18, 124 and the solution program 114, 120, 126 may be run in parallel on as many as N microprocessors 202, 204, 206.

[0025] In the exemplary embodiment of Figure 3, the processors 1 10, 16, 122 are implemented as processor cores 302, 304, 306 of a multi- core processor 300 whereby the component program 1 12, 1 18, 124 and the solution program 1 14, 120, 126 may be run in parallel on as many as N processor cores 302, 304, 306.

[0026] In the exemplary embodiment according to Figure 4, the processors 1 10, 1 16 are implemented as a central processing unit (CPU) 400 and graphics processing unit (GPU) 402, whereby the component program 112, 1 18 and the solution program 1 14, 120 may both be run in parallel on the CPU 400 and GPU 402. In an exemplary embodiment, the main processing unit 400 is implemented as a microprocessor. The graphics processing units 402 may be implemented by using a separate graphics card. The graphics card may include a large number of graphics processing units 402, as many as three thousand, for example. In addition, a graphics card may have its own memory. In the memory of the graphics card, a copy of the solution components 106 may be stored, because the graphics processing unit 420 is as such powerful and the memory operations within the graphics card are fast, but data transfer in the direction of the main processing unit 400 is relatively slow.

[0027] On the basis of these exemplary embodiments described in Figures 2, 3, and 4, various kinds of hybrid combinations may be formed.

[0028] In the exemplary embodiment of Figure 5, the processors 1 10, 1 16, 122, 500 are implemented as processor cores 302, 304, 306 of a multicore processor 300 and as a graphics processing unit 302, whereby the component program 1 12, 1 18, 124, 502 and the solution program 1 14, 120, 126, 504 may be run in parallel on as many as N+1 processors 1 0, 116, 122, 500.

[0029] Generally, the processor 1 10, 1 16, 122 may be implemented as a microprocessor, graphics processing unit, processor core of a multicore processor, processor of a parallel processor, but also by using, either in addition to or instead of, at least one of the following: a standard integrated circuit, application-specific integrated circuit (ASIC), system-on-a-chip (SoC), application-specific standard product (ASSP), digital signal processor, or special- purpose computer chip.

[0030] In an exemplary embodiment, the processor 1 10, 1 16, 122 is part of an electronic digital computer 100. The computer 100 may comprise a random access memory (RAM), a central processing unit (CPU) and a system clock. The central processing unit may comprise a number of registers, an arithmetic logic unit (ALU) and a control unit. The control unit is controlled by a sequence of program commands 104, which has been transferred to the cen- tral processing unit from the random access memory. The central processing unit may include a number of micro commands for basic operations. Implementation of the micro commands may vary depending on the design of the central processing unit. The program commands 104 may be encoded in a programming language, which may be high-level programming language, such as C or Java, or a lower-level programming language, such as a machine language or an assembler. The computer 100 may also have an operating system which may provide system services for a computer program 104 written by means of program commands. Referring to the description above, the CPU may be a microprocessor or a multicore processor, and the computer 100 may additionally comprise a graphics processing unit. Memory 102 may be random access memory, but the computer 100 may have non-volatile memory in which the computer program code 104 is stored. At the lowest level, information may be processed as bits (or qubits, if the computer is a quantum computer).

[0031] As described in Figure 1 , the computer program code 132 may be stored on a distribution medium 134 from which it is transferrable to the computer 100 whereby the computer program code 104, when run on at least two processors 1 10, 1 16, 122, forms the solution components 106, and when run on at least two processors 1 10, 1 16, 122, forms the solution 108. In an exemplary embodiment, the computer program code 132, 104 may be in source code format, object code format, executable format, or in an in a transition format. The distribution medium 134 may comprise at least the following: any entity allowing program distribution, memory means, read-only memory, communications signal, non-transitory computer-readable storage means.

[0032] Figures 6, 7 and 8 show exemplary embodiments of solution components 106 and a solution 108.

[0033] Figure 6 has points 600, 602, 604, 606, 608, 610, 612, 614, 616, of which the solution components 106 are generated. The solution component K1 620 contains points 600, 602, and 604. The solution component K2 622 contains points 606, 608, and 610. The solution component K3 624 contains points 614 and 616. The solution component K4 626 contains points 606 and 612. As shown by Figure 6, one point may belong to several solution components: in our example, point 606 belongs both to the solution component K2 622 and solution component K4 626. Figure 6 also shows that not all the points need to belong in any solution component: in our example, the point 618 was not placed in any solution component (at this stage yet). [0034] In an exemplary embodiment, the solution program 1 14, 120, 126 additionally generates a solution 108 so that on each processor 110, 116, 122, the solution 108 is independently generated. According to Figure 7, there may be a plurality of solutions 108: in our example, the solution 700 generated in the processor 1 1 10, and the solution 702 generated in the processor 2 1 16. Of these, the data processing apparatus 100 may automatically select one solution 700/702 by using a quality criterion. Alternatively, the user selects one of solutions 700/702, possibly supported by the data processing apparatus 100 so that the data processing apparatus 100 presents information on the solutions 700, 702 to the user according to at least one indicator.

[0035] In the exemplary embodiment of Figure 8, the component program 1 12, 1 18, 124 additionally divides the points 600, 602, 604, 606, 608, 610, 612, 614, 616, 618 to at least two processor-specific subsets 800, 810 and generates the solution components 802, 804, 812, 814 separately for each processor 1 10, 16, 122, and the solution program 1 14, 120, 126 additionally generates the solution 108 in such a manner that on each of the at least two processors 1 10, 1 6, 122 the solution 820, 822 is generated processor- specifically by the use of processor-specific solution components 802, 804, 812, 814 The data processing apparatus 100 then combines the generated solutions 820, 822 into the final solution 108.

[0036] The described method in which points 600-618 are used to generate solution components 620, 622, 624, 802, 804, 812, 814, of which the solution 108, 700, 702, 820, 822 is further generated may be applied to route optimization in logistics. The solution components that are built in the optimization of routes may be individual routes and/or parts thereof.

[0037] A second exemplary embodiment relates to planning work shifts. A third exemplary embodiment out of a plurality of possible applications relates to the planning of production, in other words, the distribution and allocation of tasks on various resources. This is possible to do by using mainly the same principles as those used for route optimization.

[0038] Next Figures 9A, 9B, 9C, 9D, 9E, 9F, 9G, 9H, 91, 9J and 9K are examined, which show exemplary embodiments of generating a solution 08 with regard to route optimization in logistics.

[0039] In Figure 9A, the rectangular element 900 is a node with which the solution components must be joined. In connection with route optimization, the node may be a terminal, depot, warehouse or the like, for exam- pie. In our example, there is only one node 900, but there could also be more of them. The solution components are generated of points 902-940 with component programs 112, 1 18, 124 run in parallel.

[0040] In Figure 9B, a first solution component 950 has been generated, which contains points 902, 904, 906, 908, 910, 912, 914, 916, 918 and 920.

[0041] In Figure 9C, a second solution component 952 has been generated, which contains points 922, 924, 926 and 928.

[0042] In Figure 9D, a third solution component 954 has been generated, which contains points 930, 932, 910 and 916.

[0043] In Figure 9E, a fourth solution component 956 has been generated, which contains points 930, 932, 916, 934 and 936.

[0044] Figure 9F describes the four solution components 950, 952, 954 and 956 generated with the component program 1 2.

[0045] Then, the generation of the solution 108 is begun with the solution programs 1 14, 120, 126 run in parallel.

[0046] In Figure 9G, a first solution component 950 has been selected. Once the first solution component 950 has been selected, a key point in relation to it is sought. In our example, the key point is defined as the closest point, that is, the point whose placing cost on the route in question would be the lowest. In this exemplary embodiment, the point 928 is the first key point. After this, it is sought whether there is a route among the stored solution components 952, 954, 956, which includes the key point 928 but not a single overlapping point in relation to the previously selected solution components, so in this example, the first solution component 950. Such a solution component was found; this is the second solution component 952. In an exemplary embodiment, the solution program 1 14, 120, 126 thus additionally selects, to the solution 108, the solution component 952 which has the best key point 928 and which has no overlaps with the solution components 950 already selected to the solution 108.

[0047] In Figure 9H after this, the closest key point in relation to the first solution component 950, unselected up until now, is again sought. In this exemplary embodiment, the point 932 is the next key point. After the identification of the key point 932, routes are again sought from the stored, still unused solution components 954, 956, which include the key point 932 and as few as possible overlapping points with the solution components 950, 952 already selected. Now, two solution components 954, 956 including the key point are found, but both have overlapping points with the solution components already selected, in this case, the solution component 950.

[0048] In accordance with Figure 9I, the fourth solution component 956 is selected from the solution components 954, 956, because it has fewer overlapping points and its proportional length, taking into consideration the quantity of points and the length of the route, is better. Naturally, the selection criterion may also be different.

[0049] Then, the overlapping point 916 of the first solution component 950 and the fourth solution component 956 is removed from the route of the fourth solution component 956, after which the modified fourth solution component 960 is as shown in Figure 9J.

[0050] In an exemplary embodiment, the solution program 1 14, 120, 126 thus additionally selects, to the solution 108, the solution component 956 which includes the key point 932 but has overlaps with the solution components 950, 952 already selected for the solution 108, and which has the best efficiency value after the overlaps have been removed.

[0051] Finally, an effort is made to place the points 938 and 940 on the route 960 generated the last. This succeeds, whereby the result is a situation according to Figure 9K, in which the final fourth solution component 962 consists of points 930, 932, 938, 934, 940 and 936. In principle, the search continues like this until all the points have been selected, or no more components including the key point can be found in the library of solution components.

[0052] In an exemplary embodiment, the solution program 14, 120, 126 thus additionally places, after the removal of overlaps, individual solution points still unselected by that time in the solution components of the solution 108, which have already been selected, in our example points 938, 940 on the solution component 956 of which the solution component 962 is finally generated.

[0053] In addition, it is possible (not shown in Figures 9A-9K) that, in an embodiment, the solution program 114, 120, 126 additionally generates a dedicated solution component for such missing points of the solution 108, for which no solution component can be found and which cannot be placed in the solution components of the solution 108, which have already been selected. [0054] As shown by Figure 9K, the final solution 108 is generated of the solution components 950, 952, and 962.

[0055] In the exemplary embodiments of Figures 9A-9K, the application area of the program code 104 comprises route optimization in logistics, whereby

[0056] - the solution components 950, 952, 954, 956 comprise individual routes and/or parts of individual routes;

[0057] - the evaluation of the solutions 108 is based on at least one of the following: length of routes, capacity use of routes, total time of routes, fair allocation of routes, suitability of routes to time limits, compatibility of routes, priority of routes, but naturally many other criteria may be used;

[0058] - the key points 928, 932 are obtained by defining unrouted points, in our example these were the closest unrouted points in relation to the first selected solution component;

[0059] - corrections are based on the placing and/or changes of individual points; and

[0060] - the combined solution 108 comprises a compatible set 950, 952, 962 of routes for a predetermined area and/or time period.

[0061] In another exemplary embodiment, the application area of the computer program code 104 comprises the planning of work shifts, whereby

[0062] - the solution components comprise individual work shifts and/or parts of individual work shifts;

[0063] - the evaluation of the solutions is based on, for example, the quantity of unallocated tasks, quantity of overtime work, employees' needs, and/or fulfilling employees' wishes;

[0064] - the key points are obtained by defining both temporally and regionally the closest point in relation to the points already selected;

[0065] - corrections are based on the placing and/or changes of individual tasks; and

[0066] - the combined solution comprises a compatible set of works shifts allocated to employees for predefined physical locations and/or time period.

[0067] A problem in planning work shifts is to group the points on such solution components 106 that the solution 108 can be compiled of them without having to re-calculate the costs at the combining stage. If different so- lution components 106 have work shifts of the same employee, it is checked at the combining stage that there is adequate time for rest between them and that the employee receives enough holiday and days off. This has three different paths: 1 ) If the solution components 106 are parts of work shifts, compatibility is checked at the combining stage. 2) Likewise, if work shifts are placed one after the other, their compatibility is checked at the combining stage. 3) The solution component 106 corresponds to one employee's actions during the selected time period, which in principle decreases the number of solution components, but on the other hand allows the distribution of the same parts of a whole among different processors 1 10, 116, whereby there will be adequate practical use for them.

[0068] In a third exemplary embodiment, the application area of the computer program code 104 comprises the planning of production, whereby

[0069] - the solution components comprise usage plans for individual machines;

[0070] - the evaluation of the solutions is based on, for example, costs, reliability, or the utilization degree of the machines;

[0071] - the key points are obtained on the basis of the similarity between the resource or time requirements of work tasks;

[0072] - corrections are based on the variation of the timing and allocation of work tasks among different resources; and

[0073] - the combined solution comprises a comprehensive production plan for a predetermined time period.

[0074] What is new in the exemplary embodiments described is the combining of the solution components 106 in such a manner that during the combining stage corrective operations are carried out, including removals, additions, and replacements. What is new in addition to the above is the making of the combinations heuristically, leaning on the key points 928, 932 whereby it is not necessary to examine all the possible combinations. Due to the use of multiform corrections and key points 928, 932 the solution is not obvious. A novelty is also the making of the combining operations in parallel. The exemplary embodiments solve the greatest problems, optimize challenging real-world problems faster, and improve the quality of the results.

[0075] Although set covering as an approach allows overlaps, and various kinds of correctional operators have been published in connection with the problem in question, a comprehensive approach in which both overlaps and missing points as well as their corrections are allowed in the combining of solution components 106 is not known. Such an approach, however, makes it possible to compile good solutions 108 effectively and in parallel, without the need to set up and maintain a vast base register in the memory 102.

[0076] Lastly, Figure 10 is examined, which shows an exemplary embodiment of the data processing apparatus 100.

[0077] At first, a parallel construct 1000 of the solution components is carried out. The solution components 106 may be stored a compact data structure 1004 in a table, for example, that only has the information required from the viewpoint of describing the solution component. In the memory 102, only a limited set of compiled solution components 106 may be stored, for which the best efficiency value has been evaluated 1002. The definition of the efficiency value depends on the application, but as a general rule it depends on costs and the utilization degree of resources.

[0078] After this, each processor that is in use independently makes decisions 008 from different starting points by adding components to the solution one at a time in parallel in the construct 1006. At each stage of adding, the solution component 106 is selected as the basis of the examinations, which has the best key point with respect to the components already selected at the evaluation 1010. This obviates going through all the combinations, and the search may be interrupted at early stages, if suitable solution components 106 to add cannot be found. The method adds into the set of selected ones solution components 106 containing a key point, which have no direct overlaps. This can be done, because the examination only contains good solution components 106, as regards their efficiency values. If there is no suitable solution component 106 in the stored set, the solution components 106 will first be examined, which include a key point, but at the same time also overlapping solution parts with the solution components 106 already selected. Of these, the solution component 106 is selected which has the best efficiency value after the overlaps have been removed. Because there will be room left in the solution components 106 after the overlaps have been removed, an effort is made to place individual parts of a solution, still unselected by that time, in the solution components 106 already selected to maximise power usage at each stage. If there are no solution components 106 containing a key point in the database 1004 being used, an effort is made to include other solution components 106. Finally, if no solution component 106 can be found for the missing parts of the solution 108, and they cannot be placed in the solution components 106 already selected, a solution component 106 of its own is set up for them. The correction method used is implemented so that it immediately sees which corrections and costs establish the compatibility, without performing the changes themselves. In practice, this takes place by separately listing the required changes after the corrections have been evaluated 1012. Lastly, the required quantity of the best solutions 1016 is returned. All the parts of the algorithm may be run in parallel, without waiting. The set 1014 of the best stored solution components may be expanded by the components of the best compiled total solutions.

[0079] The combining of the solution components 106 may be performed with different, alternative ways. For example, the selection of solution components 106 to be combined may be done in different ways, or a larger set of different combinations may be evaluated prior to the selection. The solution components 106 to be stored may be selected in various ways and they can be further divided into smaller parts. Additions may be done more solution components 106 at a time, and additions may be simultaneously done from a plurality of starting points. Corrections may be most diverse and varying. The method may also be self-learning, that is, concentrate first on expensive combinations, for example. Alternatively, it may identify at each stage the best solution component 106 to combine instead of the first suitable one, at the same time anticipating the effects of the selections made, if required, by a look ahead type of strategy. As part of compiling the solutions 108, it is also possible to carry out charges that improve the decision, with an improvement heuristics suitable for the purpose, for example. The selected and unselected solution components 106 of the solution may also be replaced to boost the search.

[0080] It will be apparent to a person skilled in the art that as technology advances, the basic idea of the invention may be implemented in many different ways. The invention and its embodiments are thus not restricted to the examples described above but may vary within the scope of the claims. In addition to the exemplary embodiments described in the above, the same approach may in all likelihood be applied to at least two discrete optimizations with minor variations.