Integrating real-time manufacturing data into a novel serial two-stage adaptive alternate genetic fireworks algorithm for solving stochastic type-II simple assembly line balancing problem

Due to various interference factors, a pre-planned assembly scheme and its cycle time can be disturbed, resulting in the failure of product delivery on schedule. However, when assembly data of the production line can be obtained in real time, the balance of the assembly line could be dynamically adjusted in case of experiencing serious interferences to optimize its cycle time in time and improve its production efficiency. Therefore, this paper proposes a dynamic rebalancing framework by integrating real time manufacturing data into a novel serial two-stage adaptive alternate genetic fireworks algorithm for solving a stochastic type-II simple assembly line balancing problem (SSALBP-II). MES (manufacturing execution system) is used to obtain some real time data such as the resource status, operation information and task information and to judge abnormal phenomenon and the overdue delivery caused by interferences. On this basis, the stochastic type-II simple assembly line balance model is constructed, with a new serial two-stage adaptive alternate genetic fireworks algorithm (STAGFA). This new algorithm can incorporate both genetic algorithm and fireworks algorithm to solve the model according to the transformation of population diversity discrimination index. Through the comparison between STAGFA and other algorithms such as fireworks algorithm, genetic algorithm, other improved intelligent algorithms, it is proved that the STAGFA is effective and superior in solving the assembly line (re)balance problem. Then, the rebalanced scheme verified by simulation is dispatched to control the physical assembly line and realize dynamic rebalancing cycle time effectively.


Introduction
Assembly usually is the final work of complex products production on assembly lines with many assembly workstations.The simple assembly line balancing problem II (SALBP-II) [1] is about how to minimize the cycle time (production time) for a given number of workstations with well-balanced workloads on each assembly line.Solving the simple assembly line balance problem needs to reasonably control the cycle time for improving the production efficiency of manufacturing to the real-time data (or current statuses) with a new balance scheme.Finally, the new assembly cycle time can be obtained to improve the production efficiency.
In this process, it is very important to have an effective algorithm to solve the actual (S)SALBP-II problem.Based on the mathematical models of SALBP-II and SSALBP-II built by previous scholars [2,3], the algorithm should be used for either static initial balance or dynamic rebalancing with good accuracy and robustness of the solution.
To realize a dynamic rebalancing solution, it is a prerequisite for accessing to real time physical space data, and incorporating them into the dynamic (re)balance (optimization) problem under random disturbances in the virtual space, before finally assigning the resultant dynamic production control scheme from the virtual space to the physical space for adjustments.Thus, it is necessary to access the resource status and operation data of the assembly line in real time, so that the dynamic rebalancing can perceive resource status disturbances of the physical assembly line in real time.Resource status includes production equipment, materials, personnel and other statuses, such as equipment normality, material flow location, workers' status, etc.These information can be obtained in real time by installing equipment sensors, configuring material two-dimensional codes or RFIDs (Radio Frequency Identification), and clocking on/off.The real-time data of production line operation, such as task completion and production quality, can be obtained in real time by MES.
After the real-time data is obtained, the assembly line MES can recognize the abnormality according to the setting rules, and predict and judge whether the impact of the abnormality needs to be dynamically balanced.If necessary, the built-in effective optimization algorithm is used to generate a new adjusted assembly scheme for timely regaining the optimal cycle time of the assembly line.
Once a new balance scheme and cycle time are established due to dynamic factors, the original production planning will be overhauled.Therefore, resources and logistics need enough time to be rescheduled.In this paper, a dynamic assembly line (re)balancing framework is proposed, which is based on the integration of assembly line-related real time data and serial two-stage adaptive alternate genetic fireworks algorithm.The main contributions are as follows.
1.A new mathematic model and its application framework capable of dynamically balancing a stochastic type II simple assembly line are proposed.The method ensures that the optimal cycle time of the assembly line can be obtained by integrating with MES to obtain assembly line operation data in real time, and dynamically be adjusted and optimized when disturbances occur, such as task delay caused by stochastic work hours.2. Based on the dynamic balance mathematical model of a virtual assembly line derived from the physical assemble line, a new serial two-stage adaptive alternate genetic fireworks algorithm is proposed according to the discrimination index of population diversity to solve the model.3. Aiming at the complex decoding and exploding operation problem of the algorithm, a new decoding method based on virtual cursor is designed in this work to ensure that the legal solution can be obtained quickly after decoding, and a right shift strategy is used to correct the illegal solutions generated by the explosion operator.
The remainder of this study is structured as follows.Sect."Related work" introduces the related work, including SSALBP-II and its model, and balance solution of assembly line.Sect."Dynamic balance framework of type-II simple assembly line based on genetic fireworks hybrid algorithm" describes the solving framework of SSALBP-II based on a hybrid algorithm.Sect."Key enabling technologies for realizing dynamic balance of type-II simple assembly line" discusses various enabling technologies for dynamic balance in detail.Numerical experiments with design and result analysis are reported in Sect."Experiments and result analysis", and the conclusion of this work and some future research directions, especially new perspectives under digital twin are given in Sect."Conclusion and discussion".

Related work
Finding optimal solution for a simple assembly line balancing problem (SALBP) has attracted extensive research attentions.The overall research efforts can be classified into two categories: (1) problem definition/modelling with/out real time data and (2) problem solving methods.

Stochastic type-II simple assembly line balancing problem
A single assembly line consists of n assembly tasks and m stations, in which each task must be assigned to a determined station according to the priority relations given by the assembly operation, the workload of each station is determined by the tasks assigned to the station, and the workload of a single station shall not exceed the cycle time of the assembly line.In the stochastic type-II simple assembly line balancing problem (SSALBP-II) with uncertain time.The randomness of working hours is usually simulated by fixed distribution.The common types of random distribution are uniform distribution, exponential distribution, beta distribution, normal distribution and so on.At present, SSALBP-II generally takes the normal distribution as an example to construct the mathematical model.Assuming that a task time follows its normal distribution with known mean and variance, the final The task set being assembled at the v moment, B v ∈ N optimization goal is to minimize the assembly line cycle time under the premise of given number of stations, that is, to minimize the maximum workload of all stations.The calculation formula of station workload is as follows [1]: where S j is the workload of station j, A j is the collection of all tasks in station j, i is the task number, and μ i /σ i 2 is the mean/variance of normal distribution of task i.
The basic assumptions of SSALBP-II are as follows: (1) a task time is uncertain and obeys an independent and definite normal distribution; (2) the operation stations on the assembly line are arranged in a straight line or in a serial order based on the determined assembly process, and the number of stations is fixed for a specific product production; (3) work in process moves simultaneously among stations according to the cycle time of the assembly line; (4) a task is the smallest processing unit in assembly, and only one task is allowed to execute in a station at the same time; (5) there is only one assembly task sequence constraint; (6) each operation station has the same assembly capacity and can handle certain assembly tasks; (7) ignore the transfer time of assembly tasks between two stations.The symbols for modeling are defined in Table 1.
For the deterministic simple assembly line balance problem, Scholl [4] first proposed its mixed integer programming model in 1999.In order to solve the SSAPLB and reduce the complexity caused by nonlinear problems, Agpak and Gokcen proposed a linearized chance constrained mixed integer programming (CCLAMP) model [5], as follows: The objective function is to minimum assembly line cycle time:

