A Novel Approach of Resource Allocation for Distributed Digital Twin Shop-Floor

: Facing global market competition and supply chain risks, many production companies are leaning towards distributed manufacturing because of their ability to utilize a network of manufacturing resources located around the world. Deriving from information and communication technologies and artiﬁcial intelligence, the digital twin shop-ﬂoor (DTS) has received great attention from academia and industry. DTS is a virtual shop-ﬂoor that is almost identical to the physical shop-ﬂoor. Therefore, multiple physical shop-ﬂoors located in different places can easily be interconnected to realize a DT that is a distributed digital twin shop-ﬂoor (D2TS). However, some challenges still hinder effective and efﬁcient resource allocation among D2TSs. In order to attempt to address the issues, ﬁrstly, this paper proposes an information architecture for D2TSs based on cloud–fog computing; secondly, a novel mechanism of D2TS resource allocation (D2TSRA) is designed. The proposed mechanism both makes full use of a digital twin to support dynamic allocation of geographic resources and avoids the centralized solutions of the digital twin which lead to a heavy burden on the network bandwidth; thirdly, the optimization problem in D2TSRA is solved by a BP neural network algorithm and an improved genetic algorithm; fourthly, a case study for distributed collaborative manufacturing of aero-engine casing is employed to validate the effectiveness and efﬁciency of the proposed method of resource allocation for D2TS; ﬁnally, the paper is summarized and the relevant research directions are prospected.


Introduction
With the increasing challenges of global economy, companies have to continue to make the switch to more flexible, agile, and intelligent manufacturing paradigms in order to meet the changing market conditions-including responses to the coronavirus pandemic, low-volume customized products, global supply chain issues, pressure to reduce costs, and demand fluctuations. Distributed manufacturing is apprehended as the ideal manufacturing approach in the field of production science [1,2] by leveraging and coordinating localized production facilities (e.g., shop-floor) that are connected to each other via advanced information and communication technologies. With a DM model, manufacturers can spread out discrete manufacturing components across geographically dispersed facilities instead at a single shop-floor, enabling them to produce closer to target customer, low labor cost, or raw materials areas. Nomenclature lists all abbreviations used in the paper to enhance reader comprehension and maintain conciseness.
Despite the considerable research to understand DM along with the associated advantages and implementation barriers, the resource allocation research oriented to DM is still lacking dynamic adaptation and reconfiguration methods during runtime (e.g., addition or removal of machines, reconfiguration of existing machines) to accommodate the continuously changing demand in production or due to failures [3]. Existing research on resource allocation in distributed manufacturing systems has the following two shortcomings:

Literature Review
This section reviews existing related research work on D2TS, especially cloud manufacturing and DTS, and describes the research gaps that motivated this research work.

Cloud Manufacturing
In the last decade, a lot of research and applications have been carried out on distributed manufacturing, such as agile manufacturing [9], green manufacturing [10], and especially cloud manufacturing [11]. The research content of cloud manufacturing can be roughly divided into the following three categories: (1) theory and framework system of cloud manufacturing; (2) key technologies of cloud manufacturing, including encapsulation Information 2023, 14, 458 3 of 24 modeling, discovery matching, optimization selection, exception handling, and so on; (3) research and application of cloud manufacturing platforms.
Li et al. [12] proposed the concept of cloud manufacturing and discussed the characteristics, important definitions, and system architecture of cloud manufacturing. Cheng et al. [13] put forward a hypernetwork-based model introducing the idea of graph coloring and an artificial bee colony algorithm-based method for distributed and collaborative manufacturing service scheduling towards smart manufacturing. Möncha and Shen [14] proposed a greedy randomized adaptive search framework for a parallel machine scheduling with the total weighted delivery time in distributed manufacturing. Carlucci et al. [15] proposed an intelligent decision-making model based on a minority game for resource allocation in cloud manufacturing. Delaram et al. [16] proposed a utility-based matching mechanism for stable and optimal resource allocation in cloud manufacturing platforms using a deferred acceptance algorithm. Yin et al. [17] proposed a device selection method based on constraint characteristics for networked collaborative manufacturing equipment optimization. Wu et al. [18] proposed a data-driven real-time scheduling method for a shop-floor based on a BP neural network. Zhou et al. [19] presented a unified knowledge graph-driven production resource allocation approach for discrete manufacturing workshops, where the knowledge graph model was designed to integrate the engineering semantic information in the machining shop-floor. Szaller et al. [20] introduced a distributed collaboration framework of manufacturing agents, where agents considered trustfulness during the selection from resource-offering agents' proposals and made decisions considering subjective trust and public reputation values. Liu et al. [21] developed an artificial intelligence-assisted distributed system for manufacturing plant-wide predictive maintenance applications, which enabled the data to be processed near the sensors, requiring fewer data to be transmitted to the central cloud server, reducing network delay and delivering more accurate results.

