The rigorous structural representation of process structures proposed by Friedler and Fan is the Process Graph or P-graph in short, which graphically represents operations or activities by rectangles and their results and preconditions by solid circles as a bipartite graph; see Fig. 2. Any directed arc in the graph leads either to an operation from one of its precondition or from an operation to one of its result. It is important to note, that the primary aim of forming P-graphs not visualization but executing effective graph algorithms as part of computer-aided process design.
P-graph algorithms and software
The P-graph framework involves three major algorithms. The one to be applied first on a P-graph is algorithm MSG, which generates the maximal structure, i.e., the superstructure involving each plausible operation from those defined in the problem and potentially capable to contribute to at least one structurally feasible process network according to a set of axioms (Friedler et al. 1992b).
The second one is algorithm SSG, which can generate each combinatorially feasible process structure leading from the resources to the final targets through a network of operations and their preconditions and results. And finally, the third one is algorithm ABB (Friedler et al. 1993), which returns not only a single optimal but the N-best process structures satisfying additional constraints besides the structural ones, e.g., limitations on the availability of resources, volumes of operations, or conservation laws (Bertok et al. 2012a). Having multiple solutions is crucial to make decision-makers more aware of the diversity among different process alternatives and the consequences of selecting one of them.
Decision support systems aiding large scale process design or optimization can be constructed by setting up model prototypes in Software P-graph studio (Barany et al. 2018), exporting the initial model, and finally updating and resolving according to actual data; see for example the RegiOpt conceptual planner-identifying possible energy network solutions for regions (Kettl et al. 2011). As illustrated in Fig. 3, the model export and revision can be realized either in the language of process-network synthesis (PNS) or in the language of mathematical programming (MILP), but daily update in a decision support system typically requires implementations of data export and plan import interfaces from and to the enterprise resource planning (ERP) system of the customer. The consumer can decide whether the optimization is to be achieved by the help of the P-graph solver shipped together with the P-graph Studio free of charge resulting in the N-best process structures effectively (Bartos and Bertok 2019), or by a mathematical programming software carrying out a single optimal solution but being more scalable and having customer support for an annual fee. Note that the mathematical programming model can also be generated from the initial P-graph model (Bertok et al. 2012a) and exported by the software P-graph Studio as depicted in Fig. 3.
First the P-graph model then the mathematical programming is to be introduced.
Formulating the line balancing problem by P-graphs
Before developing the optimization model for periodical update and solution for daily decision support, model prototypes are created in software P-graph Studio first, as introduced in the previous section. As an initial step, a general scheduling model is constructed and then tailored due to the specialties of the line balancing problem of interest.
Let us assume that P1 and P2 are two consecutive tasks of a manufacturing process at an assembly line, and R1 and R2 are two employees. Figure 4 shows the general layout proposed by (Frits and Bertok 2014) for a two-step sequence of tasks to be realized by two potential resources R1 and R2, each of which is suitable to complete any of the two tasks P1 and P2. At the top of the P-graph in Fig. 4 R1 and R2 depicted as initial resources. Any of resources R1 and R2 can initially be assigned to any of tasks P1 and P2 by the help of operations R1toP1, R1toP2 and R2toP1, R2toP2; respectively. R1beforeP1 and R2beforeP2 are consequences of task resource assignments expressing that a resource is ready to start a task. If R1 or R2 performs task P1 through operation P1byR1 or P1byR2, then P1done appears as a consequence, which is a precondition to any operation for executing task P2, since P1 and P2 ordered elements of a two-step task sequence, i.e., their execution order is fixed. Meanwhile, the resource is released as well, and ready to continue with another task; see outcomes R1afterP1 and R2afterP1. The changeover assigning resource R1 to task P1, after completing task P1 is represented by operation R1P1P2. Similarly, R1P2P1, R2P1P2, and R2P2P1 represent changeovers of the resources from one task to another. The blue part is related to the assignments of resource R1, while the green part to the assignments of resource R2. If task P2 is finished by any of the operations P2byR1 or P2byR2, P2doen results as the final target of the process formulated.
Since in the line balancing problem of interest in the computer assembly plant, manufacturing tasks are to be completed one after the other and any employee can work on a single product at a time, there are no parallel steps performed on a single product, no synchronization of parallel tasks is needed. Consequently, the calculation of exact time windows for each operation is not required, the total time of completing successive jobs assigned to an employee can be counted as the sum of individual completion times of the jobs. In the P-graph model in Fig. 5 all the synchronization operations including initial assignments and changeovers are removed, but for each resource working times are incorporated and utilized as preconditions to any task performed by the resource. As a result, the process described by the P-graph consists of two resource, four operations, an intermediate target and a final target only.
In Fig. 6 elements of Fig. 5 are replaced without changing their relations to be easier to understand. It can be read as: task P1 is completed by either resource R1 or R2 first, and task P2 is finished by either resource R1 or R2 afterward achieving the final target of the process. Working times of both resource R1 and R2 are counted in parallel.
During the manufacturing of a single product, each worker is delegated to work stations at the production line. Therefore, workers can pass products to the next workstation in the forward direction of the line only. Consequently, if resource R1 is assigned to workstation #1 and R2 to workstation #2, then R1 can pass a semi-finished product to R2 but not vice versa. Process structures including operations P1byR1 and P2byR1; or P1byR2 and P2byR2; or P1byR1, pass and P2 could be feasible and automatically generated by algorithms SSG or ABB from the P-graph in Figure 7. Note that the structure including operations P1byR2 and P2byR1 but not P1byR1 cannot be feasible since precondition P1done1 to operation P2byR1 is not satisfied.
Finally, to clarify the aim of line balancing, the maximal working time of any resource is introduced as an input to the process structure, which utilization is to be minimized during the optimization; see Fig. 8. Through operation Max, the maximum working time is defined as a precondition to the availability of each working time for any resources performing any assembly task. The model prototype in Fig. 8 is to be extended for multiple assembly tasks and more employees and serves the bases for the decision support system detailed in the forthcoming paragraphs.
P-graph representation of the work distribution of assembling Product1 given in the Table 1 with 3 worker is shown in Fig. 9. Tasks in the same column are assigned to the same worker while rows contain subtasks to be completed by at least one worker. From left to right the workers are listed, while the subtasks appear from top to down in their required order.
Optimization by P-graph algorithms
Algorithm ABB results 7 s of cycle time for the process synthesis problem introduced in the preceding session, where the first worker completes the steps 1 and 2, the second worker the step 4, and finally, the third worker completes the last two tasks; see Fig. 10.
Ideally, every worker spends \({ (\sum _{j=1}^m s_j) / n }\) time with assembling, but this is in most cases not feasible, because of the discrete values of times with large variations required by performing subtasks. For Product2, distribution is easy, because every step takes 2 s, so for two people the assembly time is 12–12 s, for three people is 8–8–8, and four people spend 6–6–6–6 s with assembling in the optimal case. Clearly visible is that in an ideal case the number of the cycle time is inversely proportional to the number of workers.
Table 2 10 best assignments for Product1, Product2, Product3 and Product4 with three and four workers It is worth paying attention to alternative solutions in Table 2. The second best assignment for Product1 with 3 workers is as good as the first one when the second worker does the second subtask as shown in Fig. 11.
From the third to the sixth best assignments, the cycle time is 8 s, where multiple subsets of tasks are allocated to practically two of the three workers. Consequently, the optimal allocation for Product1 with two workers is 8 s. For those who are interested in reproducing the results, the P-graph Studio file is available for download at http://www.p-graph.org/wp-content/uploads/2019/07/Example1Product1ThreeWorkers.zip.
By increasing the number of workers further, it turns out that 4 workers can complete the process within the cycle time of 5 s, and the cycle time can no longer be reduced by increasing the number of workers because no results better than 5 s are available. It comes from the time of the longest subtask, i.e., the \(cycle time \ge {\hbox {max}}(s_j)\).
The large-assembling subtask time problem causes the longer cycle times for Product3 compared to Product4, even if the long time required to perform the 5th step does not limit the cycle time directly.
In daily decision support, graphical modeling is not a must to utilize the power of the P-graph framework as described in Sect. 3.1, but the P-graph model can be saved in text files with .pns extensions, updated, and resolved by P-graph solver. Alternatively, algorithmic generation of the mathematical programming model is offered with the input of the number of workers and the list of the tasks to be executed. In chapter 3.4, such a model generation will be presented.
MILP formulation of the line balancing problem defined by P-graphs
The line balance can be achieved by solving a linear programming problem where the objective is given by a linear function and the constraints also appear as linear inequalities. As the basics of linear programming go back to the 1940s (Dantzig 1948), therefore, many open source software implementations are now available (Orchard-Hays 1990). However, the input structures of these solvers are often difficult to understand and program. Thus language Zimpl was selected to translate the mathematical model of a problem into a linear or mixed- integer mathematical program expressed in .lp or .mps file format to be read and solved by an LP solver (Koch 2001).
For numbers n of workers and number m of tasks, the cycle time \({\textit{cycleTime}}\), the working times \({\textit{workingTimeOfWorker}}_i\), \({\textit{WorkerPerformTask}}_{i,j}\) and \({\textit{PassWorkerAfterTask}}_{i,j}\) are defined as variables for each worker \(i \in \{1, 2, \ldots n\}\) and task \(j \in \{1, 2, \ldots m\}\) int the mathematical programming model. The cycle time in a nonnegative number:
$$\begin{aligned} cycleTime \ge 0 \end{aligned}$$
(1)
as well as the working times of workers:
$$\begin{aligned} \forall \,{i \in \{1, 2, \ldots n\}}: workingTimeOfWorker_i \ge 0 \end{aligned}$$
(2)
workerPerformTask is a binary matrix expressing the assignment of workers to tasks by values of 1’s:
$$\begin{aligned} \forall\, {i \in \{1, 2, \ldots n\}}, j \in \{1, 2, \ldots m\}: workerPerformTask_{i,j} \in \{0,1\} \end{aligned}$$
(3)
while passWorkerAfterTask is another binary matrix telling us whether worker i passes the semi-finished product to the worker \(i+1\) after finishing task j instead of further processing it:
$$\begin{aligned} \forall\, {i \in \{1, 2, \ldots n\}}, j \in \{1, 2, \ldots m\}: passWorkerAfterTask_{i,j} \in \{0,1\} \end{aligned}$$
(4)
The objective function is to minimize the cycle time:
$$\begin{aligned} cycleTime \rightarrow Min \end{aligned}$$
(5)
As a constraints, the following are incorporated. Each subtask must be completed by exactly one worker:
$$\begin{aligned} \forall\, j \in \{1, 2, \ldots m\}: \sum _{i=1}^{n} workerPerformTask_{i,j} = 1 \end{aligned}$$
(6)
The cycle time cannot be shorter than the working time of any worker:
$$\begin{aligned} \forall \,{i \in \{1, 2, \ldots n\}}: cycleTime \ge workingTimeOfWorker_i \end{aligned}$$
(7)
For each worker, the working time is to sum of the subtask times performed by the worker:
$$\begin{aligned}&\forall\, i \in \{1, 2, \ldots n\}: workingTimeOfWorker_i \nonumber \\&\quad = \sum _{j=1}^{m} workerPerformTask_{i,j}subtaskTime_j \end{aligned}$$
(8)
where the \(subtaksTime_j\) constants are considered to be know from the problem definition. The first subtask is assumed to done by the first worker:
$$\begin{aligned} \forall i \in \{1, 2, \ldots n\}: workerPerformTask_{1,1}=1 \end{aligned}$$
(9)
If a task is performed by a worker or the product is just received from the previous worker, it is questionable whether the next task is to be completed by the same worker, or the semi-finished product is to be passed further to the next worker:
$$\begin{aligned}&\forall\, i \in \{2,3, \ldots n\}, \forall j \in \{2,3, \ldots m\}: workerPerformTask_{i,j-1} + passWorkerAfterTask_{i-1,j-1}\nonumber \\&\quad =workerPerformTask_{i,j} + passWorkerAfterTask_{i,j-1} \end{aligned}$$
(10)
Since the first worker cannot receive a semi finished product from a previous one, it is a special case:
$$\begin{aligned}&\forall j \in \{2,3, \ldots m\}: workerPerformTask_{1,j-1} \nonumber \\&\quad = workerPerformTask_{1,j} + passWorkerAfterTask_{1,j-1} \end{aligned}$$
(11)
Equations 9–11 guarantees, that no tasks can be omitted, and workers can perform consecutive steps only. Note, that the mathematical programming model presented herein is identical to the one exported by software P-graph Studio on the bases of the P-graph model presented in Sect. 3.2.
Solution of the MILP formulation
After translating the mathematical model given in ZIMPL language in a .zpl file the result will be a file with .lp extension, which can be handled by LP solvers. Such an LP solver is COIN-OR CBC, which is an open-source mixed integer programming solver written in C++ (Forrest and Lougee-Heimer 2005). Of course, it is also an option to omit ZIMPL and directly formulate the model in LP format in an .lp file, but considering the composition of .lp, it would be much more complicated. For example, the MILP model for determining the optimal assignment for the production of Product4 contains 50 lines in .zpl file and 350 lines in .lp format.
Solving the .lp files by COIN-OR CBC, the optimal task-worker assignment and cycle time, as a result, are displayed in a text file. The results are consistent with those reported by the P-graph software, but only a single optimal assignment can be obtained by CBC, see Fig. 2.