Minimize ct
(2) Constraint conditions are: Equation (3) indicates that after pre balancing or rebalancing, each operation task is assigned to a determined station.Equation ( 4) is the priority order constraint of job tasks, which means that a task can be scheduled only after all its precedence tasks have been assigned to the stations where the tasks are located on the previous stations.Equation (5) indicates that the work load of all stations shall not exceed the cycle time of the assembly line, where ϕ() is the cumulative standard normal distribution function, and α refers to the reliability that the work time of all preset stations does not exceed the cycle time of the assembly line.Equation ( 6) is the constraint of decision variables.Equation (7) indicates at the v moment, the total amount of resources required for the task in progress cannot exceed the total resources available at that moment.
For boundary variables E i and L i : where, ct 0 is desired cycle time.
x is an upward rounding function, that is, the smallest integer which is greater than or equal to x.And d is a constant and Gamberini et al. determined d 1.1 [4].

Solving methods of simple assembly line balancing problem
The algorithms for solving static assembly line balancing problems are mainly divided into three categories, including exact algorithm, heuristic algorithm and meta-heuristic algorithm.For the exact solution algorithm, a generic solution method, CP solver, was proposed by Bukchin et al. [6], which has achieved excellent results on the SALBP-I and is available for other variants of the problem, including U-shaped assembly line balancing problem, the task assignment and equipment selection problem.An enhanced iterative branch, bound and remember (IBBRe) algorithm was raised by Li et al. [7], and used to solve the type II assembly line balancing problem (SALBP-II).The superiority of the algorithm was confirmed by comparing it with the state-of-the-art algorithm at that time, the iterative beam search.A workstation-oriented heuristic algorithm with the objectives of minimizing cycle time and rebalancing cost was developed by Zhang et al. [8], and used to solve the type II rebalancing problem for the twosided assembly lines (TALRBP-II).For the meta-heuristic algorithm, Zhang et al. [9] improved a nondominated sorting genetic algorithm II to solve the multi-objective two-sided assembly line rebalancing problems, and the superiority of the algorithm is proved by comparing with the two versions of the initial NSGA-II.Zhang et al. [10] also put forward an improved imperial competition algorithm (IICA) to solve the multi-objective two-sided assembly line rebalancing problem with space and resource restrictions, and the performance of the algorithm is verified by comparison with various metaheuristic algorithm.A genetic algorithm (GA) hybridized with a heuristic priority rule-based procedure was given to solve an assembly line rebalancing problem (IALRP) by Belassiria et al. [11], and the algorithm is proved to be highly competitive.Fathi et al. [12] advanced a genetic algorithm to solve the type I simple assembly line balancing problem (SALBP-I), and the proposed algorithm performs better than the initial genetic algorithm in practical cases.
There are two main types of algorithms for solving dynamic assembly line balancing problems.The first type is the exact algorithm.Li et al. [13] put forward an efficient nonconstant task time rebalancing (ENCORE) algorithm based on the traditional simple assembly line balancing optimization method for the type II simple assembly line balancing problem considering random task time, and the computational result and statistical experiments showed that the proposed algorithm was superior to the traditional algorithm.The second type is the meta-heuristic algorithm.Considering the uncertainty of task processing time, Babazadeh et al. [14] used triangular fuzzy numbers (TFNs) to represent the uncertainty and vagueness associated with the task processing times, and an efficient multi-objective genetic algorithm (MOGA) was proposed to solve simple assembly line balancing problem and U-shaped type of simple assembly line balancing problem.In addition, the effectiveness of the proposed algorithm is verified by solution effect on the standard data set and comparison with the exact algorithm.Karas and Ozcelik [15] gave an artificial bee colony (ABC) algorithm to solve the assembly line worker assignment and rebalancing problem (ALWARBP).The experimental results indicated that the proposed algorithm could obtain the optimal solution in small-scale instances, and had higher solution quality and faster solution speed in large-scale instances.Zhang et al. [16] suggested a hybrid genetic algorithm (HGA) to solve the type II mixed-model assembly line balancing problem with uncertain task times, and confirmed the algorithm could be superior to the traditional genetic algorithm in terms of robustness and solution quality.Zhang et al. [17] raised an effective hybrid evolutionary algorithm (hEA) to solve the stochastic multi-objective assembly line balancing (S-MoALB) problem and verified the superiority of the proposed algorithm in the convergence and distribution performances by comparing with other mainstream algorithms.
At present, the research on the solution method of assembly line balancing problem focuses on meta-heuristic algorithm, but each of the single meta-heuristic algorithms has its advantages and disadvantages.In the field of assembly line balancing problem, many scholars have improved meta-heuristic algorithm in different ways, but most of the improvements focus on local modifications of the algorithm.By analyzing various meta-heuristic algorithms, it can be seen that the strengths and weaknesses of some different meta-heuristic algorithms are complementary.As the most popular meta-heuristic algorithm, genetic algorithm has strong iterative ability and can find a feasible solution in a short time.However, due to its weak ability to jump out of the local optimal solution, its solution quality is poor.Meanwhile, the standard fireworks algorithm maintains high population diversity throughout the iteration process and can effectively break through the local optimal solution.But the convergence speed of fireworks algorithm in the early stage is slow comparatively.Therefore, this paper uses the hybrid genetic fireworks algorithm, which can effectively combine the advantages of these two algorithms and improve the quality and stability of the algorithm.

Fireworks algorithms in combinatorial optimization problem
It's emerging that Tan [18] proposed fireworks algorithm in 2010 being inspired by fireworks exploding in the night sky.Fireworks algorithm can search effectively to get the best solution through population iteration like fireworks explosion in feasible space.It is a global probabilistic search method.Different from other swarm intelligence algorithms, fireworks search conducts a more refined search of the surrounding space within a certain explosion range by random explosion mechanism.
In recent years, due to good performance of solving discrete combinatorial optimization problems, more scholars pay attention to applications of fireworks algorithm.Yadav et al. [19] proposed a bi-objective optimized fireworks algorithm to effectively schedule computing tasks, reducing the amount of computation and latency of application programs.Wang et al. [20] has improved fireworks algorithm for the two-layer optimal scheduling problem which considered the reliability and economy of peak cutting and valley filling comprehensively.He et al. [21] proposed improved multiple disturbances fireworks algorithm to search for the optimal polarity corresponding to mixed polarity Reed-Muller logic circuits with minimum area.Over all, it's excellent for fireworks algorithm in the field of computer scheduling, power scheduling and digital circuits.Ultimately, fireworks algorithm, which has better search performance, can be applied to combinatorial optimization problems successfully.The assembly line balance problem proposed in this paper is essentially a combinatorial optimization problem, which can also be solved by fireworks algorithm.

