New models and algorithms to solve integrated problems of production planning and control taking into account worker skills in flexible manufacturing systems

Article history: Received April 1 2021 Received in Revised Format May 12 2021 Accepted May 12 2021 Available online May, 12 2021 The paradigm of the cyber-physical manufacturing system is playing an increasingly important role in the development of production systems and management of manufacturing processes. This paper presents an optimization model for solving an integrated problem of production planning and manufacturing control. The goal is to create detailed production plans for a complex manufacturing system and to control the skilled manual workers. The detailed optimization model of the problem and the developed approach and algorithms are described in detail. To consider the impact of human workers performing the manufacturing primary operations, we elaborated an extended simulation-based procedure and new multi-criteria control algorithms that can manage varying availability constraints of parallel workstations, worker-dependent processing times, different product types and process plans. The effectiveness of the proposed algorithms is demonstrated by numerical results based on a case study. © 2021 by the authors; licensee Growing Science, Canada


Introduction
Due to the increasing globalization of production networks, developments aimed at the cost-effective operation of production systems are becoming more and more important for companies to increase their competitiveness. In addition, companies aim to satisfy the customers' requirements at the highest possible level while meeting the rigorous order deadlines. The large number and diverse composition of production orders require an increasing degree of flexibility in production systems considering all levels of flexibility. Shivanand (2006) and Kumar et al. (2017) presented these levels of flexibility in detail. Flexible manufacturing systems (FMSs) integrate manufacturing and logistics resources (e.g. machining cells, workstations, automated material handling and storage equipment). The coordinated and efficient operation of FMSs is ensured by computer control. Michalos et al. (2010) presented the effect of system flexibility and degree of automation on product type variants and series sizes through the example of an automotive assembly system.
Market trends also affect the operation of production systems. It is necessary to produce several types of products at the same time with small series sizes and high flexibility. By ensuring high flexibility, the degree of automation of the systems is reduced, manual processes come to the fore, and the structure of production systems is also transformed. The matrix layout of workstations is able to ensure a high degree of simultaneous production of different product types to meet customer needs. Between workstations, one-piece material flow is realized through dynamically changing material flow relations. In this case, the role of human resources (workers) is twofold in the production process: on the one hand, the worker ensures the movement of the workpiece among the workstations, and on the other hand, he or she performs the corresponding technological operation on the workpiece at the given workstation. Efficient operation of production systems requires the use of intelligent production planning, scheduling, and control systems (Zijm, 2000), which are greatly supported by Industry 4.0 developments and solutions (Gania et al., 2018).
In many discrete manufacturing processes, the type and number of jobs to be performed may vary. Jobs involve technological operations that must be performed on certain machines or workstations according to the corresponding process plans. The order of operations of a given job is constrained by precedence relations. Fundamental manufacturing schemes include the flow shop, job shop, open shop, mixed shop and general shop models, whose classification, characteristics and scheduling algorithms are detailed by Brucker (2007). Regarding the complexity of job shop scheduling problems, the vast majority of models belong to the NP-hard problem class (Sotskov and Shakhlevich, 1995;Zinder et al., 2005;Brucker et al., 2007) and so it is not possible to create an optimal schedule with polynomial runtime. Considering the logistical resources of real production systems significantly increases the complexity of production scheduling models. Zhang et al. (2013) extended the job shop model with delivery tasks, Liu et al. (2017) considered intermediate buffers, and Chawla et al. (2018) inserted automated guided vehicles (AGVs) into the job shop scheduling problems. These extended problems were solved with heuristic algorithms (e.g. modified shifting bottleneck, PSO with MA, etc.).
In addition, human resources also appear to be an important influencing factor in examining the efficiency of the production system. For this reason, the impact of human resources on a flexible production system has also become an important area of research. Karwowski (2005) provided a theoretical perspective on human factors and ergonomics (HFE), defined as a unique and independent discipline that focuses on the nature of human-artefact interactions. Chung (1996) examined the effects of human factors in order to introduce an advanced manufacturing technology. Oliveira et al. (2019) presented the impact of Industry 4.0 on workers through the results of two European research projects. Peruzzini and Pellicciari (2017) focused on research and design of human-centred adaptive manufacturing systems (AMS) for modern companies, where aging workers are becoming more common. The purpose of AMS is that the system can adapt to the aging workers' needs considering their reduced capability for work. Longo et al. (2017) demonstrated the application possibilities of Industry 4.0 technologies that help workers perform their daily tasks. Despite technological advances, digitization, and increasing levels of automation, the human workforce remains an integral part of manufacturing and assembly systems. As the efficiency of production processes is also influenced by workers, the human factor must also be taken into account in planning, scheduling and control tasks.
Several studies deal with the examination of the production performance of workers. Ferjani et al. (2017) developed a heuristic algorithm for associating workers and jobs with different abilities. In their proposed model, the processing times of operations depend on the degree of worker fatigue. The paper demonstrated the efficiency of the proposed method through the results generated by a simulation model. The new method was also compared with other methods. Sirovetnukul and Chutima (2010) created a model for a U-shaped assembly cell in which workers perform one-piece material flow and the walking times are not negligible. Their goal was to -the number of workers. Sungur and Yavuz (2015) presented a new assembly line balancing problem, in which the workers have different qualifications. The goal is to find the optimal assignment of jobs and workers in case of each workstation in order to achieve the minimal cost. Durmaz and Koyuncu (2019), in their research, aimed to minimize the production cost of a production line. In the proposed model, the abilities of workers were taken into account when assigning jobs and workers. The results of their mathematical model showed a reduction in manufacturing costs when assigning the most appropriate worker to the job. In many cases, discrete manufacturing-assembly systems are based on job shop models and they employ human workers with different skills. The near-optimal assignment of jobs and workers contributes greatly to the efficient operation of the entire system. For this reason, job shop type production planning and scheduling models and methods need to manage human workers who have different skills in an integrated way. Al-Hinai and Piya (2015) presented, in a job shop environment, the effect of worker-dependent processing times on lead time. The goal was to minimize the lead time. Lin et al. (2016) presented a job shop scheduling model augmented with workers, in which processing time varies depending on the ability and experience of the workers.
The objective function was the maximum completion time, which was minimized with an improved simulated annealing genetic algorithm (ISAGA). Workers' skills are the basis for assigning jobs and workers. Lin and Gen (2008) presented a mathematical model in which the assignment of workers and jobs is solved regarding maximizing benefits and minimizing costs. A multi-objective hybrid genetic algorithm (mohGA) is proposed to solve the problem. Bányai et al. (2018) described the optimization problem of designing the number and structure of human resources. They use a simulation model based on Markov chains for optimizing the composition of worker groups. To solve the job shop (JSP) and flexible job shop (FJSP) scheduling problems, several studies have been performed in which heuristic and meta-heuristic search algorithms have been applied.
Ruiz and Vázquez-Rodríguez (2010) presented a study that summarizes hybrid flow shop (HFS) problem classes, their objective functions and solving algorithms. The study shows that in most cases the goal was to minimize the maximum completion time (C max ). For small problems, the branch and bound (B&B) algorithm can be applied. However, the application of heuristic methods came to the fore to the greatest extent. Based on these experiences, it can be assumed that heuristic algorithms can also be used effectively to solve FJSP problems. Recently, due to the complexity of these problems, discrete event-driven simulation models have been used more and more frequently. These simulation frameworks are increasingly supporting the planning of manufacturing processes. For example, Zupan and Herakovic (2015) dealt with production line balancing. Kikolski (2016) performed efficiency improvements and optimization of a manufacturing system by eliminating the negative effects of bottlenecks. Barrera-Diaz et al. (2018) developed a simulation-based solution for an automotive company by developing an automatic data-handling system. Kundu et al. (2019) used a simulation model and PSO algorithm for supporting the KANBAN based material supply system of an assembly line.
In this paper, we summarize the results of our research aimed at optimizing the operation of flexible production systems in which human workers are integrated in addition to machine resources. The goal is to assign jobs, workers, and workstations in a way that maximizes the produced quantity and the free capacity of the system over time. The developed heuristic solving method has been implemented in discrete event driven (DES) software.