Digital Twin Shop-Floor
DT promotes a new breed of manufacturing systems comprising automated industrial machines extended with additional sensors and actuators in sensor and/or actuator nodes (SANs). Industrial machines and SANs in DT are governed by their virtual models executed on embedded computers, interconnected via industrial networks or high-level dedicated protocols [3]. The virtual model in DT realizes the functional services and application requirements of design optimization, performance improvement, and predictive maintenance for physical objects by multi-dimensional characterization of the actual behavior of physical entities [22]. Currently, the DT technology has been explored and applied in more than 50 directions in over 10 fields, including industry, agriculture, education, healthcare, transportation, energy, and more [23].
In the research field of DTS, Zhang et al. [24] proposed a modeling and online training method for DTS, aiming at the difficulties in modeling, simulation, and verification. Zhang et al. [25] constructed a software and hardware integrated configuration model of a digital twin manufacturing cell (DTMC) and established a smart contract-based edge-cloud collaborative operation and intelligent control mechanism of the DTMC. Qian et al. [26] proposed a mathematical method for verifying the DTS twin model. Liu et al. [27] proposed an online prediction method of the operation status of the DTS based on real-time data. Hong et al. [28] proposed a real-time detection approach for DTS production action. Liu et al. [29] explored an architecture of the cloud-edge interplay workshop and proposed a blockchain-based data interactive approach to form the peer-to-peer data exchange mechanism between digital twin-based manufacturing systems. Wang et al. [30] presented a real-time digital twin flexible job shop scheduling method with edge computing and an improved Hungarian algorithm. Wang et al. [31] proposed a knowledge graph-based multi-domain model integration method for DTS. Bellavista et al. [32] proposed the application-driven digital twin networking middleware, which can simplify the interaction among heterogeneous devices and dynamically manage network resources in edge industrial environments. Vyskocil et al. [33] explicated an architecture of a distributed manufacturing execution system that is capable of autonomously composing, verifying, interpreting, and executing production plans using digital twins and symbolic planning methods. Liu et al. [34] proposed a novel DT-enabled collaborative data management framework for metal additive manufacturing systems, where a cloud DT communicates with distributed edge DTs in different product lifecycle stages.

Research Gaps
Manufacturing platforms have changed from a localized and centralized (private) mode to a globalized and decentralized (public) mode [16]. The summary of the above research is presented in Table 1. Many of the prior research papers look to resource allocation as an optimization problem. There is less research on the collaborative relationship between manufacturing participants, the dynamic manufacturing resource scheduling decision, and the utilization of complex information data in this process. There are three major research gaps: (1) To adapt to dynamic manufacturing processes, solving resource allocation problems in DM needs to ensure real-time interaction between consumers and key geographically dispersed facilities (providers), especially in the typical form of distributed manufacturing-cloud manufacturing. Manufacturing processes are different from computing processes, and many machining resource capabilities cannot be fully encapsulated as digitized, fully automated manufacturing services. Manufacturing services like remote and transparent computing services are not suitable for all machining tasks. (2) In terms of data transmission, although cloud manufacturing provides an environment for remote resource sharing, there is a lack of real-time and efficient transmission mechanisms for twin data in DTS. The conventional centralized cloud computingbased IoT solutions always lead to a heavy burden on the network bandwidth due to the large amount of sensor data collected frequently that have to be transmitted to the central server and this leads to poor response time for the distributed manufacturing system [21]. Twin data require not only high real-time requirements but also the integration of various factors' data in the shop-floor, as well as the fusion of physical and virtual space data. Therefore, if all manufacturing resources are interconnected and interact through digital twin in a distributed manufacturing platform, there will be a problem of bandwidth competition and severe delay through cloud computing. (3) In terms of resource allocation, previous research always assumed that the resource allocation systems have all the permissions for manufacturing data, including historical and real-time data of resources (even factory data or shop-floor data). This situation may be possible among shop-floors under the same group, but it is not realistic under different groups. This is because production big data are an important asset and sensitive data of the factory. Although the blockchain technology can ensure the reliability and security of data sharing, one key and difficult point for resource allocation in DM is how to integrate data and when and with whom to share data in order to achieve seamless information flow and decision coordination [35].
The main contribution of this paper is to propose D2TS, which adapts to distributed manufacturing by connecting geographically dispersed DTSs through cloud computing and fog computing technologies to form a self-aware, self-adaptive collaborative network. Fog computing adds storage-enabled servers between the edge layer and the cloud layer to process sensitive data that are not easy to upload to the cloud computing center. Non-critical equipment digital twins use loose links, while critical equipment digital twins use real-time links. The distributed manufacturing collaborative network should allow interoperability between distributed business applications and human operators, so it is necessary to capture complex dynamic situations in the production process in real time and use data for production monitoring, process control, and optimization. This research, combined with cloud-edge technology, can fulfil the scalability of the distributed manufacturing collaborative network and is suitable for distributed manufacturing applications.