Dynamic assembly balancing based on data or digital twin
Changes in the number of workers in the assembly line, equipment status and other factors will cause differences in the production process and expectations.If these differences cannot be found in time, it may cause subsequent plans to be inaccurate, resulting in production delays in the production process, reducing production efficiency.At present, data perception related methods and technologies have been studied in the field of industrial production.In terms of assembly process, in order to solve the problem in precision manufacturing industry, Liang et al. [22] proposed a real-time displacement field perception method based on the combination of on-line multipoint displacement monitoring and matrix completion to reduce the assembly error.For the lack of intelligent microassembly technology, the long product development cycle and the poor product consistency of micro-assembly products, Zhang et al. [23] constructed a digital twin process optimization system based on real-time data, process optimization rate and process reliability, and verified the effectiveness and feasibility of the system by taking the micro-assembly of radar satellite components as an example.Zhu et al. [24] presented a digital dual drive thin-walled part manufacturing framework to enable machine tool operators to manage products and make the start-up stage faster and more accurate.
In recent years, real-time data-driven digital twin and artificial intelligence technology have also been widely used in assembly line production management and control, especially in the fields of disturbance prediction, assembly efficiency, information integration and so on.Aiming at the problems of high complexity, strong dynamics, many uncertainties and frequent rework and repair of complex product assembly process, Zhuang et al. [25] employed a method of complex product assembly data management and process traceability based on digital twin, which has been well verified in some aerospace related assembly enterprises.Cunbo et al. [26] put forward an intelligent production management and control method framework of a complex product assembly workshop based on digital twin to solve the problem of high complexity in establishing digital equivalents with physical equivalents in the virtual space of the complex assembly workshop.Sun et al. [27] proposed an on-line analysis method based on a digital twin assembly line, which can improve the production capacity of the assembly line.They used two digital twin models to analyze the on-line data of the physical assembly line, and generated the optimal throughput improvement scheme of the physical assembly line.
Obviously, building a digital twin system is an effective way to achieve the dynamic balance of the assembly line, but it requires a lot of manpower and material resources in the manufacturing industry.The high maintenance cost hinders the implementation and development of the dynamic scheduling system of small and medium-sized enterprises [28].In recent years, due to the popularity of manufacturing execution system MES, some scholars have begun to pay attention to the implementation of production planning and scheduling through MES system.Aiming at the problem of flexible adjustment in the production process, Novák et al. [29] proposed a framework for planners to use MES for dynamic adjustment.For solving the problem of energy consumption in flexible job shop, Yonemoto et al. [30] proposed a mechanism of using manufacturing execution system to feedback the actual measurement data of the workshop to the scheduling system.However, the related research is still in the stage of theoretical research.How to send realtime instructions and feedback operation data through MES is still lack of practical research applications, especially in the assembly line balance problem.

Motivation of the paper
Obviously, due to various irresistible interference problems of an assembly line, such as equipment failure, untimely material distribution, operator leave, uncertain operation time, etc., the balance and cycle time will often be disturbed.The static balance scheme for an assembly line is difficult to deal with various interference factors, usually resulting in additional overtime and even affecting the production cycle time and delivery cycle of products.Therefore, it is of great significance to study the dynamic balance of the assembly line.
However, the assemble process of complex product equipment is very sophisticated.Firstly, it not only needs real-time arrival of thousands of parts and a large number of tooling, tools and equipment, but also has intricate logical relationships.Besides, many manual assembly tasks are still processed in many enterprises, which increase the difficulty of management.Moreover, the traditional data collection sources are too extensive to integrate the fragmented information.Finally, the existing research on dynamic balance is often the separation of virtual and real.Because the virtual assembly line is often disconnected from the corresponding actual one, the access of real-time data and the real-time control of the production line are too difficult to realize a real dynamic virtual control mechanism of real production.All above make it difficult to access, analyze and judge the data in time.Therefore, realizing a dynamic real-time balance of an assembly line for complex product production is greatly challenged.
Fortunately, assembly line MES system has been developed to a certain extent, which can access the production line resource status and production operation data in real time, control the production line timely, and then make the dynamic balance of the assembly line possible.However, how to effectively obtain the real-time operation data of the assembly line through MES and feedback it to the assembly line balancing system and how to send the task production instructions to the physical assembly line still need to be studied.
The traditional genetic algorithm is widely used in various assembly line balancing problems because of its strong global search ability and fast convergence speed.However, after a certain number of iterations, the population diversity of the algorithm decreases significantly, and it cannot jump out of the local optimal solution.Correspondingly, the standard fireworks algorithm will execute massive domain searches in the late stage of iteration.Therefore, the standard fireworks algorithm has better population diversity and is easier to break through the local optimal solution.However, the convergence speed of the algorithm is disappointed.Therefore, a new method is needed, which can combine the characteristics of fast convergence speed of genetic algorithm and the ability of standard fireworks algorithm to break through the local optimal solution, so as to obtain a feasible solution with high quality in a short time.
Therefore, on the one hand, how to apply MES for complex product production with the assembly line dynamic balance capability to realize the real-time balance and minimize the cycle time needs an effective framework, which should be researched.On the other hand, at present, the methods for solving assembly line balancing problems are mainly meta-heuristic intelligent algorithms.As a popular algorithm among meta-heuristic intelligent algorithms, genetic algorithm can accumulate dominant genes and obtain feasible solutions quickly, which have been widely used in various assembly line balancing problems.However, the population individuals generated by traditional genetic algorithms are often too similar in the iterative process, resulting in local optimizations.At the same time, the standard fireworks algorithm is based on the idea of global search in the early stage and local excavation in the late stage, which always maintains the diversity of the population.However, the convergence speed of fireworks algorithm is slow.Therefore, this paper employs a hybrid genetic fireworks algorithm to effectively combine the depth search ability of genetic algorithm and the breadth search ability of fireworks algorithm, and to improve the solution accuracy and algorithm stability of genetic algorithm.

Dynamic balance framework of type-II simple assembly line based on genetic fireworks hybrid algorithm
The overall framework of assembly line dynamic balance based on genetic fireworks hybrid algorithm is shown in Fig. 1.It has three key parts: (1) physical assembly line for production, (2) manufacturing execution system for simulating a virtual assembly line for verification of planned Physical layer is the carrier of virtual layer and the physical assembly line would be mapped into a virtual assembly line.The manufacturing entity elements such as personnel, equipment, materials and environment are interconnected in the assembly line and the assembly activities constitute the basis for the realization of dynamic balance of the assembly line.To form a virtual assembly line, seven elements [31] are used to uniformly characterize the production elements of an on-site actual assembly line.The assembly stations, the fixed machines and configuration workers are taken as processors.Combined with different assembly processes, each processor is equipped with controllers, actuators, buffers, service nodes, etc., which forms various assembly service units.Similarly, a measurement service unit centered on measurement equipment or a storage service unit centered on storage equipment can be constructed.Different service units are connected according to the process logic and logistics network to form a virtual assembly line.
The data of the service unit are collected and its operation status is sensed by reading information from sensors, twodimensional codes /RFIDs, Manufacturing Execution System (MES) or other systems.MES is the platform and important channel to realize the dynamic balance of the assembly line.The uploaded IoT sensing data and the issued control command data are transmitted to specific applications or execution equipment after data processing.These IoT sensing data with the characteristics of massive scale, low value density and strong uncertainty are verified, smoothed and correlated, and unified into the virtual model of an assembly line.Appropriate network communication protocols such as OPC and message queue telemetry transmission (MQTT) are selected to be transmitted to the upper model and application.
Then all data, including the data generated in the production execution process, usually are collected and attached to the virtual assembly line in the MES system.In MES, the resource model of each service unit based on seven elements is configured to obtain the status attribute values of the service unit in real time and identify resource exceptions, such as equipment, tooling, personnel exceptions, etc.At the same time, there are logistics and production operation logic models in MES, which can identify the abnormalities of production execution in real time, such as production delay, quality abnormality, logistics distribution abnormality and so on.
The dynamic balance system of assembly line is composed of assembly line mathematical model and two-stage genetic algorithm.According to the optimization objectives of production system and the assembly line constraints such as service unit resources, production tasks and process information, the assembly line mathematical model is constructed, and the serial two-stage genetic fireworks algorithm is developed, which are built into the assembly line balance system.When the system obtains the abnormal interference information, it needs to be handled intelligently in the virtual assembly line to ensure that the system responds in real time to the interference which affects delivery or production efficiency at some extent.Through serial two-stage adaptive alternate genetic fireworks hybrid optimization algorithm, the assembly line (re)balance scheme is scheduled/adjusted dynamically and timely after the balance of the assembly line is broken to a certain extent.
Based on the reconstruction modeling with seven elements, the assembly process of the production line can be simulated and the production situation of the production line can be judged and evaluated according to the operation logic of the production line and the (re)balance scheme.With a simulation evaluation of the virtual assembly line, a feasible balance scheme is formed.The control instruction data based on the feasible balance scheme involving serve units, should also be verified, extracted and pushed to multiple manufacturing elements in the physical layer by MES, and then the decision-making instructions are completed cooperatively.Finally, the scheme is sent to the actual assembly line, and the assembly line production is controlled accordingly to minimize cycle time and achieve the best production.It can be seen that the virtual assembly line based on reconfiguration model mainly realizes the digital reproduction of the production activities of assembly line in the virtual space.It is the core support for optimization and decision-making to realize the dynamic balance of the assembly line.