Main Characteristics of the Examined Manufacturing Processes
The motivation for our research was the production planning and scheduling problems that arise in a real production system. One specific industrial case study made it clear that there are scheduling problems in which not only the primary resources (machines, workstations) but also the secondary resources (workers) need to be considered in order to create effective production plans and to control the manufacturing processes. The examined production system can produce specific types of products. In order to create a product, a given sequence of operations has to be carried out according to a pre-developed technological plan. In the production system, different workstations are located in specific positions. The routes, the distances and the permissible traveling speeds are known. A given product type can be made according to a given technological plan that specifies the operations to be performed. Each product type has a given technological plan. The starting workpiece is selected by a worker (human resource), who visits the suitable workstations in the order fixed in the technological plan, and the worker performs the planned operations on the workpiece at the workstation. Finally, the worker places the finished product into the output storage. The worker selects the next workpiece from the input storage and performs the planned operations. In the production system, several workers perform their tasks at the same time.
The set of suitable workstations is given for each operation. The resources are limited in the time allowed to perform operations. The production management defines the actual shift calendar. It is a series of time intervals (shifts) that prescribes the resource availability as time constraints. Workstations and workers work according to the given shift calendar. The scope of scheduling decisions does not extend to changing the shifts, because the active shifts for the scheduling period are given. A factor that further increases the complexity of the constraints is that specific workers are assigned to each shift. Only one operation can be performed at a time at a given station. Only one operation can be performed on a workpiece at a time. A given worker can only work on one workpiece at a time. The standard processing times of operations are known for each product type and each workstation. The workers' working abilities are different. Our model includes special parameters to consider human skill factors. This means that the processing time of a given operation depends on the worker's abilities. The decision-making scope of the production planning and scheduling system extends to planning the type and number of products to be manufactured in the shifts, and to control the work of the workers during the shift taking into account the strict restrictions. The control module selects which of the alternative options the worker chooses in the decision situations. This control task includes selecting the product type at the beginning of the cycle and selecting the specific workstation for each operation.