Information Architecture for D2TS
To support distributed manufacturing engineering applications, this paper proposes an information architecture for D2TS based on cloud and fog computing, which mainly includes three layers: resource layer, cloud-fog layer, and application layer, as shown in Figure 1.
Resource Layer: It mainly includes physical manufacturing resources such as equipment, personnel, materials, software, and processes used for product design, machining, and production management. These resources can be either fixed or mobile, hardware or software, and can be operated either in real time or offline. This is the fundamental reason why distributed manufacturing is much more complex and difficult than cloud and fog computing. Manufacturing resources are usually distributed in multiple DTSs located in different geographical locations, but they form thousands of edge nodes through the Industrial Internet of Things (IIoT). They are physical entities of digital twins (including cloud digital twin, edge digital twin) in the application layer, and they are also objects for optimized resource allocation based on digital twin.
Cloud-Fog Layer: It includes cloud nodes and fog nodes. Cloud nodes are composed of high-performance server clusters with powerful computing and storage capabilities, responsible for global resource optimization allocation, processing tasks with high computational complexity and low time sensitivity and big data tasks. Fog nodes include broker node (BN), computing node (CN), and repository node (RN). It should be noted that fog nodes can be customized and constructed according to the scale of manufacturing tasks. BN supports the background (backend) processing of all resource application programs under the fog nodes, such as monitoring the running status of edge nodes' resources (resource running status, resource consumption, service time, etc.). When necessary, they can communicate and interact with other fog nodes or cloud centers on behalf of the fog node. CN is used to process the computing tasks within the fog node, accessed through BN, and collaborate with computing nodes in the fog network to greatly reduce the processing delay of tasks in distributed manufacturing. Based on security policies, not all BNs can accept access requests from other fog nodes. RNs are mainly distributed databases that provide sharing, replication, recovery, and secure storage of data for edge nodes and the fog node; they provide real-time access and analysis of historical data interfaces for local edge nodes and other fog nodes.
Application Layer: It mainly consists of a digital twin-based intelligent manufacturing platform (IMP) that is oriented towards both resource providers and resource consumers. Resource providers are owners of the resources in the resource layer, while resource consumers are the ones who submit production and processing tasks. IMP is the manager responsible for optimizing and configuring the manufacturing resources in D2TS. Digital twin is the bridge among providers, consumers, and IMP. Digital twin in D2TS is divided into two different levels: edge digital twin and cloud digital twin, which are deployed in fog nodes and cloud nodes, respectively. The cloud digital twin is used for global optimization in IMP (e.g., resource allocation in Section 3), while the edge digital twin is used for local simulation optimization and real-time monitoring of resources (e.g., equipment failure prediction). The cloud digital twin is a lightweight and data-simplified version of the edge digital twin and does not require separate development, making DTS easy to plug and play into IMP. Cloud-Fog Layer: It includes cloud nodes and fog nodes. Cloud nodes are composed of high-performance server clusters with powerful computing and storage capabilities, responsible for global resource optimization allocation, processing tasks with high computational complexity and low time sensitivity and big data tasks. Fog nodes include bro-

Resource Allocation Mechanism for D2TS
With the support of the above information architecture, this section designs a resource allocation mechanism for D2TS. The mechanism mainly involves the cloud computing space (CCS), fog computing space (FCS), and physical resource space (PRS). Data transmission between the three spaces is achieved through IIoT, including industrial fieldbus, industrial Ethernet, Ethernet, fiber optics, time-sensitive networking (TSN), wireless networks (e.g., Zigbee, WIAPA, Wireless HART, ISAI 00.11a, NB-IoT, 5G, 6G), IPv6, etc. Refer to Figure 2 for details, and the UML sequence diagram is shown in Figure 3.
(e.g., equipment failure prediction). The cloud digital twin is a lightweight and data-simplified version of the edge digital twin and does not require separate development, making DTS easy to plug and play into IMP.