Key enabling technologies for realizing dynamic balance of type-II simple assembly line
The key enabling technologies to realize the dynamic balance of assembly line mainly include (1) how to collect real-time production data from the physical space, feedback them into assembly line dynamic (re)balance system and further to control the operation of the actual production line in the physical space, (2) how to optimize a dynamic balance mathematical model by using serial two-stage adaptive alternate genetic fireworks algorithm to obtain a balance scheme, and (3) how to simulate the dynamic balance, verify the scheme, assign the reasonable scheme to each service unit and execute the scheme, or feedback and iterate the unreasonable scheme.

Virtual real data fusion and real-time interaction
Virtual real data fusion and real-time interaction between the physical space and cyber space mainly refer to the interaction between physical objects and virtual models.In the physical space, the completion of assembly tasks is divided into assembly resources, assembly units and assembly workshops.Physical assembly resources include assembly resource elements such as workers, machines, materials and tasks.Under the traction of assembly tasks, each resource is interrelated to form a unit to complete a specific operation, such as storage unit and assembly unit.After unit collaboration, complete all assembly tasks in the assembly line according to the preset cycle time.
Then, in the actual production process, due to various dynamic interference factors, it needs to be dynamically balanced in response to a cycle time changing.During the dynamic balancing process of an assembly line, it is necessary to continuously receive real-time data due to the following three reasons.
1. Currently, assembly lines of complex products typically have flexibility and can produce more than one product.Even for the same product, the manufacturing process varies according to the personalized needs of customers.At the same time, most enterprises currently organize production based on orders, and the arrival of new tasks is a discrete event.Therefore, new tasks and the product and process information involved in new tasks may change over time.The real-time data must be received in to accurately form assembly line pre-balancing scheme.2. The information of resources in a workshop, such as the number of assembly line stations, workers, tooling, fixtures, etc., is also dynamically changing, and it should be obtained before pre-balancing to ensure the accuracy and enforceability of the scheme.3. Due to the existence of uncertain working hours, during the production execution process, it is also necessary to obtain real-time information about the task execution at each assembly station through MES, including the task being executed, the actual task start time, and the estimated task completion time, and so on.At the same time, the continuously acquired real-time information can be analyzed to determine whether the task is seriously delayed.That is, by continuously acquiring real-time data for analysis, the difference between the actual completion time of the task and the expected completion time could trigger rebalancing.Therefore, obtaining dynamic interference events in real time is the primary condition.So, a data acquisition method is designed, as shown in the Fig. 2. In the assembly workshop, real-time data come from the distributed control system (DCS), consisting of configuration software and programmable logic controller (PLC), supervisory control and data acquisition (SCADA) system, relational database system, system data directly from connected hardware equipment, and system data manually entered through code scanning and man-machine interface.These can be integrated through OPC (OLE for Process Control) protocol or some necessary software configuration.Of course, OPC protocol is the data protocol of the application layer.The bottom transmission process of the network needs to be based on TCP/IP protocol.

Job shop Physical resource Physical unit
The real-time data such as the actual completion time of the assembly line, the personnel team, and the running status of the equipment are transmitted to the MES in the form of a message queue of the Pulsar message middleware.The specific transmission process is that the MES sends the execution instruction to DCS, SCADA and other systems through Pulsar message middleware.SCADA and other systems synchronously transmit the execution results to MES through Pulsar message middleware to realize the data acquisition of MES.According to the characteristics of synchronization of Pulsar instructions, the real-time and security of abnormal data acquisition are ensured.The final real-time data can also be stored in Pulsar to form manufacturing big data.
The dynamic balance system and MES share the same database, which can obtain real-time information, transmit the balance scheme to the scheduling module in MES, and then dispatch the execution instructions to control the operation of the actual assembly line.In this way, the operating parameters and real-time status of physical resources and units are fed back to the assembly workshop from bottom to top.Workshop production plans and scheduling instructions based on assembly line dynamic balance are distributed from top to bottom to control physical units and physical resources.Repeat the cycle until all tasks are completed.
Between the physical assembly line and its virtual assembly line, physical resources and computing resources are mapped into information models to realize the mapping of physical workshop constituent elements, assembly production layout, logistics path layout, and assembly production operation relationships.The operation and status data of the physical workshop are real-time sensed and updated based on industrial Internet of things (IIoT), so as to realize the synchronization and real-time update of information model and physical model.In this way, the balance model can dynamically generate the balance scheme according to the real-time execution of the assembly line, form the scheduling scheme and production instructions, and send them to the task assembly workshop for execution after simulation verification.The workshop decomposes and distributes the task to the physical assembly line layer, acts on specific resources, and feeds back the execution results and parameters to the virtual assembly line data model.In this way, the assembly line together with its virtual assembly line forms an "instruction-executionfeedback-adjustment" closed loop [32].
Once the balance scheme dynamically obtained (see Sect. "Stochastic type-II simple assembly line balancing problem based on serial two-stage adaptive alternate genetic fireworks algorithm" for specific methods), the assembly line tasks can be sorted.There are many sorting methods, such as heuristic algorithm, meta-heuristic algorithm, super heuristic algorithm, etc.These algorithms can obtain the assembly line sorting scheme [33].Then the balance and scheduling scheme can be dispatched to the actual assembly line, and the execution of physical assembly line can be controlled by MES.When the physical layer is disturbed, it is fed back to the virtual assembly line in the virtual space.According to the current state, the assembly line is dynamically rebalanced in real time to form a new balance scheme, which is repeated until all tasks are completed.

Stochastic type-II simple assembly line balancing problem based on serial two-stage adaptive alternate genetic fireworks algorithm
Traditional genetic algorithm (GA) is a natural evolution process based on biological evolution theory and genetic variation theory.It is a global search algorithm proposed by Holland [34] based on the principle of "survival of the fittest" of biological evolution.
The standard fireworks algorithm (FWA) was first proposed by Tan and Zhu in 2010 based on the observation of the natural phenomenon of sparks produced by fireworks explosion [35].The optimization process of fireworks algorithm simulates the process of explosion spark diffusion after fireworks explosion.In this algorithm, fireworks are regarded as the feasible solution in the solution space of optimization problem.Then a certain number of sparks generated in the fireworks explosion process are regarded as the process of neighborhood search, and the sparks generated are the new solutions generated by neighborhood search.