Requirements and Purpose
The essence of the solution of the outlined resource-constrained multi-level scheduling problem is that a detailed production schedule must be created for the given time horizon considering the actual input data. The primary goal is that the schedule fulfils the quantity of products required by production management, and the secondary goal is that the utilization of resources must be maximized while respecting the strict constraints of the applied manufacturing technology and resources. This scheduling problem does not directly correspond to any of the known types of scheduling problems, mainly due to the specifics of the regulations for workers. Therefore, a new integrated problem type of production planning, scheduling and control must be solved. Hereinafter, we use the term Extended Flexible Job Shop with Human Resources (EFJSHR) to denote this problem type. At the company under study, the problem was handled by human decision-making. Production planning engineers made the necessary decisions and prepared the production plan that specifies the quantities of products to be manufactured of each product type in the given shifts. The control of the processes within the shift was performed by the workers themselves. Workers could choose the next type of product to be manufactured themselves and also selected the specific workstation from the set of suitable workstations for each operation to be performed. The main purpose of our research was to replace this decision-making based on human experience with a software solution in order to achieve more efficient production.

An Approach to Solve the Problem
The main goal of the research was to develop a detailed model and solving algorithms for the EFJSHR problem in order to implement a production planning and scheduling module in a simulation system that can create near-optimal detailed plans to meet current production needs and that can guide the workers' activities in the strict resource-constrained production system. The EFJSHR problem is very complex, so we have created a two-level decision hierarchy from the two interrelated scheduling problems. Each level uses its own special optimization model: • At the upper level, the production planning problem is handled by a special heuristic search algorithm.
• At the lower level, the workers' activities are managed by special multi-criteria reactive scheduling algorithms.
Each solution variant created at the upper production planning level delivers input data and constraints to the lower level. The set of constraints originated from the upper level is supplemented by the lower level of the hierarchy with its own constraints of the worker control problem (Fig.1).

Fig. 1. Simplified flow chart of the solving method
In the following subsections, a new model and new algorithms are presented to realize this two-level integrated method. We first define a formal optimization model for the entire problem, then we describe the algorithms for solving the subproblems of production planning and worker control.