Resource Allocation Mechanism for D2TS
With the support of the above information architecture, this section designs a resource allocation mechanism for D2TS. The mechanism mainly involves the cloud computing space (CCS), fog computing space (FCS), and physical resource space (PRS). Data transmission between the three spaces is achieved through IIoT, including industrial fieldbus, industrial Ethernet, Ethernet, fiber optics, time-sensitive networking (TSN), wireless networks (e.g., Zigbee, WIAPA, Wireless HART, ISAI 00.11a, NB-IoT, 5G, 6G), IPv6, etc. Refer to Figure 2 for details, and the UML sequence diagram is shown in Figure  3.   The CCS consists of three parts: cloud digital twin function area (CDTFA), cloud data management function area (CDMFA), and resource optimization allocation function area (ROAFA).
(1) CDTFA: Its main function is to link the corresponding edge digital twin at a customized frequency, in order to obtain the status information of physical resources or production progress information, and upload relevant important data to the cloud The CCS consists of three parts: cloud digital twin function area (CDTFA), cloud data management function area (CDMFA), and resource optimization allocation function area (ROAFA).
(1) CDTFA: Its main function is to link the corresponding edge digital twin at a customized frequency, in order to obtain the status information of physical resources or production progress information, and upload relevant important data to the cloud database. The cloud digital twin is deployed in the CCS, which is a simplified and lightweight version of the edge digital twin. It is an image of the manufacturing resources that are not fully informed and does not have the ability to control physical manufacturing resources. Its main function is to provide cloud platforms with resource search, matching, scheduling, billing, credit, big data, and other services. (2) CDMFA: It includes both the cloud database and cloud knowledge base [36]. This implementation involves partitioning selection, storage, cataloging, and indexing of massive industrial data. With the help of distributed processing architectures, it meets the batch processing requirements of the CDTFA's massive data and the ROAFA's demand for predictive models, intelligent algorithms, process planning, etc., as well as the demand for non-real-time or historical data such as resource trading, credit, quality, cost, and status. The raw data obtained by the cloud digital twin are cleaned to provide high-quality data sources for subsequent storage, management, and analysis. (3) ROAFA includes some multi-agent modules, such as resource management agent (REMA), task management agent (TAMA), trading management agent (TRMA), working hours estimation agent (WHEA), job scheduling optimization agent (JSOA), etc.
• REMA: It is responsible for providing an entry point for producers to configure the cloud digital twin of manufacturing resources, such as publishing the manufacturing resources they own through semantic description and encapsulation. • TAMA: It is responsible for the development and modification of process regulations based on cloud computer-aided process planning, as well as the decomposition and combination of complex machining tasks before task execution. During task execution, it provides real-time production monitoring (such as quality) and non-real-time monitoring (such as production progress). • WHEA: It is responsible for receiving requests from TRMA, predicting the required working hours based on a back propagation neural network (BPNN) model (obtained from the cloud knowledge base), and submitting the results to the JSOA for scheduling optimization. • JSOA: It is responsible for receiving requests from TAMA. Based on the optimization goals set by the consumers, it calls on the historical transaction data and intelligent optimization algorithms in the cloud database and cloud knowledge base. • TRMA: It is responsible for resource searching and matching based on the basic task list provided by TAMA before task execution, as well as signing blockchain cooperation agreements. In case of resource failure during task execution, TRMA transfers the processing information to the cloud digital twin node of the replacement resource. After task execution, TRMA settles the order amount with the cloud digital twin that executed the task.
FCS contains a large number and diverse types of edge digital twins of resources that are distributed in different locations. These edge digital twins are located close to the physical manufacturing resources and provide a complete, real-time, digital mirror image of the resources. They can not only perceive information in real time from the physical manufacturing resources but also control the corresponding physical manufacturing resources accurately after simulation, prediction, and optimization analysis. In the physical space, various manufacturing resources are sensed in real time through data acquisition devices such as sensors and servo drivers and precisely controlled through micro industry controllers such as PLCs, DCSs, and FCSs.

Problem Formulation
Suppose a factory receives a small batch of orders with multiple varieties {J 1 , J 2 , . . . . . . } but the products in these orders are new prototypes. The factory already owns most of the production equipment but lacks some key processing equipment and cannot complete all processing steps by itself. The factory intends to employ some key processing equipment from other factories through the proposed D2TS method, which is a typical resource alloca-tion problem in the field of distributed manufacturing. This paper will attempt to address the following two issues of resource allocation for D2TS: first, how to estimate the working hours of each operation on a candidate resource for scheduling; second, how to select the appropriate manufacturing resource to complete each operation and determine the order of operations to be executed on this resource.

Resource Allocation Route
Generally, before processing this batch of orders, the process engineer will develop corresponding process routes which serve as the basis for quality inspection, cost accounting, production planning, worker operations, and production preparation (such as procurement or manufacturing of raw materials, purchase or modification of equipment) during the production process. However, such process routes are not suitable for resource allocation in D2TS, such as when certain continuous processes can be completed by the same equipment. For example, CNC machining centers can perform multiple operations, such as turning, milling, and drilling. Therefore, multiple operations O 12 , O 13 , O 14 , O 15 can be combined into one operation O 12 (as shown in Figure 4a). In addition, due to the non-uniqueness of process routes, an operation can also be divided into multiple operations according to actual needs. a typical resource allocation problem in the field of distributed manufacturing. This paper will attempt to address the following two issues of resource allocation for D2TS: first, how to estimate the working hours of each operation on a candidate resource for scheduling; second, how to select the appropriate manufacturing resource to complete each operation and determine the order of operations to be executed on this resource.