Improved serial two-stage adaptive alternate genetic fireworks algorithm
FWA and GA have complementary advantages in optimization.FWA has strong continuous optimization ability and is not easy to fall into local optimization, but its convergence speed is slow.Although GA can quickly converge to the local optimal solution when solving the assembly line balance, it has poor continuous optimization ability.Therefore, FWA and GA are suitable for mixed use.If the population diversity is taken as the judgment criterion, During the iteration process of the fireworks algorithm, when the calculated population diversity is greater than the population diversity threshold value FD m of the fireworks algorithm, it indicates that the population diversity is high at this time, and it is necessary to accelerate the convergence rate of the population.Therefore, the population is introduced into the genetic algorithm for in-depth search.After performing a deep search, when the calculated population diversity is less than the population diversity threshold GD m of the genetic algorithm, it indicates that the population diversity is too low to avoid the local optimum at this time.The population is introduced into the fireworks algorithm for a breadth search.In order to ensure search depth or breadth, a minimum iteration number (20) is also given to genetic algorithms or fireworks algorithms.In this way, the whole optimization process is searched repeatedly in two search stages between FWA and GA with the population diversity as the discrimination index and condition.It can not only ensure the optimization efficiency of the algorithm, but also avoid the algorithm falling into local optimization too early, and finally get the satisfactory solution of the problem.Thus, this paper designs a serial two-stage adaptive alternate genetic fireworks algorithm (STAGFA) to solve the dynamic balance problem of SALBP-II.
The overall framework of STAGFA algorithm is shown in Fig. 3.The tasks in the assembly line balance problem can be represented by the Active On the Node (AON).After encoding, the tasks can be encoded as a set of integer codes.Since there is more than one order of codes, different coding  Then the optimization process alternates between FWA and GA using population diversity as the discriminant condition.When the population diversity is low, the stronger spatial search ability of FWA is used for breadth search.And when the population diversity is high, the depth search is performed with the local search ability of GA to make the algorithm converge quickly and find the optimal solution.When the algorithm convergence condition is reached, the satisfactory solution will be output.Finally, the solution to the assembly line balancing problem is obtained by decoding.The specific steps of FWA, GA, coding and decoding, and population diversity calculation processes are described in Sect."Implementation steps and techniques for solving balance problems".