Problem Formulation
To solve the EFJSHR problem, the workpieces, shifts, workers and workstations have to be assigned to each other and the timely execution of operations must be controlled in such a way that the goals are met and the strict constraints are satisfied. Basic elements, notations and relationships of the formulation will be described in the following order: • Input data; • Primary decision variables; • Values calculated from primary decision variables; • Secondary decision variables; • Values calculated from secondary decision variables; • Constraints and • Objective functions.

Input data
product type can be produced = 1, 2, …, quantity to be produced from the product type = 1, 2, …,  operation-type = 1, 2, …,   , the k th item in the sequence of operation-types to be performed on product type = 1, 2, …, , the s th prescribed resource availability time frame (shift) on the planning time horizon = 1, 2, …, worker (human resource) ℎ = 1, 2, …, , the ability of worker to perform operation-type  , of product type during the standard processing time (extent of compliance with the standard time) ( ) the set of workers who can manufacture product type in the current shift the set of workstations that can execute operation-type  , the time need for worker to move from workstation to workstation

Primary decision variables
Primary decision variables determine the detailed production plan.

Values calculated from primary decision variables
The actual values of the primary decision variables clearly determine the number and type of workpieces to be manufactured in the given shifts. The job is defined as manufacturing a given workpiece. (1) the release time of job the due date of job

Secondary decision variables
Secondary decision variables determine the detailed schedule of the execution of jobs. We use the following four types of secondary decision variables:  , a given item (decision variable) of a two-dimensional matrix to assign jobs = 1, 2, …, to workers |ℎ = 1, 2, …, : , , a given item (decision variable) of a three-dimensional matrix to assign operations , = 1, 2, …, , k = 1, 2, …, , ( ) to workstations | = 1, 2,…, : , , , a given item (decision variable) of a four-dimensional matrix to determine the execution sequence of operations , = 1, 2, …, , k = 1, 2, …, , ( ) : the completion time of operation , at workstation the completion time of job ( = 1, 2, …, ) the function that indicates the completion of job The value  = 1 indicates that job has already started ( 0 < ) and its completion time does not exceed the prescribed due date . Due date equals the finishing time of the shift that is assigned to the job .

Constraints
We use the following five groups of constraints: 1. Restrictions on the quantities of products to be manufactured: • Negative quantity cannot be produced: • The total quantity to be produced has to be distributed among all shifts in the case of each product type: 2. Restrictions on selected resources: • A given job can only be assigned to a suitable worker: , • A given job can be assigned to exactly one suitable worker: , ∈ ( ( )) = 1 ( = 1, 2, …, ) • A given operation can only be assigned to a suitable workstation: , , • A given operation can be assigned to exactly one suitable workstation: , , 3. Restrictions on worker activities: • A given worker can perform only one job at a time. A given worker can start the next job only if he or she has completed the previous one: • A given worker can perform only one operation at a time and the time for moving between workstations cannot be neglected: 4. Restrictions on the workload of workstations: • Only one operation can be performed at a given workstation at a time: • The processing time of a given operation depends on the workstation and the worker: , , , + ( ), , , , , = , , , where = 1, 2, …, , = 1, 2, …, , ( ) 5. Restrictions on the execution of jobs in the given shifts: • The execution of job J i cannot start earlier than its release time (the beginning of the assigned shift): • The operations of job Ji can only be performed in the assigned shifts: Objective functions The optimization model is defined as finding the best solution by considering two objective functions at the same time. The objective functions are the following: 1. Primary objective function: Quantity of manufactured products (the number of completed jobs) [pcs]: The value of objective function f2 expresses the free capacity of the production system over time. This is a new performance indicator that measures the length of the last section at the end of the shift when no worker is active. We refer to this time value by the term "remaining time". The remaining time of a given shift is calculated by subtracting the completion time of the last workpiece from the finishing time of the given shift. The total remaining time of the whole system is obtained by summing the remaining times of the shifts.