Resource Allocation Route
Generally, before processing this batch of orders, the process engineer will develop corresponding process routes ( ) (  )        11  12  13  14  15  16  21  22  23 , , , , , , , , , as the basis for quality inspection, cost accounting, production planning, worker operations, and production preparation (such as procurement or manufacturing of raw materials, purchase or modification of equipment) during the production process. However, such process routes are not suitable for resource allocation in D2TS, such as when certain continuous processes can be completed by the same equipment. For example, CNC machining centers can perform multiple operations, such as turning, milling, and drilling. Therefore, multiple operations  Figure 4a). In addition, due to the non-uniqueness of process routes, an operation can also be divided into multiple operations according to actual needs. For example, an operation 22 O can be divided into two operations 22 23 , OO , as shown in Figure 4b. In this paper, these modified routes are referred to as resource allocation routes. For each operation in the resource allocation route, the TAMA searches and matches cloud digital twins of manufacturing resources and identifies candidate manufacturing resources for each operation, as shown in Figure 4c. It should be noted that each operation may have multiple candidate manufacturing resources that can be used. For example, lathes located in City_A and City_B can both complete turning parts' rough castings with a diameter within 20CM.

Mathematical Modeling
Without loss of generality, the following assumptions are made for the resource allocation problem in D2TS: (1) When the cloud digital twin corresponding to the physical manufacturing resource is in a state of failure, it cannot be used as a candidate resource. When the current In this paper, these modified routes are referred to as resource allocation routes. For each operation in the resource allocation route, the TAMA searches and matches cloud digital twins of manufacturing resources and identifies candidate manufacturing resources for each operation, as shown in Figure 4c. It should be noted that each operation may have multiple candidate manufacturing resources that can be used. For example, lathes located in City_A and City_B can both complete turning parts' rough castings with a diameter within 20CM.

Mathematical Modeling
Without loss of generality, the following assumptions are made for the resource allocation problem in D2TS: (1) When the cloud digital twin corresponding to the physical manufacturing resource is in a state of failure, it cannot be used as a candidate resource. When the current state is reservation or working, it can be used as a candidate resource, but it is necessary to further obtain the available time slot in real time.
(2) All operations for all tasks are assumed to be serial. This is because in actual production, parallel and reentrant operations can be transformed into serial ones, and equivalent processing operations can be performed with job scheduling and mathematical modeling. (3) Each machine can only process one workpiece at a time, and phenomena such as equipment abnormalities, defective products during processing, and material shortages are not considered. (4) Processing time, preparation time, and transportation time may vary depending on the resources used. If two adjacent operations use the same equipment, the preparation time and transportation time are assumed to be zero. (5) Transportation time between different resources is considered on a per-workpiece (per-processing task) basis.
For convenience of description, the following symbols are defined in Table 2. Objectives: Subject to: Formula (1) represents the scheduling optimization objective of minimizing the completion time of all jobs; Formula (2) represents the scheduling optimization objective of minimizing the setup time and processing time; Formula (3) represents the scheduling optimization objective of minimizing the logistics time between process transitions; Formula (4) represents that the process scheduling needs to include setup time and processing time; Formula (5) represents that the process scheduling needs to include transportation time; Formula (6) represents that each process can only use one manufacturing resource at a time; and Formula (7) represents that each manufacturing resource cannot complete multiple operations at the same time.  The k-th type of time required for operation O i,j to be completed using manufacturing resource M r , when k = 1 it represents preparation time, and when k = 2 it represents processing time

Working Hours Estimation Based on BPNN
There are many factors that affect working hours, and the relationships between these factors are complex. Working hours estimation is a typical highly non-linear problem. The back propagation neural network (BPNN) can adjust structural parameters based on sample characteristics, demonstrating strong adaptability. In conjunction with the resource allocation mechanism for D2TS, this section proposes a working hours estimation method based on BPNN (as shown in Figure 5). The specific steps are as follows: Step 1: First, determine the feature factors that affect working hours, then obtain the actual production data of historical tasks from the cloud digital twin as input samples for the BPNN. The samples are divided into training, validation, and testing samples at a certain proportion, and the working hours prediction model is trained in the cloud computing center. If there is no corresponding cloud digital twin for the resources, the sample data will be requested from the edge digital twin based on the "task-resource" pairs provided by the TRMA, and the model is trained in the fog node. Step 1: First, determine the feature factors that affect working hours, then obtain the actual production data of historical tasks from the cloud digital twin as input samples for the BPNN. The samples are divided into training, validation, and testing samples at a certain proportion, and the working hours prediction model is trained in the cloud computing center. If there is no corresponding cloud digital twin for the resources, the sample data will be requested from the edge digital twin based on the "task-resource" pairs provided by the TRMA, and the model is trained in the fog node.
Step 2: Due to the existence of noise and singularity in the digital twin data, it is necessary to first clean and organize the data. Then, linear normalization is performed on the input and output variables, transforming them into values within the range of [0, 1] or [−1, 1] to meet the requirements of the network for input and output and to avoid saturation of neurons.
Step 3: Determine the topology of the BPNN, including the number of hidden layers and the number of nodes (neurons) in each hidden layer. This can be carried out using various methods, such as Kolmogorov's theorem or empirical formulas.
Step 4: Set the parameters of the BPNN, including initial weights, initial thresholds, learning rate, momentum factor, target error, and maximum number of training epochs, performance function, transferring function, training function, learning function.
Step 5: Input each training sample into the BPNN and modify the network's weights and thresholds through learning.
Step 6: Determine whether the performance function has reached the preset target error or the maximum number of training epochs has been reached. If not, return to Step 5 and enter the next round of training. If so, end the algorithm and output the prediction model.
Step 7: If the sample data are trained by the cloud digital twin, the trained model will be uploaded to the cloud knowledge base by the cloud digital twin. If the sample data are trained by the edge digital twin and authorized by the resource provider, the model will be uploaded to the cloud knowledge base through the REMA, and the provider will obtain the corresponding revenue.
Step 8: Based on the factors that affect working hours, the basic information of the candidate resource set and processing tasks will be input into the trained prediction model. After obtaining the output data of the neural network, inverse normalization will be performed to obtain the final working hours.