Implementation steps and techniques for solving balance problems
(1) Algorithm and implementation steps.
The STAGFA algorithm is shown in Algorithm 1.
The specific steps of STAGFA algorithm are as follows: Step 1: population initialization.According to the integer coding rules, the mixed initialization method is used to generate N fireworks to form the fireworks initial population.
Step 2: calculate the fitness value of all fireworks in the population.
Step 3: Judge whether the average Hamming distance D average is less than the population diversity threshold value FD m of the fireworks algorithm or whether the maximum number of iterations I f of the fireworks algorithm is reached.If D average > FD m or the running number of FWA reaches the maximum iteration number of FWA, turn to step 6 to enter the genetic algorithm process, otherwise turn to step 4.
Step 4: for fireworks x i , calculate the number of sparks S i and the corresponding explosion radius A i generated by fireworks in the population according to Eq. ( 13) and Eq. ( 14), conduct explosion and Gaussian variation operations on fireworks to generate explosion sparks and Gaussian variation sparks, and combine the newly generated sparks with the original fireworks population to form a new fireworks population.
where, f (x i ) is the fitness value of fireworks x i , y min min(f (x i )),(i 1,2, …, N) is the minimum value of fitness value in the current fireworks population, and y max max(f (x i )), (i 1,2, …, N) is the maximum value of fitness in the current fireworks population.A is a constant, which is used to control the explosion radius.M is a constant, which is used to control the number of explosive sparks generated.E is a minimum value to avoid division by zero.
To avoid overwhelming effects of splendid fireworks, bounds are defined for S i , which is shown in Eq. (15).
where a and b are const parameters.Meanwhile, to avoid a too small explosion radius, the minimum explosion radius A min is designed.The final value of explosion radius A i is taken as Eq.(16).
Step 5: the better N fireworks were selected according to the fireworks fitness value to maintain the population size.
Step 6: the N fireworks selected in step 5 are taken as the individuals of GA to form the initial population of GA, and all individuals are sorted by fitness value.
Step 7: select individuals in the population with Roulette.
Step 8: according to the individual fitness value, the two individuals with the highest fitness value and the lowest fitness value separately are crossed, and the other individuals are crossed randomly according to the crossover probability P c .
Step 9: the mutation operation is performed on all individuals according to the mutation probability P m .
Step 10: the mutated population is reinserted into the original GA population to form a new GA population, and some individuals are randomly selected from the new population to calculate the average Hamming distance d between individuals.
Step 11: judge whether the average Hamming distance D average is less than the population diversity threshold GD m of the genetic algorithm and whether the maximum iteration number I g of GA is reached.If D average < GD m and the running number of GA reaches the maximum iteration number of GA, turn to step 12, otherwise turn to step 7 to continue the GA process.
Step 12: judge whether the algorithm reaches the overall maximum number of iterations I a .If so, exit the algorithm and output the operation results.Otherwise, turn to step 2, take the individuals in the genetic population as fireworks to form the fireworks population and enter the FWA process.
The fireworks code is in the form of integer codes.If the assembly task i 1,2,…,I, the code is composed of integers from 1 to I, and each bit code represents the corresponding assembly task sequence number.Since there are strict predecessor or successor constraints between assembly tasks, set the predecessor or successor constraint matrix as B [b il ] I×I .If task I is the immediately preceding task of task l, then b il 1; otherwise, b il 0.
The type-II simple assembly line balance problem is to optimize the assembly line cycle time under the condition that the number of stations is determined.In the existing research, the traditional decoding method usually needs to preset an ideal assembly line cycle time according to experience, then to assign each assembly task to a station according to the decoding rules, and to update the assembly cycle time according to the task allocation.Through repeated decoding, a more reasonable decoding result is finally obtained.In this decoding method, the update of each assembly line cycle time changes with the maximum assembly time of each station.It is necessary to update the assembly line cycle time through continuous decoding operation, which is inefficient, and the calculated ideal assembly line cycle time limits the decoding to a great extent.After decoding, the number of allocated stations may be different from the original number of stations on the assembly line.In order to avoid the above situation, a new decoding method based on virtual cursor is designed in this study.By setting the cursor on the assembly task sequence and constantly moving the cursor, the cycle time of the assembly line and the station allocation of operation tasks are determined.The virtual cursor decoding is shown in Algorithm 2. The specific steps of virtual cursor decoding are as follows: Step 1: initialization parameter, rank 1. Calculate the sum of time of all assembly tasks TAT sumd j according to the assembly process, and then calculate the ideal cycle time CT* of the assembly sequence according to Eq. ( 17); where t max is the maximum assembly time required in all assembly tasks.
Step 2: two fixed cursors PO 0 and PO m are set before and after the first and last bits of the code.The number of movable cursors between the two cursors is m-1, that is, P 1 , P 2 ,…, P m-1 .Insert the cursor into the activity sequence in turn.For each cursor, calculate the sum CT i of all activities between cursor PO i-1 and PO i to minimize gap i |CT i -CT*|, and then insert the next cursor until P m-1 is inserted into the sequence.maxCT i max{CT 1 , CT 2 ,…, CT i , …,CT m }.Record the minimum cycle time CT min maxCT i ; Step 3: the calculated gap i is sorted from large number to small number to obtain {gap i,1 , gap i,2 ,…, gap i,rank ,…, gap i,m }; Step 4: for gap i,rank , if rank > m, go to step 10, otherwise continue; If i m, turn to step 5, otherwise turn to step 6; Step 5: if CT i -CT min > 0, move P i-1 one bit to the right; if CT i -CT min < 0, move P i-1 one bit to the left; if CT i -CT min 0, do not move P i-1.Go to step 7; Step 6: if CT i -CT min > 0, move P i one bit to the left; if CT i -CT min < 0, move P i one bit to the right; if CT i -CT min 0, do not move P i. Go to step 7; Step 7: recalculate CT i , and CT min maxCT i .If CT min < CT min , keep the cursor movement and go to step 8; if CT min ≥ CT min , then cancel the movement of the cursor, reset the cursor, and go to step 9; Step 8: judge whether each cursor position after moving is repeated with the previous position.If it is repeated, go to step 9; otherwise CT min CT min , and turn to step 4; Step 9: rank rank + 1, and turn to step 4.
Step 10: output P 1 , P 2 ,…, P m-1 cursor position and CT min ; Figure 4 shows an example of assembly operation, in which the number of assembly tasks is 9, the number of stations m 3, the sum of operation time of all operation tasks TAT 37, and the theoretical minimum cycle time CT* max([TAT/m],t max ) 13 (the result is rounded up).Through coding, a series of legal assembly task codes 1-2-3-4-5-6-7-8-9 shown in Fig. 5 can be obtained.
The virtual cursor decoding process proposed in this paper is used to decode the above assembly task code.The decoding process is shown in Fig. 5, and the initial position of the cursor is shown in Fig. 5a).The assembly time of the three stations is 12, 9 and 16 respectively, and the cycle time of  5b), by moving the cursor P 2 , it is obtained that the new assembly work time of each station is 12, 14 and 11, respectively and the new assembly line cycle time is 14.At this time, it is impossible to continue moving the cursor, and then the final decoding result is obtained.The assembly work tasks in station 1 are task 1, 2 and 3, the assembly work time is 12.The assembly work tasks in station 2 are task 4, 5 and 6, and the assembly work time is 14.The assembly tasks in station 3 are task 7, 8 and 9, the assembly time is 11, and the total assembly line cycle time is 14.The Gantt chart of each station in the decoding process is shown in Fig. 5c).
In this paper, a hybrid population initialization method is designed to replace the original random initialization method to improve the quality of the initial population.The fireworks in the initial population are composed of two parts.The first part is generated by the heuristic method, and the priority rule adopted is the minimum latest start time (MINLST) [36].The remaining fireworks are randomly generated in the whole solution space.The two parts account for 50% of the initial fireworks population respectively.
The MINLST rule adopted is sensitive to the objective function of the minimum chemical period, which can reduce the range of solution space to a great extent [37].At the same time, in order to avoid the rapid decline of population diversity and make the search process to fall into local optimization, the remaining 50% of fireworks are still generated by random initialization.The hybrid initialization method not only improves the quality of the initial solution and reduces the scope of the solution space, but also ensures the diversity of the initial population which avoids the premature falling into local optimization to a certain extent.
According to the characteristics of integer coding of assembly line balance problem, an explosion operator is designed to generate fireworks for spatial search.assembly operation.According to the coding rules in this section, the example can obtain the integer code of assembly task sequence of 1-2-3-4-5-6-7-8-9.If the assembly task sequence is used as fireworks for explosion operation and the explosion radius is 4, the operation process of explosion operator is shown in Fig. 7. First, the position of a task in the assembly task sequence is randomly selected as the explosion starting point.In the example, the randomly selected explosion starting point is the position of task 3. The coding position is counted according to explosion radius to determine the explosion end point.In this example, because the explosion starting point cannot count four coding positions to the left, it is determined the explosion end point should be turn to the right as the location of task 6.After determining the start point and end point of explosion, the sequence for explosion is obtained, for i= 1 : n do if all predecessor tasks of ji finished then i=i+1 else if move ji to the last bit of the job sequence end if end for return new chrom The specific method of the right shift strategy is as follows.
Starting from the first position on the left of the assembly job sequence, determine whether there is its predecessor task after the task at this position in the sequence.If not, we can start this task.Otherwise, it indicates that the predecessor task of this task has not been completed and the task cannot be started.Move the code of the position of this task to the last right position of the assembly sequence.From left to right, judge whether all the tasks need to the right, so as to obtain the assembly task code that meets precedence relations.The explosion sequence 6-5-3-4 generated in Fig. 7 obviously does not meet precedence relations of the assembly task (task 6 is the predecessor task of task 3).It is corrected by the right shift strategy to obtain the legal task sequence 5-3-4-6.Insert the sequence back to the original position of the overall task sequence to obtain the final explosion spark 1-2-5-3-4-6-7-8-9.
The mutation operator uses the Gaussian mutation method to generate the Gaussian mutation spark [38].It should be noted that the Gaussian mutation spark generated by the Gaussian mutation still does not meet the precedence relations.Therefore, it is also necessary to use the right shift strategy to correct the illegal solution, so as to obtain the final Gaussian mutation spark.
According to the characteristics of integer coding of assembly line balance problem, the Hamming distance between two individuals is proposed to determine the population diversity.The Hamming distance for all individuals is calculated in the population.At the same time, in order to eliminate the influence of individual coding dimension, the average Hamming distance is divided by the total individual coding dimension.The larger the average Hamming distance is, the higher the population diversity is.The calculation method is shown in Eq. (18).
where Dis is the average Hamming distance, δ(α, β) represents the Kronecker function.When two independent variables α β, the function value is 1; otherwise it is 0.
x represents the number of the pairs of the population, y represents the total number of individual genes, p represents the sequence number of individual pairs, q represents the sequence number of gene position, anda pq,1 , and a pq,2 represent the first and second number on the q-th gene position of the p-th individual respectively.

Experimental design of balance optimization algorithm
Meta heuristic algorithm is essentially a random search algorithm with some control strategy.The more the total number of individuals is, the better the search results should be.Therefore, it is limited to compare the performance of various algorithms only from the optimal value of the algorithm without considering the total number of individuals searched by the algorithm.In order to eliminate this influence, this paper introduces the evaluation index based on the total number of individuals [39].That is, the optimization performance of each algorithm is compared by the total number of given individuals.
In order to analyze the performance of the algorithm, the following experiments are designed for solving the type-II simple assembly line balancing problem (SALBP-II).Experiment 1 is the parameter evaluation of FWA algorithm.Experiment 2 is the performance comparison and analysis of STAGFA, FWA and GA.Experiment 3 is the comparative analysis of STAGFA and other intelligent algorithms.The compiling environment of the algorithm is MATLAB 2014b, the running environment is Windows 7, and the relevant configuration is 2.8 GHz Inter Celeron G1840 CPU and 8 GB RAM.
In order to compare the performance of the algorithm with others under the same conditions, this paper employs the optimal value, average value and convergence based on the total plan generation quantity.The optimal value based on the total plan generation quantity means that given the total plan generating number, the algorithm runs individually many times to take the optimal value of the objective function, and this index reflects the best performance of the algorithm.The average value based on the total plan generation quantity means that given the total plan generation quantity, the algorithm runs individually many times and takes the average value of the objective function.This index reflects the average performance of the algorithm.The convergence based on the total plan generation quantity means that given the total plan generation quantity, the algorithm runs individually many times and takes the standard deviation of the objective function, which reflects the convergence performance of the algorithm.
The following experiments were conducted to verify the performance of the algorithm using Dataset 1 from the standard instance library of the simple pipeline balancing problem proposed by Scholl [4]