Advanced Simulation-Based Searching Algorithm to Generate Detailed Production Plans
We have developed a heuristic method to determine the current values of primary and secondary decision variables of the EFJSHR problem formalized in the previous subsection. Our method is called Simulation-Based Production Planning and Control (SBPPC). The core of SBPPC is based on the integrated usage of an iterative improvement searching algorithm and two reactive rule-based control algorithms. These components are embedded in a discrete event-driven simulation framework. The simulation is able to calculate the current values of the objective functions based on the values of the decision variables. In a preparatory phase, an initializing method loads the input data, builds the current simulation model and initializes all the variables and parameters of the system. The pseudocode of SBPPC is presented in Fig. 2.
Method SBPPC to solve the problem EFJSHR 1: { 2: Load the input data;

3:
Set the maximum number of iterations;

4:
Create the initial production plan by using algorithm IPP to calculate the values of primary decision 5: variables , ; 6: ε ← 1; 7: while (ε ≤ ) 8: { 9: Simulate the production plan with reactive control of manufacturing processes; The SBPPC method uses the IPP algorithm to create the initial production plan. This algorithm assigns the jobs to the shifts to create quasi-uniform loads. In the definition of the IPP algorithm presented in Fig. 3. , the operator returns the integer value of the result of the division operation. The operator means the modulo division that returns the remainder of the division operation. The SBPPC method uses the MPP algorithm (Fig. 4) to improve the production plan. This algorithm modifies the assignment of jobs and shifts by moving unfinished jobs into suitable shifts that can perform the selected jobs. In the presented formal definition of the MPP algorithm, the instruction ( ), = ( ), − 1 expresses that the selected job is taken out of the set of jobs assigned to shift . The instruction ( ), = ( ), + 1 shows that the selected job is added to the set of jobs assigned to shift . Function ( , , ) is used to find the earliest shift where the selected unfinished job can be performed. The searching range is bounded with two parameters. The parameter defines the lower bound. This expresses the smallest index from which to start the searching method. The parameter specifies the largest allowed index of the searching range as upper bound. This function examines the searching range of shifts (lb ≤ κ ≤ ub), and it returns the index κ of the earliest shift that has remaining time and includes at least one worker who can produce the product type ( ) of the given job . If there is no suitable shift then the function returns zero. The pseudocode of ESS is presented in Fig. 5. As shown earlier, the solution of the entire optimization problem can be divided into two main levels. The upper level focuses on optimizing the production plan. This part has been presented so far. In the following, we propose new control algorithms based on reactive scheduling to perform the given production plan.
The SBPPC Method includes an event-driven simulation method called "Simulate the production plan with reactive control of manufacturing processes". At the beginning of the simulation, the framework initializes the virtual manufacturing system, actualizes the production plan and sets the current values for the control parameters. The essence of the simulation is that different events appear at specific times and they are processed by event-handler algorithms. In each decision-making situation, in which there are several options for handling the event, reactive control algorithms make the decision. The most important types of decision-making situations are the following: • When a worker arrives at the input container, the next job to be performed must be selected.
• When a worker has performed a given operation, the workstation must be selected at which the next operation will be executed.
To effectively solve these decision problems, we have developed new control algorithms. These are used in the simulation to determine the values of secondary decision variables.

Control Algorithm to Assign Jobs and Workers (AJW)
To solve this subproblem, we use a reactive method based on a weighted multi-criteria evaluation function. When worker arrives at the input container, the control system computes the value of function g for each selectable job, and the job with the largest value of function g is selected to be next job (g( ) ⟶ ). The selected job is assigned to worker Hh. This can be expressed with the following secondary decision variable:  ( )→ , ≔ 1. The definition of function g is the following: where: • ( ) (inhomogeneity): This aspect expresses that we strive to choose the product type that has the smallest number of currently running jobs in the manufacturing system. Simultaneous production of different product types can be ensured by increasing the degree of heterogeneity of the product types. In order to prepare the definition of b4(Ji), we introduce the following notations: • ( ): the number of currently running jobs of the product type , • ( ): the number of starting jobs of product type : ( ) ≔ 1, if the product type is selected to start 0, otherwise In each decision-making situation, only one job can be selected to start, so the following relation is obtained: Using these formulas, we define the probability of product type as follows: By adapting the concept of entropy used in the information theory (Shannon, 1948), we define the entropy of any product type as follows: If job of product type ( ) is selected to start, the entropy of the system can be calculated with the following formula: The entropy of the system would be maximal if all the product types were in production with equal number of jobs at the same time. In such an ideal case, the probability of each product type is the following: Consequently, the maximal entropy of the system is the following: The value of factor ( ) is defined in percentage as follows: From the point of view of inhomogeneity, we would like to select to start the job where the value ( ) is maximal. • , , , , integer weights from the closed interval −5, 5 . Adjusting the weight of a given aspect determines the degree of its consideration.

Control Algorithm to Assign One of the Suitable Workstations to the next Operation (AWO)
To execute a given operation , of job , we have a set of suitable workstations: Worker should choose one of the suitable workstations. In order to solve this subproblem, our control algorithm computes the function for each suitable workstation and the workstation with the smallest value of function is selected to execute the operation (z( ) ⟶ ). The selected workstation is assigned to the given operation. This can be expressed with the following secondary decision variable: , , ( )→ :=1. The definition of function is the following: where: , integer weights from the closed interval 0, 100 , Adjusting the weight of a given aspect determines the degree of its consideration.
The simulation extended with the above presented control algorithms clearly determine the execution of the jobs. During the simulation, all the secondary decision variables get their values according to reactive scheduling when handling the occurring events: • Decision variables  , obtain values when the control algorithm selects and assigns jobs to workers.
• Decision variables , , take on their values when the control algorithm selects and assigns worplaces to operations.
• Decision variables , , , , and S , , are set when operations start at workstations.

Applicability of the Proposed Model and Algorithms
The presented model and algorithms can solve the integrated production planning, scheduling and control problem of flexible manufacturing systems in which human resources are working with different individual skills. The proposed algorithms can flexibly and efficiently handle the changing requirements, varying resource constraints, uncertainties, and unexpected events. In this approach, detailed production plans are generated by the SBPPC method that includes a special search algorithm and advanced event-driven simulation. Reactive control algorithms are embedded into the simulation to make the necessary decisions at the same time as the execution of manufacturing processes. The presented production planning phase and the manufacturing control phase together create a two-level decision hierarchy to manage the production activities. The elaborated optimization model of the investigated problem, the solving approach and algorithms can be used in practice. The effectiveness of the proposed methods will be demonstrated with some running results in the next section.
In cyber-physical environments, the real system and the simulation system can work together in real time, Taking advantage of this fact, the proposed algorithms can also be used to supplement such systems; therefore, the control algorithms can directly handle real events as well. Classical enterprise application systems (e.g. ERP, MES, APS, and SCADA) and modern technologies (e.g. Industry 4.0, Internet of Things, Cloud Computing and Big Data) are able to support the practical application of the proposed approach and algorithms by providing appropriate input data, computational capacities, and application environment.

Some Numerical Results
The presented algorithms have been implemented in Plant Simulation (Siemens, v15). The software ran on a personal computer equipped with an Intel® Core™ i7-4810MQ 2.80 GHz processor, with 8 GB of RAM memory. The operating system of the computer was Microsoft Windows 10 (64-bit).

Examining the AWO Control Algorithm
Simulation studies were performed, according to the parameter values given in Table 1 to Table 4, to adjust the values of and parameters. During the simulation studies performed in the test environment, the values of parameters were independent of the values of parameters. Assignments of jobs and workers were performed according to the Fist Suitable Job Selection (FSJS) strategy, which means that the worker selects the first suitable item from the queue of waiting jobs.   OP0   Table 2. The goal was to define the best value pair for and parameters, where the quantity of the produced products is maximal and the waiting time of workers in front of workstations is minimal. In the simulation, the amount of waiting time of workers was quantified by comparing the sum of the waiting times to the sum of availability times, then the average waiting rate was expressed with the obtained quotient value as percentage. Parameters and were given all combinations of integer values from the range 0, 100 . Some illustrative running results of the simulation studies on the test problem data are shown in Table 5.  When searching the best values for and parameters, the primary consideration was the quantity of produced products and the secondary consideration was the average waiting rate of workers. The best result was obtained with the combination = 70 and = 90. This value pair was used in further examinations.

Examining the AJW Control Algorithm
Additional simulation studies were also performed to adjust the values of = , , , , parameters. During these simulation studies, we used the best values of parameters, Assignments of jobs and workers were performed according to the AJW control algorithm. By changing the parameter values, the assignments of jobs and workers can be influenced, which affects the productivity of the production system. The most important settings of the test environment are summarized in Table 6. The input data and initial situation of the simulation studies were fixed and the control aspects of the AJW algorithm were considered with different weights. The parameters were given all combinations of integer values from the range 0, 5 . As a result, the productivity of the production system changed. The goal was to find the best values of = , , , , parameters where the quantity of produced products ( ) and the sum ( ) of remaining times of the system are maximal. Accordingly, we performed simulation studies with different values and with the given settings of the test environment. Some typical results are summarized in Table 7. The best result was given by the following combination: = 5, = 4, = 5, = 3, = 2. The presented simulation examinations were able to find the values of the and parameters that ensure the most efficient operation of the control algorithms. In the following studies, their values do not change.

An Illustrative Example for Using the MPP Algorithm in the SBPPC Method
After finding the best values for parameters of the control algorithms, we examined the efficiency of the SBPPC method. Before describing the details, we present how our MPP-based search method works through an example. Table 6 summarizes the settings of the simulation model used in this example. The MPP algorithm, which modifies the detailed production plan for shifts, is an integral part of the SBPPC method. An illustrative simulation study was performed based on the settings summarized in Table 8. The results are shown in Table 9. The first column of the table contains the iteration number of SBPPC method. In the first iteration (#1), the IPP algorithm creates the initial solution. This is represented with the primary decision variables that determine the detailed production plans for shifts. The simulation, which uses the reactive control algorithms, shows that this initial solution leads to unfinished jobs while the manufacturing system has remaining time. In the second iteration (#2), MPP algorithm modifies the solution by moving unfinished jobs into suitable shifts, and then the simulation is run again with the new solution. This iterative process continues until the stopping conditions are met. The results of the simulation performed in each iteration are summarized in the rows of Table 9.

Table 9
The results of the MPP algorithm included in the SBPPC method The SBPPC method can achieve a significant improvement in the productivity of an EFJSHR model even with a small number of iterations by creating a quasi-optimal production plan for shifts. Table 9 also shows that all jobs are finished (all products are produced) finally in this example.

Comparison of MPP-based Search Method and Genetic Algorithm
The proposed MPP-based search method was compared with the genetic algorithm of the Plant Simulation software. In this investigation, we focused on the production planning method that assigned the jobs to shifts. This method calculated the values of the primary decision variables of the EFJSHR problem. These values formed the detailed production plan. The control of the execution of jobs within shifts was performed by the control algorithms with the previously adjusted parameters. When using our MPP-based heuristic search algorithm and the genetic algorithm, we used the same simulation method and environment. The only difference between the two approaches was the method of assigning jobs to shifts.
The genetic algorithm (PSGA) of Plant Simulation is not directly suitable for optimizing the assignments of jobs and shifts.
To solve this problem, we developed a model transformation technique that can transform the detailed production plan into a permutation scheme. This can be mapped to an array that can be fully manageable with PSGA. Each candidate array is transformed back into a detailed production plan before simulation. Thus, the detailed production plan can be mapped to the permutation of given elements. Using this model transformation technique, the optimization problem of production planning (assigning jobs to shifts) corresponds exactly to a general combinatorial optimization problem in which the objective function value depends on the order of the given elements. This allows the PSGA to solve the problem. The representation scheme of detailed production plan was designed so that the length of the array is equal to the multiplication of the number of jobs and the number of shifts. The array contains the job identifiers and zero values. Each job can appear in the array exactly once. Zero values play a "position-filling" role. These are used to ensure that the length of the array (encoding scheme) is constant for a given problem, while all possible assignment options (permutations) can be represented. The position index of each element in the array clearly determines the target shift.
For example, we have 4 jobs to be performed: , , , . There are 3 shifts: , , . In this illustrative case, the array (chromosome) contains 4 * 3 = 12 elements (genes). In the chromosome, genes 1-4 represent shift 1, genes 5-8 represent shift 2, and genes 9-12 represent shift 3. In this problem, one possible chromosome, which describes a given solution (assignments of jobs and shifts), can be seen in Table 10.

Table 10
An illustrative chromosome for PSGA Chromosome Shifts In addition, an example population of 5 individuals is shown in Table 11.

Table 11
An example population for PSGA In terms of efficiency, we compared our MPP-based method with PSGA. Table 12 shows the parameter settings of PSGA. The simulation settings for the PSGA tests were the same as the settings for the MPP-based SBPPC (Table 8). The initial populations for PSGA was generated by using the IPP algorithm. Fig. 7 shows the results of a simulation study of 30,000 detailed production plans generated by PSGA. Despite generating and simulating 30,000 candidate solutions, PSGA could not find the solution that was determined by the MPP-based search algorithm, whose objective function value was 981 and where only 5 iterations were required to find it. The disadvantage of PSGA appears when generating newer populations. PSGA only and exclusively takes into account the settings of genetic operations. In contrast, our proposed search method uses purposefully designed modification operations.
Further comparative studies were performed with different problem instances and parameter settings. These demonstrated that the proposed MPP-based search algorithm solves EFJSHR problems more efficiently than the genetic algorithm.

Conclusions
In our research, we focused on modelling and solving an integrated production planning, scheduling and control problem of on-demand flexible manufacturing. Key features of the modelled manufacturing system include a resource-constrained manufacturing environment, skilled manual workers, worker-dependent individual processing and material handling times, alternative technological routes, limited available workstations, and predefined shifts. During the research, we developed production planning, scheduling and control algorithms that can flexibly adapt to changing requirements and resource constraints. To generate detailed production plans, we developed a predictive search algorithm that includes advanced eventdriven simulation. We also developed reactive control algorithms that are embedded into the simulation to make the necessary decisions at the same time as the execution of manufacturing processes. To solve the integrated problem, we proposed a new approach based on a two-level decision hierarchy. The upper level uses a special multi-objective heuristic search algorithm to generate detailed production plans by determining the values of primary decision variables, while at the lower level, the values of the secondary decision variables are calculated by multi-criteria control algorithms. In this paper, we have described the detailed optimization model of the investigated problem, the solution method and the key algorithms. The effectiveness of the proposed algorithms is demonstrated by presenting some running results. We compared our search algorithm with the genetic algorithm of the Plant Simulation software.
The results show that the proposed search algorithm is much more efficient than the genetic algorithm. The optimization model of the integrated problem of production planning and production control was formulated in such a way that the individual skills of the workers were also taken into account. Due to the complexity of the reactive control and the large number of influencing factors, classical one-way rule-based heuristic algorithms cannot work effectively in different extreme situations. The proposed multi-criteria decision-making algorithms are able to adapt to changing conditions due to their flexibility. Considering several aspects simultaneously is very important because it allows practical needs to be incorporated into the model. By modifying the weights (control parameters) of decision aspects, the management strategy can be finetuned. Our further research plans include the study of the possibilities of systematic and/or flexible change of decision aspects within the operation of control algorithms.
The results of the experiments, which focused on the and control parameters, have shown that the usage of all decision aspects provides better results than the consideration of only one aspect. When adjusting weights, we have found that any aspect alone works less effectively than all together. Moreover, ignoring any of aspects produces a worse result than the usage of all aspects together. These results demonstrate that the usage of workers' intuitive decisions is less effective than the application of the proposed control algorithms.
Our simulation studies have also shown that taking workers' skills into account contributes greatly to increasing performance. In addition, proactively generated production plans can be performed more accurately, thus fewer corrections have to be made during the execution of processes.
The presented models and solution algorithms are suitable for control of various specific production systems operating in industrial practice. In a cyber-physical environment, the real system and the simulation system can work together in real time, so the control algorithms are able to handle directly real events as well. Workers' skills can be continuously updated in the model. As time progresses, stored values that express the actual ability of workers to perform operations can be continuously refined. The method can also be used to control automated production systems, for example, in the case of automated guided vehicles (AGVs) for material supply, to assign tasks and resources. The proposed approach and model can be adapted to any manufacturing or service processes using appropriately chosen abstract objects.
Cyber-Physical Production Systems, Industry 4.0, Internet of Things (IoT), Cloud Computing and Big Data paradigms and technologies are playing an increasingly important role in the development and management of production systems and virtual enterprises. These technologies allow the practical application of the proposed decision models and algorithms for companies by providing the appropriate input data, computational capacities, and application environment. This makes it possible to integrate the models into applied systems of enterprises.