Job Scheduling Based on IGA
Most scheduling research focuses on the processing time of jobs, without taking into account the preparation time and transportation time required between distributed digital twin shop-floors to complete the jobs. Based on the previous research [37], this paper proposes a scheduling method using an improved genetic algorithm (IGA), as shown in Figure 6. The specific steps are as follows: Step 1: Prepare the basic data of job scheduling. The complex machining jobs will be decomposed into basic operations by TAMA, that is, resource allocation routes. According to these basic operations, the candidate manufacturing resources capable of completing the machining operations will be searched and matched by the TRMA. The WHEA provides the working hours required to complete the operations, including processing time, preparation time, and transportation time.
Step 2: Prepare the mathematical model and the encoding method for the genetic algorithm. Based on the basic data provided in Step 1 and the method described in Section 5.3, a mathematical model for the optimization problem will be established, employing three scheduling optimization objectives f 1 , f 2 , f 3 . This paper adopts an integer encoding method, dividing the chromosomes into two parts: the machine selection part and the process sorting part.
Step 3: Initialize the population. To ensure the quality of individuals in the initial population, three initialization methods are used to generate the initial population P(t), where P represents the population size and t represents the current generation, with t = 0 for the initial population.
Step 4: Evaluate the population. Combined with the basic data provided in Step 1, it is decoded using certain methods to calculate the objective functions of each individual in the population P(t). Then, the three objective functions are normalized, summed up, and converted into a fitness value F.
Step 5: Check if the algorithm has reached the stopping criterion. The termination criterion is reaching the maximum number of iterations in this paper.
Step 6: Selection operation. This paper adopts the tournament selection method, because compared with other methods (such as roulette wheel selection and random selection), this method has a better balance between convergence and computational efficiency.
Step 7: Crossover operation. The artificial pairing mechanism proposed in the previous research [37] is adopted, and a multi-point crossover operation is used for the machine selection part, while a preserving order-based crossover is used for the job sorting part.
Step 8: Mutation operation. Roulette wheel selection is used for the machine selection part, and adaptive neighborhood search is used for the job sorting part.
Step 9: Greedy operation. Then, multiple rules are used for repair, such as shortest processing time (SPT), earliest start (ES), earliest finish (EF), least utilized machine (LUM), minimum idle time (MIT), and minimum gap per job (MGJ), and finally the optimal individual is retained in the repaired population.
Step 10: Elite operation. Record and preserve individuals in the population that are not dominated, in order to avoid losing potentially better individuals during the previous operations.  Figure 6. Job scheduling method based on IGA.

Cases Study
The casing is an important supporting and load-bearing component in aviation engines, which has typical features of complex shape, thin wall, difficult-to-process materials, high material removal rate, and high dimensional accuracy. The quality of its pro-

Cases Study
The casing is an important supporting and load-bearing component in aviation engines, which has typical features of complex shape, thin wall, difficult-to-process materials, high material removal rate, and high dimensional accuracy. The quality of its processing has an important impact on improving the overall performance of the engine. With the continuous improvement of the design structure and performance of aviation engines, there are more and more types of casings, and the processing difficulty is increasing. It requires a large number of ordinary machining equipment such as lathes, boring machines, and milling machines, as well as special processing equipment such as high-performance multi-axis CNC machining centers and high-pressure vacuum electron beam welding equipment. Against the background of DM, the production of aviation engine components adopts a distributed manufacturing model, fully utilizing the resource collaboration and processing of various small and medium-sized enterprise factories.