Experimental design of assembly line dynamic balance
For an assembly line, the number of assembly tasks is 62 (n 62), including two virtual operation tasks, which respectively represent the beginning and end of the assembly operation, as shown in Table 2.The precedence relationship of the process is also seen in Table 2.The assembly line is composed of five stations (m 5).
According to the framework in Fig. 1 and the implementation technologies in Sect."Key enabling technologies for realizing dynamic balance of type-II simple assembly line", the station balance optimization is carried out to obtain the balanced scheme.However, on the virtual assembly line, it is found that some operations are delayed in the implementation process of the scheme, resulting in the completion delay of one station and triggering rescheduling and dynamic balance.The (re)balanced scheme can be distributed to the assembly line after simulation verification.The specific implementation of the experiment and the analysis of the experimental

Parameter evaluation of FWA algorithm
In the algorithm flow of FWA, the explosion spark is the core of the whole algorithm.The explosion radius and the number of explosion sparks are important parameters to control the explosion operator.In this part of the experiment, the ratio of explosion radius control parametersA and the minimum explosion radius A min (A/A min ), and the ratio of the maximum explosion spark number control b and the minimum explosion sparka(b/a) will be evaluated.To investigate the influence of these parameters on the performance of the proposed algorithm, the benchmark Tonge is implemented for the calibrated instances.First, the impact of A and A min are explored, and the experimental settings are N 40, M 10,a 0.2, b 0.4, A min 2, A 5, 10, 15, 20, 25, 30 and 35.Where there is no specific requirement for the values of a and b.And since the fireworks individuals are integer coded, their minimum variation range is 2 coded positions, so the minimum explosion radius is 2.Then, A is set in the order of values from small to large, and its maximum Fig. 8 The influence of A/A min value cannot exceed half of the entire encoding length (in dataset Tonge, the coding length is 70).The algorithm runs 10 times separately.Figure 8 shows the variation of the optimal value, average value and convergence performance with the increase of A/A min .
In order to study the influence of the maximum and minimum explosion spark number on the performance of the algorithm, according to Eq. ( 15), the experimental settings are as follows: N 40, A min 2, A 20, M 10, a 0.1, b 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9.Where there is no specific requirement for the values of A and A min .Set the control parameter of minimum explosion spark number a 0.1, and then the control parameter of maximum explosion spark number b (general a < b < 1) is set from small to large in order of values.Figure 9 shows the changes in the optimal value, average and convergence performance with the increase of b/a.
From the experimental results shown in Figs. 8 and 9, it can be seen that the selection of parameters should be avoided by choosing a too large/smallA/A min and b/a.A too large A/A min will tend to destroy the dominant gene.A too small A/A min results in small differences between individuals that generate sparks, which reduces the diversity of the population.While, a too large A/A min is easy to destroy dominant genes.A too large b/a will cause too many explosive sparks in each iteration, affecting the efficiency of the algorithm.While, a too small b/a indicates that individual firework explosions produce fewer sparks and involve a too small searchable range, which affects the solution quality of the algorithm.Therefore, the above algorithm parameters should be chosen as a moderate value.
From Figs. 8 and 9, it can be seen that the value of A/A min should be taken as 10-12.5 for a good convergence performance and high solution accuracy of the algorithm.The value of b/a should be equal to 2 for the best convergence and solution accuracy of the algorithm.

Comparison with FWA and GA
The total plan generating number as the evaluation index is used to analyze the population diversity of FWA and GA when solving SALBP-II, and the average Hamming distance of individuals in the population is used as a measure of population diversity to analyze the change of population diversity Figure 10 shows the changes in population diversity of FWA and GA with the increase of the total plan generating number.It can be seen from the figure that the initial population diversity is about 0.45.The reason for the low initial population diversity is the encoding characteristics of the assembly line balance problem.Due to the strict precedence relationship between assembly tasks in this problem, the initial population cannot be randomly generated.
According to Fig. 10, when the total plan generating number reaches 10,000, the population diversity of the genetic algorithm rapidly decreases to around 0.1.The population diversity of the fireworks algorithm decreased slowly and remained at a level of around 0.3.Therefore, in order to ensure the convergence of the hybrid algorithm, when the population diversity of the fireworks algorithm is higher than 0.3, the population is introduced into the genetic algorithm for in-depth search.When the population diversity of the genetic algorithm is lower than 0.1, the population is introduced into the fireworks algorithm for iterative optimization to improve the population diversity.Therefore, there are two thresholds.One is FD m 0.3 for judging the population diversity of the fireworks algorithm.The other is GD m 0.1 for judging the population diversity of the genetic algorithm.
A comparative analysis of the algorithm performance among FWA, GA and STAGFA through benchmark Tonge mentioned above is carried out.Set the algorithm parameters of FWA, GA and STAGFA as follows.FWA parameter settings areN 40, A 30, A min 10, M 10, a 0.    13 shows the variations of the convergence of the three algorithms with the increase of the total plan generating number.It can be seen from Figs. 13 and 12 that at the beginning, the different total plan generating number is small, the advantage of STAGFA is not obvious, and the optimal value and average value are not less than the optimal value and average value of GA, indicating that the speed of STAGFA to find a satisfactory solution is slower than that of GA.But with the continuous increase in the number of total plan generation, the advantage of STAGFA begins to gradually emerge.When the number of total plan generation reaches 10,000, the optimization speed of the three algorithms has slowed down.Among them, GA and FWA gradually tend to converge, and the optimal value and average value are no longer significantly decreased.However, STAGFA still maintains high search efficiency, and finally its corresponding performances are far better than the optimal value and average value of GA and FWA.At the same time, it can be seen from the convergence curve of Fig. 13, that the convergence performance of STAGFA is better than FWA's and GA's with the increase of the total plan generating number.

Comparison with other intelligent algorithms
In order to further verify the effectiveness of STAGFA, the optimal value is used to compare it with the algorithms in existing literature.This paper uses all the examples in the Data set 1, part of the standard example library for simple assembly line balance problems provided in the literature for experimental verification [4].This part of the examples contains nine problem scales, and each scale contains 128 examples with different station numbers.The algorithm parameters of STAGFA are set in Sect."Comparison with FWA and GA".Each example runs 10 times individually to obtain the optimal value.In order to analyze the experimental results, the relative percentage deviation (RPD), Eq. ( 19), is used to evaluate the quality of the algorithm [40].
Among them, C is the assembly line cycle time calculated by the algorithm, C min is the optimal solution provided in the case library.The smaller the value of RPD is, the better the performance of the algorithm is.This paper compares the proposed algorithm with some excellent improved algorithms for solving this problem, including "Pga" proposed by Zhang et al. [10], and "rGA_prb", "rGA_rks", "IDEA_rd2", and "IDEA_apt" proposed by Li et al. [13,41].Table 3 presents the comparative results of these algorithms, with the bolded data representing the results corresponding to the best-performing algorithm for this example.
It can be seen from Table 3 that in the solution of a total of 128 examples under nine scales in the example library, STAGFA obtains the smallest RPD value under four scales (29,30,32,111), and the average RPD value for all examples is the smallest, which is 1.94.Compared with other algorithms in the experiment, the algorithm optimization efficiency has increased by 4.12-54.12%,it shows that the STAGFA proposed in this paper has excellent optimization performance.While the median RPD of all cases is the smallest, 1.65, which is 7.88-76.36%better than other algorithms, which indicates that the algorithm has better stability than other algorithms and can effectively solve the assembly line balancing problem and obtain satisfactory optimization results with guaranteed stability.

Stochastic type-II simple assembly line balancing problem
Based on the stochastic type-II simple assembly line balancing problem, firstly, the virtual reconstruction of the assembly line is carried out, as shown in Fig. 14.The data of onsite equipment and major systems are connected through the technologies in Sect."Virtual real data fusion and real-time interaction" to form a virtual assembly line.The real-time operating data of the manufacturing system and the real-time information of physical resources, such as task, product and process data, the number of assembly line stations, worker, Fig. 14 The virtual reconstruction of the assembly line tooling, fixture information, etc., are input into the assembly line balancing algorithm through MES.Secondly, the method STAGFA in this paper is used for the pre-balance according to current task, product and process data, the number of assembly line stations, worker information, etc. Considering stochastic working hours, the balance results are shown in the assembly line.The cycle time CT 0 75.3746 (Fig. 15).On the basis of obtaining real-time status of the resources of the assembly lines, during the production execution process, it is also necessary to obtain real-time information about the task execution at each assembly station through MES, including the task being executed, the actual task start time, and the estimated task completion time, and so on.At the same time, the continuously acquired real-time information can be analyzed to determine whether the task is seriously delayed.For example, it is found that the operation of task 9 (j 9) is delayed (task time changes from 2.0294 to 14.0688), resulting in the delay of station 1.If the rescheduling is not triggered and executed according to the pre-balance result, the assembly line cycle time is changed from CT 0 75.3746 to CT 1 84.8027 (Fig. 16), and the difference ratio between the maximum and minimum cycle time of the station reaches about 15%, and the threshold of 10% set in the system has been exceeded.Therefore, the system performs rebalancing at the completion time of task 9, that is, the rebalancing trigger when t 35 is inserted automatically.The actual completion time of the task may differ from the expectation due to the uncertainty factor at the assembly line site.According to the actual completion time of the task at t 35, all of task sets are divided into task sets completed, task sets being assembled and task sets not yet started.Then the task sets not yet started are  This balance scheme then is assigned to the actual production line through the MES system, and then dynamically rebalancing when other severe stochastic delay disturbances coming, so as to go back and forth until all tasks are completed.However, in the actual operation process, there are no other interference factors except for the uncertain working hours since the scheduling scheme is issued.By continuously acquiring real-time data for analysis, the difference between the actual completion time of the task and the expected completion time does not trigger rebalancing, and the actual completion Gantt chart is shown in Fig. 18.It can be seen that in the actual production, according to the rebalance scheme, the cycle time is changed due to the uncertain working hours with different actual deviation, which is 79.1486, but still lower than 84.8047.It shows that the cycle time is improved 7%, and the rebalance scheme is feasible.

Conclusion and discussion
Aiming at solving the dynamic rebalancing problem of an assembly line when its original balance is broken due to At the same time, the average Hamming distance between individuals in the population is designed as a discrimination method, which can effectively characterize the diversity of the population.Through this method, the search process of the algorithm can be controlled and a two-stage serial search can be carried out between GA and FWA.According to the final experimental results, combined with the new decoding design proposed in this paper, this STAGFA shows excellent algorithm performance in solving SALBP-II, which is better than GA, FWA and other intelligent algorithms in terms of optimal value, average value, stability performance and convergence performance.
Dynamic balance assembly line can make the cycle time shorter based on the above framework.However, because the resources of production site also need real-time adjustment according to rebalance scheme, too frequent rebalancing of the production line is bound to increase the cost of management and logistics.The threshold is set in this paper to avoid excessive dynamic response.If the threshold is too large, it cannot deal with interference factors in real time.If it is too small, it will increase the adjustment cost to the ent resource allocation between the old and new schemes.At present, the threshold size still depends on experience.In order to meet the customer's delivery time, it is often set too small.In addition, the fixed random distribution always deviates from the actual production, resulting in a large difference between the random work hours of calculation and that of actual production, and the effect of dynamic balance will be affected.Digital twinning and its prediction technology should be a feasible technology to solve this problem in the future.It will make the dynamic balance of the assembly line more reasonable and intelligent.
According to the framework proposed by this paper, data is stored in service units, and a service unit can become a digital twin agent [32] with self-perceived, self-predicted and self-decision-making characteristics.That is, the virtual agent can predict whether the existing balance scheme meets the delivery date and other objectives within a certain range and decides whether to adjust the dynamic balance scheme.According to this method, on the one hand, it can be arranged in advance and ensure the distribution of materials, and the timely arrival of personnel, tooling and fixtures, so as to ensure the robustness of the scheme and avoid adding additional rebalance costs.On the other hand, it also avoids the problems such as the actual production line cannot be adjusted in time and management confusion caused by too frequent dynamic balance.
Our future work is to build a digital twin platform, and combine the methods and algorithms proposed in this paper to more effectively solve stochastic type-II simple assembly line balancing problem.

Fig. 1
Scheme verificaƟon and reverse control

Fig. 2
Fig. 2 Information fusion and reverse control

Fig. 4
Fig. 4 Assembly instance activity network diagram and assembly task code

Fig. 7
Fig. 7 Explosion operator as an example.In Sect."Parameter evaluation of FWA algorithm", 11 examples with 10-20 stations from the Tonge calculus in Dataset 1 are intercepted for experiments to evaluate the parameters of the FWA algorithm, and the average values of the resulting assembly line beats was taken in the experiment.In Sect."Comparison with FWA and GA", experiments are also performed with the examples in 5.2.1 to compare and analyze the performance of STAGFA, FWA and GA.In Sect."Comparison with other intelligent algorithms", then, experiments are performed with all the examples in Data Set 1 to compare and analyze STAGFA with other intelligent algorithms.The algorithms are compiled in MATLAB 2014b, run in Windows 7, and the associated configuration is a 2.8 GHz Inter Celeron G1840 CPU and 8 GB RAM.

Fig. 9
Fig. 9 The influence of the b/a 2 and b 0.9.GA parameter settings areN 40, P c 0.1 and P m 0.8.STAGFA parameter settings areN 40, A 30, A min

Fig. 10 Fig. 11 Fig. 12
Fig. 10 Population diversity with the total plan generating number

Fig. 13
Fig. 13 Convergence performance with different total generating number

Fig.
Fig. Rebalance Gantt chart based on real-time data

Table 1
Definition of symbols

Table 2
Assembly task Task no.