Case of Working Hours Estimation
This section takes the welding process of the inlet casing assembly of an aircraft engine as an example to verify the effectiveness and feasibility of the working hours estimation method described in Section 5.4. The inlet casing consists of several components, including the inner casing, support plate, outer casing, and support plate head, and is made of TC4 titanium alloy. The components are connected using high-energy electron beam welding, as shown in Figure 7. Due to the rarity of high-pressure vacuum electron beam welding equipment, consumers need to find welding equipment capable of completing this process on the cloud platform. Four factors related to working hours, including support plate thickness, welding rod diameter, weld thickness, and weld length, are selected as input features based on the processing characteristics of the component. By querying historical transaction data, 29 sets of raw data for this resource are available from the cloud digital twin, as shown in Table A1. That is, there are 29 samples in total. Columns 2 to 5 of the table represent the input factors of the training or testing samples, and the output factor is the total labor hours. Nineteen randomly selected sets are used as training data to train the BP neural network model, and the remaining ten sets are used as testing data to evaluate the effectiveness of the BP neural network model. The Matlab software (version: R2019b) is used to build the BPNN model for simulation experiments. this process on the cloud platform. Four factors related to working hours, including support plate thickness, welding rod diameter, weld thickness, and weld length, are selected as input features based on the processing characteristics of the component. By querying historical transaction data, 29 sets of raw data for this resource are available from the cloud digital twin, as shown in Table A1. That is, there are 29 samples in total. Columns 2 to 5 of the table represent the input factors of the training or testing samples, and the output factor is the total labor hours. Nineteen randomly selected sets are used as training data to train the BP neural network model, and the remaining ten sets are used as testing data to evaluate the effectiveness of the BP neural network model. The Matlab software (version: R2019b) is used to build the BPNN model for simulation experiments. Due to Robert Hecht-Nielsen's proof that any continuous function on a closed interval can be approximated by a BP network with a single hidden layer, the number of hidden layers for this network model is determined to be 1. The number of hidden nodes is determined based on Kolmogorov's theorem and empirical formulas based on the least squares method: Empirical formula based on the least squares method: ( ) The normalization formula is x = 2(x−x min ) x max −x min − 1, where x is the sample data of the factor influencing working hours, x is the normalized data, x max and x min are the maximum and minimum values in the sample data.
Due to Robert Hecht-Nielsen's proof that any continuous function on a closed interval can be approximated by a BP network with a single hidden layer, the number of hidden layers for this network model is determined to be 1. The number of hidden nodes is determined based on Kolmogorov's theorem and empirical formulas based on the least squares method: Empirical formula based on the least squares method: h = 0.43mn + 2.54m + 0.77n + 0.35 + 0.12n 2 1/2 + 0.5 Kolmogorov's theorem: In the above formulas, h represents the number of hidden nodes and m and n represent the number of input layer nodes and output layer nodes, respectively. In this case, m = 4 and n = 1, so according to the above formulas, the number of hidden nodes is 4 or 9. In this experiment, positive integers in the interval [3,10] are chosen as the number of hidden nodes.
In this experiment, the training function is "Trainlm", the learning function is "Learngdm", the transferring function between the input layer and the hidden layer is "Tansig", the transferring function between the hidden layer and the output layer is "Purelin", the maximum number of training epochs is 3000, the target error is 1.0 × 10 −6 , and the learning rate is set to 0.1, 0.5, and 0.9. To eliminate the influence of randomness of the BPNN model, each parameter configuration was tested 10 times to obtain the average value, as shown in Table 3. Nine sets of test samples were input into the network for calculation, and the results are shown in Table 4. It can be seen that when the number of hidden nodes is 3, the average error between the calculated results and the actual processing time is within 10%, indicating good calculation performance. The optimal result was found when the number of hidden nodes is 3 and the learning rate is 0.1, with an average error of 3.57%. A line chart was generated to more intuitively show the comparison between the calculated values and the actual values, as shown in Figure 8, which verifies the effectiveness of the proposed method for estimating working hours.   Figure 8. The curve graph of the average optimal results.

Case of Job Scheduling
In this section, the effectiveness and feasibility of the job scheduling method fo described in Section 5.5 are verified using the machining tasks of multi-model airc gine casings as an example. The casing is the base of the entire engine and is dist throughout various parts of the engine. It is equipped with a spindle, blades, and connecting accessories. For example, in a turbofan engine, the casing can be divid an intake casing, a fan casing, an intermediate casing, a compressor casing, a com chamber casing, a turbine casing, a bearing casing, a central transmission casing,  Tables A2 and A3. The parameters required for the proposed IGA are shown in Table 5. The pr IGA in Section 5.5 was implemented using Matlab software (Version: R2019b) and on a personal computer (CPU: 3.6GHz, RAM: 8 GB). To eliminate the randomnes IGA, it was run ten times and the best result was selected.

Case of Job Scheduling
In this section, the effectiveness and feasibility of the job scheduling method for D2TS described in Section 5.5 are verified using the machining tasks of multi-model aircraft engine casings as an example. The casing is the base of the entire engine and is distributed throughout various parts of the engine. It is equipped with a spindle, blades, and various connecting accessories. For example, in a turbofan engine, the casing can be divided into an intake casing, a fan casing, an intermediate casing,  Tables A2 and A3. The parameters required for the proposed IGA are shown in Table 5. The proposed IGA in Section 5.5 was implemented using Matlab software (Version: R2019b) and tested on a personal computer (CPU: 3.6GHz, RAM: 8 GB). To eliminate the randomness of the IGA, it was run ten times and the best result was selected. For the scheduling problem described in this paper, the proposed algorithm found 14 non-dominated solutions, as shown in Table 6. "Makespan" represents the production order completion cycle, "setup time" indicates the preparation time required when switching processing equipment, and "transportation time" denotes the logistics transportation time between geographically distributed devices. From Table 6, it can be observed that as transportation time increases, makespan gradually decreases, indicating that fully utilizing the distributed digital twin manufacturing approach proposed in this paper can shorten the production cycle and improve production efficiency. The variation in setup time is not significant because regardless of whether distributed manufacturing is adopted or not, this preparation time needs to be added whenever processing equipment is changed. A Gantt chart is drawn for Solution 3, which has the smallest makespan compared with all solutions and the least transportation time compared with Solutions 1 and 2, as shown in Figure 9. In Solution 14, although the transportation time is minimized, the makespan and setup time are maximized. This is because the production tasks are concentrated on a few pieces of processing equipment, leading to longer waiting times at individual bottleneck devices. Additionally, frequent switching of processing equipment significantly increases the preparation time before actual processing begins.    This paper compares the proposed IGA with three other GA-related improved algorithms, namely Elitism GA (ELGA) [38], Enhanced GA (ENGA) [39], and MOGWO [40]. Four metrics are used to evaluate the optimization capabilities of the four algorithms. "NNS" represents the number of non-dominant solutions obtained by each algorithm, "BMS" denotes the best makespan among all solutions, "BST" denotes the sum of the shortest setup time among all solutions, and "BTT" denotes the sum of the shortest transportation time among all solutions. As shown in Table 7, ELGA finds six optimal non-dominant solutions, ENGA finds five non-dominant solutions, MOGWO finds twenty-three optimal solutions, and IGA finds fourteen optimal solutions. It is evident that IGA outperforms ELGA and ENGA. While MOGWO finds the highest number of optimal solutions, IGA excels in finding the best setup time and transportation time among non-dominant solutions, such as the shortest BST and BTT. This indicates that the proposed IGA demonstrates a strong ability to escape local optima and provides more diverse distributed manufacturing solutions with superior optimization results.

Conclusions and Future Work
Motivated by distributed manufacturing and digital twin technologies, a distributed digital twin shop-floor is proposed to achieve dynamic sharing of large-scale manufacturing resources and capabilities. By employing the digital twin shop-floor model, the business can be contracted or expanded according to demand and the company can remain agile in the face of fluctuations. This paper attempts to use digital twin and the BPNN and an improved genetic algorithm to tackle the dynamic resource allocation problem in distributed manufacturing.
The major contributions of this paper are summarized as follows. Firstly, an information architecture of D2TS based on cloud-fog computing is proposed, which mainly includes three layers: the resource layer, the cloud-fog layer, and the application layer. Taking full advantage of the characteristics of easy interconnection and intercommunication of the digital twin shop-floor, geographically dispersed resources are dynamically connected through cloud computing and fog computing technologies to achieve resource sharing. Secondly, a resource allocation mechanism for D2TS is proposed. Based on multi-agent technology, it provides resource search, matching, scheduling, billing, credit, big data, and other functions. The innovation lies in linking the manufacturing platform with cloud digital twins or edge digital twins to save bandwidth resources and achieve reliable dynamic and real-time monitoring of critical resources, while ensuring the security of sensitive resource information. Finally, a combined approach using the BPNN algorithm and improved genetic algorithm is proposed to solve the resource scheduling problem in D2TS. The BPNN algorithm is used to estimate the job working hours, especially for new products or SMEs. The improved genetic algorithm is applied to optimize the scheduling of candidate resources, taking into account factors such as logistics transportation time required for distributed manufacturing. By combining these two algorithms, the utilization and productivity of resources can be effectively improved.
In future research, the optimization objective of scheduling needs to consider manufacturing costs, including machine processing costs, fixture design and manufacturing costs, logistics costs, labor costs, etc. By combining technologies such as digital twins, big data, and blockchain, the credibility of candidate resources in resource allocation and the prediction of equipment resource failures during task execution can be improved to enable preventive scheduling optimization and improve the robustness of scheduling solutions. Combining the multi-attribute decision-making theory, this paper uses the threeway decision method and the improved TOPSIS method will be employed to study the decision-making problem of multiple non-dominated scheduling schemes more suitable for the D2TS environment, in order to improve decision-making efficiency and reduce decision-making costs.