Smart Cyber-Physical Manufacturing: Extended and Real-Time Optimization of Logistics Resources in Matrix Production

: In the context of Industry 4.0, the matrix production concept represents revolutionary solutions from a technological and logistics point of view. In a matrix production system, ﬂexible, conﬁgurable production and assembly cells are arranged in a grid layout, and the in-plant supply is based on autonomous vehicles. Adaptable and ﬂexible material handling solutions are required to perform the dynamically changing supply-demands of standardized and categorized manufacturing and assembly cells. Within the frame of this paper, the authors describe the in-plant supply process of matrix production and the optimization potential in these processes. After a systematic literature review, this paper introduces the structure of matrix production as a cyber-physical system focusing on logistics aspects. A mathematical model of this in-plant supply process is described including extended and real-time optimization from routing, assignment, and scheduling points of view. The optimization problem described in the model is an NP-hard problem. There are no known efﬁcient analytical methods to ﬁnd the best solution for this kind of problem; therefore, we use heuristics to ﬁnd a suitable solution for the above-described problem. Next, a sequential black hole–ﬂoral pollination heuristic algorithm is described. The scenario analysis, which focuses on the clustering and routing aspects of supply demands in a matrix production system, validates the model and evaluates its performance to increase cost-efﬁciency and warrants environmental awareness of the in-plant supply in matrix production.


Introduction
Production companies have to apply the solutions of cyber-physical systems to improve their availability, efficiency, reliability, and productivity. The ever-changing manufacturing industry requires the improvement of these attributes. Statistical surveys suggest that by the end of 2019, about 75% of large manufacturing companies will update their operations with Internet of Things solutions [1] and transform their conventional manufacturing environment to cyber-physical systems. The integration Figure 1. Classification of articles considering subject areas based on a search in Web of Science database using TOPIC: "manufacturing" AND "logistics" AND "optimization".
As Figure 2 demonstrates, the optimization of manufacturing-related logistics systems has been researched in the past 20 years. The first articles in this field were published in 1995 focusing on just-in-time manufacturing [3] and process related simulation [4]. The number of published papers has been increased in the last five years; it shows the importance of this research field. Articles were analyzed from a scientific impact point of view. The most usual form to evaluate articles from the scientific impact point of view is the citation. Figure 3 shows the ten most cited articles with their number of citations.
As Figure 4 demonstrates, most of the articles were published in journals with production and manufacturing topics, but a significant part of the papers was accepted for publication in journals focusing on computation, operation research, and expert systems. The distribution of journals shows that the design and operation problems of logistics systems in production and manufacturing are multidisciplinary problems, where not only technological but also environmental and other aspects must be taken into consideration. Figure 1. Classification of articles considering subject areas based on a search in Web of Science database using TOPIC: "manufacturing" AND "logistics" AND "optimization".
As Figure 2 demonstrates, the optimization of manufacturing-related logistics systems has been researched in the past 20 years. The first articles in this field were published in 1995 focusing on just-in-time manufacturing [3] and process related simulation [4]. The number of published papers has been increased in the last five years; it shows the importance of this research field.

Descriptive Analysis
The reduced articles can be classified depending on the research area. Figure 1 shows the classification of these 370 articles considering ten subject areas. This classification shows that the majority are on engineering while operations research and computer sciences define the importance of computational methods related to the design of manufacturing related logistics systems. Figure 1. Classification of articles considering subject areas based on a search in Web of Science database using TOPIC: "manufacturing" AND "logistics" AND "optimization".
As Figure 2 demonstrates, the optimization of manufacturing-related logistics systems has been researched in the past 20 years. The first articles in this field were published in 1995 focusing on just-in-time manufacturing [3] and process related simulation [4]. The number of published papers has been increased in the last five years; it shows the importance of this research field. Articles were analyzed from a scientific impact point of view. The most usual form to evaluate articles from the scientific impact point of view is the citation. Figure 3 shows the ten most cited articles with their number of citations.
As Figure 4 demonstrates, most of the articles were published in journals with production and manufacturing topics, but a significant part of the papers was accepted for publication in journals focusing on computation, operation research, and expert systems. The distribution of journals shows that the design and operation problems of logistics systems in production and manufacturing are multidisciplinary problems, where not only technological but also environmental and other aspects must be taken into consideration. Articles were analyzed from a scientific impact point of view. The most usual form to evaluate articles from the scientific impact point of view is the citation. Figure 3 shows the ten most cited articles with their number of citations.
As Figure 4 demonstrates, most of the articles were published in journals with production and manufacturing topics, but a significant part of the papers was accepted for publication in journals focusing on computation, operation research, and expert systems. The distribution of journals shows that the design and operation problems of logistics systems in production and manufacturing are multidisciplinary problems, where not only technological but also environmental and other aspects must be taken into consideration.  We have analyzed the published articles from the Web of Science categories point of view. We have analyzed the distribution of articles in the following categories: operations research management science, engineering manufacturing, engineering industrial, computer science interdisciplinary, automation control systems, management, computer science artificial intelligence, engineering multidisciplinary, environmental sciences, engineering chemical, engineering electrical electronic, engineering environmental, green sustainable science, computer science software engineering, engineering mechanical, and mathematics interdisciplinary. The distribution of the categories is depicted in Figure 5. As the categories show, the design of manufacturing related logistics systems is based on optimization methods, and not only cost efficiency but also environmental and technological aspects are important, while automation and the application of smart solutions gain a more prominent role.
In the following step, the 370 articles were reduced after reading them. We excluded articles whose topic did not fit our interest and couldn't address the optimization of manufacturing related logistics systems focusing on in-plant supply. After this reduction, we had 80 articles.  We have analyzed the published articles from the Web of Science categories point of view. We have analyzed the distribution of articles in the following categories: operations research management science, engineering manufacturing, engineering industrial, computer science interdisciplinary, automation control systems, management, computer science artificial intelligence, engineering multidisciplinary, environmental sciences, engineering chemical, engineering electrical electronic, engineering environmental, green sustainable science, computer science software engineering, engineering mechanical, and mathematics interdisciplinary. The distribution of the categories is depicted in Figure 5. As the categories show, the design of manufacturing related logistics systems is based on optimization methods, and not only cost efficiency but also environmental and technological aspects are important, while automation and the application of smart solutions gain a more prominent role.
In the following step, the 370 articles were reduced after reading them. We excluded articles whose topic did not fit our interest and couldn't address the optimization of manufacturing related logistics systems focusing on in-plant supply. After this reduction, we had 80 articles. We have analyzed the published articles from the Web of Science categories point of view. We have analyzed the distribution of articles in the following categories: operations research management science, engineering manufacturing, engineering industrial, computer science interdisciplinary, automation control systems, management, computer science artificial intelligence, engineering multidisciplinary, environmental sciences, engineering chemical, engineering electrical electronic, engineering environmental, green sustainable science, computer science software engineering, engineering mechanical, and mathematics interdisciplinary. The distribution of the categories is depicted in Figure 5. As the categories show, the design of manufacturing related logistics systems is based on optimization methods, and not only cost efficiency but also environmental and technological aspects are important, while automation and the application of smart solutions gain a more prominent role.
In the following step, the 370 articles were reduced after reading them. We excluded articles whose topic did not fit our interest and couldn't address the optimization of manufacturing related logistics systems focusing on in-plant supply. After this reduction, we had 80 articles.

Content Analysis
In the 80s and 90s the so-called CIM addressed the first attempts to define hierarchy structured in smart factories [14]. CIM and FMS was the key topic [15], and things such as dynamic scheduling [16] and reactive MES [17] were invented then. After that, holonic manufacturing [18] and IMS was established.
A Holonic Manufacturing System (HMS) is a manufacturing system where key elements, such as machines, cells, factories, parts, products, operators, teams, etc., are modeled as `holons' having autonomous and cooperative properties. The decentralized information structure, the distributed decision-making authority, the integration of physical and informational aspects, and the cooperative relationship among holons, make the HMS a new paradigm, with great potential for meeting today's agile manufacturing challenges [19]. Information management was a challenge in a virtual enterprise environment characterised by distribution, autonomy and co-operation. Distributed information management architecture was one of the key topics for production planning and control. It provided not only basic services but also advanced services, like notification, security control, subscription, and data sending [20].
Some of the proposed models and concepts are missed, but the ideas still were appointed in sources, for example focusing on the optimization of the accuracy of the wire electro-discharge machining process [21] or the manufacturing of five-axis high speed milling of complex parts [22].
The smart factory is the integration of all recent IoT technological advances in computer networks, data integration, and analytics to bring transparency to all manufacturing factories. The Internet of Everything (IoE) is a concept that extends the Internet of Things (IoT) emphasis on machine-to-machine (M2M) communications to describe a more complex system that also encompasses people and processes. The steps to creating a smart factory are the followings [23]: • data transmission: get data to communicate from robot to machine to person, • connection: get this data to a large capacity IoT server, • big data processing: make the data visible and actionable to people for analysis.
Several new edge computing devices were launched recently. In Japan there is a general movement about first using common sense and later technology. Special processes are those in which more CPS (cyber-physical systems) are in use because models are closely related to machine controls. In EDM and other works about lasers, welding, etc., CPS are spreading. For instance, EDM edge computing is becoming a leading research line [24]. 5G and IoT will be key to enhancing and enabling the advances in manufacturing. 5G networks offer manufacturers and telecom operators

Content Analysis
In the 80s and 90s the so-called CIM addressed the first attempts to define hierarchy structured in smart factories [14]. CIM and FMS was the key topic [15], and things such as dynamic scheduling [16] and reactive MES [17] were invented then. After that, holonic manufacturing [18] and IMS was established.
A Holonic Manufacturing System (HMS) is a manufacturing system where key elements, such as machines, cells, factories, parts, products, operators, teams, etc., are modeled as 'holons' having autonomous and cooperative properties. The decentralized information structure, the distributed decision-making authority, the integration of physical and informational aspects, and the cooperative relationship among holons, make the HMS a new paradigm, with great potential for meeting today's agile manufacturing challenges [19].
Information management was a challenge in a virtual enterprise environment characterised by distribution, autonomy and co-operation. Distributed information management architecture was one of the key topics for production planning and control. It provided not only basic services but also advanced services, like notification, security control, subscription, and data sending [20].
Some of the proposed models and concepts are missed, but the ideas still were appointed in sources, for example focusing on the optimization of the accuracy of the wire electro-discharge machining process [21] or the manufacturing of five-axis high speed milling of complex parts [22].
The smart factory is the integration of all recent IoT technological advances in computer networks, data integration, and analytics to bring transparency to all manufacturing factories. The Internet of Everything (IoE) is a concept that extends the Internet of Things (IoT) emphasis on machine-to-machine (M2M) communications to describe a more complex system that also encompasses people and processes. The steps to creating a smart factory are the followings [23]: • data transmission: get data to communicate from robot to machine to person, • connection: get this data to a large capacity IoT server, • big data processing: make the data visible and actionable to people for analysis.
Several new edge computing devices were launched recently. In Japan there is a general movement about first using common sense and later technology. Special processes are those in which more CPS (cyber-physical systems) are in use because models are closely related to machine controls. In EDM and other works about lasers, welding, etc., CPS are spreading. For instance, EDM edge computing is becoming a leading research line [24]. 5G and IoT will be key to enhancing and enabling the advances in manufacturing. 5G networks offer manufacturers and telecom operators the chance to build smart factories and truly take advantage of technologies such as automation, artificial intelligence, augmented reality for troubleshooting, and the Internet of Things [25].
The research in the field of manufacturing processes indicated a huge number of articles reporting the results of research projects in all fields of engineering and economic sciences. These researches are discussing a wide range of manufacturing solutions, from traditional manufacturing to cyber-physical manufacturing systems [26]. The improvement of 3D printing led to the appearance of a new decision to be made by production companies: how to make components for final products? Products can be produced either with traditional technology or with additive manufacturing. Additive manufacturing has a great impact on related supply chain and logistics solutions; therefore, it is important to put more and more effort into the research of additive manufacturing solutions [27]. Traditional routing, assignment and scheduling models and solutions must be transformed to cyber-physical models, like the transformation of conventional scheduling to 3D printing service scheduling demonstrates [28] in the case of cloud manufacturing, where distributed manufacturing resources are encapsulated into services and aggregated [29]. The additive manufacturing can lead to decentralized, flexible production facilities, where the customer's demands can be produced with low financial risk; they are flexible and can respond rapidly to changes in demand [30]. In hybrid production systems, the manufacturing of new and remanufactured products is integrated. In hybrid production systems, special constraints caused by uncertainties in recycling processes must be taken into consideration [31][32][33].
The literature introduces a wide range of methods used to solve design problems of logistics processes in manufacturing, like integer programming, decision-making methods, heuristic and metaheuristic algorithms, Petri Net simulation, statistical approaches, simulation and simulation-based optimization, fuzzy modelling, and hybrid optimization approach. Linear programming, integer linear programming, and mixed integer linear programming can also be used for the optimization of logistics processes in manufacturing systems. Researchers developed a multi-objective mixed integer linear programming model to generate efficient solutions minimizing cost and assigning more reliable manufacturers in a dynamic manufacturing network [34]. Clustering algorithms, like K-mean, mean-shift, density-based spatial clustering, or agglomerative hierarchical clustering are widely used in the design of complex in-plant supply systems; they can be combined for multi-stage optimization with heuristic and metaheuristic algorithms. The combination of prioritized K-mean and genetic algorithm was used to optimize manufacturing related transportation processes [35]. Heuristic optimization methods are used in the case of NP-hard optimization problems: genetic algorithm was used to increase machine utilization, reduce throughput time and delivery delays [36,37], while discrete particle swarm optimization (PSO) was applied to solve the dynamic travelling salesman problem in chip manufacturing, where machine failure can force changes to the problem specification [38]. A typical application field of PSO is flow shop and job shop manufacturing [39] or the machine loading problem in flexible manufacturing systems, where the feeding process is generally robotized or automatized [40]. Heuristic methods can be used not only for the optimization of processes but also for the allocation of IT structure in the manufacturing process: a fruit fly algorithm was used to find the optimal location of the wireless sensor network in the intelligent workshop [41]. The in-plant supply of manufacturing processes is based on complex material handling systems, which were optimized with a hybrid multi-objective artificial immune systems-based algorithm [42]. Manufacturing processes are typical uncertain environments, where fuzzy modelling and fuzzy optimization offers suitable tools [43,44] and the fuzzy approach can easily integrate with other analytical or heuristic algorithms [45]. Researchers used an integrated data-driven stochastic degradation model to find the optimal maintenance strategy in chemical and manufacturing processes, where unit failures are caused due to equipment degradation [46]. Different types of simulation methods and tools can be used to optimize in-plant and external manufacturing related logistics processes, like discrete event simulation [47], timed Petri net simulation [48], and hybrid simulation integrating discrete and continuous time event simulation [49]. The Petri net modelling, the timed, colored, and fuzzy Petri net approaches are widely spread in the field of simulation of manufacturing related logistics systems [50,51]. Integrated approaches [52], multi-objective optimization problems [53] can be solved with other effective optimization methods, like teaching-learning based optimization [54], force generated graph algorithms [55], agent-based optimization methods [56], or TOPSIS [57]. Figure 6 shows the conceptual framework of the published articles demonstrating the new manufacturing environments, applied methods and tools, typical models, and case studies.
Several scenarios and case studies related to in-plant supply and material handling in manufacturing were assessed and evaluated to compare the effects of technology, logistics, human resources, and policies on the efficiency, reliability, and availability of value making. The case studies of manufacturing design are generally focusing on traditional manufacturing environment, and only a few of them are discussing the cyber-physical systems. The most important fields of case studies are from the automotive industry [58,59], but valuable case studies were published in the field of aircraft final assembly [60], in-mold decoration manufacturing [61], timber industry [62], semiconductor manufacturing [63,64], food manufacturing [65], and injection molding [66].
The objective functions and constraints of design and operation of in-plant supply systems of manufacturing processes include a wide range of economical, technical-technological, ecological, and logistic aspects. Green in-plant supply problems are represented by carbon cap constrained manufacturing system, where green solutions can support sustainability [67]. The financial aspects of manufacturing supply are analyzed from price [68,69], operational costs [70], and profit [71] points of view. Responsiveness, robustness, and resilience (known as "Triple R") become more and more important in logistics and material handling [72] because customer satisfaction is based on "Triple R"-based performance of manufacturing and related logistics operations [73]. The objective functions and constraints are based on the problems of typical material handling related problems, like facility location [74], allocation [75], lot sizing [76][77][78], shortage planning [79], scheduling [80], inventory planning [81], and ergonomic [82] and trade policy aspects [83].
Appl. Sci. 2019, 9, x FOR PEER REVIEW 7 of 33 Integrated approaches [52], multi-objective optimization problems [53] can be solved with other effective optimization methods, like teaching-learning based optimization [54], force generated graph algorithms [55], agent-based optimization methods [56], or TOPSIS [57]. Figure 6 shows the conceptual framework of the published articles demonstrating the new manufacturing environments, applied methods and tools, typical models, and case studies. Several scenarios and case studies related to in-plant supply and material handling in manufacturing were assessed and evaluated to compare the effects of technology, logistics, human resources, and policies on the efficiency, reliability, and availability of value making. The case studies of manufacturing design are generally focusing on traditional manufacturing environment, and only a few of them are discussing the cyber-physical systems. The most important fields of case studies are from the automotive industry [58,59], but valuable case studies were published in the field of aircraft final assembly [60], in-mold decoration manufacturing [61], timber industry [62], semiconductor manufacturing [63,64], food manufacturing [65], and injection molding [66].
The objective functions and constraints of design and operation of in-plant supply systems of manufacturing processes include a wide range of economical, technical-technological, ecological, and logistic aspects. Green in-plant supply problems are represented by carbon cap constrained manufacturing system, where green solutions can support sustainability [67]. The financial aspects of manufacturing supply are analyzed from price [68,69], operational costs [70], and profit [71] points of view. Responsiveness, robustness, and resilience (known as "Triple R") become more and more important in logistics and material handling [72] because customer satisfaction is based on "Triple R"-based performance of manufacturing and related logistics operations [73]. The objective functions and constraints are based on the problems of typical material handling related problems, like facility location [74], allocation [75], lot sizing [76][77][78], shortage planning [79], scheduling [80], inventory planning [81], and ergonomic [82] and trade policy aspects [83].

Consequences of Literature Review
More than 50% of the articles were published in the last four years. This result indicates the scientific potential of the design of in-plant supply solutions for manufacturing systems. The articles that addressed the optimization of in-plant supply and material handling solutions are focusing on a

Consequences of Literature Review
More than 50% of the articles were published in the last four years. This result indicates the scientific potential of the design of in-plant supply solutions for manufacturing systems. The articles that addressed the optimization of in-plant supply and material handling solutions are focusing on a conventional manufacturing environment and only a few of them describe the design aspects of in-plant logistics solutions in cyber-physical environment. Therefore, this research topic still needs more attention and research. It was found that mathematical models and algorithms are important tools for the design and control of in-plant supply solutions since a wide range of models determines complex optimization problems. According to that, the main focus of this research is the modelling and optimization of in-plant supply focusing on extended and real-time logistics resource optimization from assignment, clustering, and scheduling points of view.
As a consequence, the main contributions of this article are the followings: (1) model framework of cyber-physical in-plant supply in matrix production; (2) mathematical description of in-plant supply of standardized, categorized manufacturing and assembly cells of the production matrix; (3) computational method to solve clustering, assignment, and scheduling of logistics resources; (4) computational results of the described model with various datasets and scenarios focusing on environmental impacts and reduction of GHG emission.

Methodology-Mathematical Modelling and Heuristic Optimization Method
As the KUKA matrix production paradigm defines, in-plant supply, and manufacturing processes are separated from each other, and the logistics system with variable accessories and tools of autonomous material handling and transportation machines (autonomous guided vehicles) is always able to supply all matrix cells [2]. Figure 7 demonstrates the model of a matrix production system focusing on real-time resource optimization.
The physical processes in matrix production include logistics (material handling, transportation and warehousing), assembly, manufacturing, processing and quality control. The physical process is transformed into a virtual system called digital twin, which can include digital aggregate, digital instance, and digital prototypes. The transformation is based on sensors, which collect data on resources, components, tools, and their environment. Machines, tools, products, and other logistics resources are connected with the digital twin through a sensor network. The extended and real-time optimization of supply-demands is supervised by the ERP, while forecasting and testing are performed in a digital twin environment.
In our in-plant supply chain model, there are two different types of deliveries to be performed. The first types are supply-demands, which are available from the ERP and they can be scheduled and assigned for a predefined time window. The second type of supply-demands must be scheduled and assigned in real-time which means that the scheduled routes must be changed so that the scheduled supply-demands will arrive within the time frame to the matrix cell. The in-plant supply model of matrix production includes m matrix cells (standardized production of assembly cells), α jobs and β time frame for scheduling of in-plant supply routes. The components and the tools are stored in specific stores (components warehouse and tool storage) and they are transported with AGV parking in an AGV-pool [2]. This in-plant supply model can be divided into two main parts: the first part is the extended scheduling based on ERP data, while the second part, the real-time scheduling, is based on information from the cyber-physical environment (intelligent tools, cooperative standardized assembly and manufacturing cells). The following decisions must be made: (a) clustering of available supply-demands; (b) routing and scheduling of clustered supply-demands; (c) rescheduling and rerouting of matrix cell's supply in order to insert new supply-demands caused by malfunction of technology and logistics or caused by a new customer's order to be fulfilled. The decision variable of the clustering problem is the assignment matrix which defines the assignment of supply-demands and supply routes. The decision variable of extended routing and scheduling problem is another assignment matrix, which defines the sequence of supply. In the case of the real-time rerouting and rescheduling, we also use an assignment matrix, in which some positions of sequences are changed to insert new supply-demand into the scheduled supply ( Figure 8).
computational results of the described model with various datasets and scenarios focusing on environmental impacts and reduction of GHG emission.

Methodology-Mathematical Modelling and Heuristic Optimization Method
As the KUKA matrix production paradigm defines, in-plant supply, and manufacturing processes are separated from each other, and the logistics system with variable accessories and tools of autonomous material handling and transportation machines (autonomous guided vehicles) is always able to supply all matrix cells [2]. Figure 7 demonstrates the model of a matrix production system focusing on real-time resource optimization. The physical processes in matrix production include logistics (material handling, transportation and warehousing), assembly, manufacturing, processing and quality control. The physical process is transformed into a virtual system called digital twin, which can include digital aggregate, digital instance, and digital prototypes. The transformation is based on sensors, which collect data on resources, components, tools, and their environment. Machines, tools, products, and other logistics resources are connected with the digital twin through a sensor network. The extended and real-time optimization of supply-demands is supervised by the ERP, while forecasting and testing are performed in a digital twin environment. In our in-plant supply chain model, there are two different types of deliveries to be performed. The first types are supply-demands, which are available from the ERP and they can be scheduled and assigned for a predefined time window. The second type of supply-demands must be scheduled and assigned in real-time which means that the scheduled routes must be changed so that the scheduled supply-demands will arrive within the time frame to the matrix cell. The in-plant supply model of matrix production includes m matrix cells (standardized production of assembly cells), jobs and time frame for scheduling of in-plant supply routes. The components and the tools are stored in specific stores (components warehouse and tool storage) and they are transported with AGV parking in an AGV-pool [2]. This in-plant supply model can be divided into two main parts: the first part is the extended scheduling based on ERP data, while the second part, the real-time scheduling, is based on information from the cyber-physical environment (intelligent tools, cooperative standardized assembly and manufacturing cells). The following decisions must be made: (a) clustering of available supply-demands; (b) routing and scheduling of clustered supply-demands; (c) rescheduling and rerouting of matrix cell's supply in order to insert new supply-demands caused by malfunction of technology and logistics or caused by a new customer's order to be fulfilled. The decision variable of the clustering problem is the assignment matrix which defines the assignment of supply-demands and supply routes. The decision variable of extended routing and scheduling problem is another assignment matrix, which defines the sequence of supply. In the case of the real-time rerouting and rescheduling, we also use an assignment matrix, in which some positions of sequences are changed to insert new supply-demand into the scheduled supply ( Figure 8). The methodology of our research includes the following main parts: The methodology of our research includes the following main parts: • mathematical modelling of the cyber-physical matrix production system from an extended and real-time optimization point of view, • performance analysis of available heuristic solution algorithm and selection of the suitable algorithms, • application of suitable algorithms to solve the extended and real-time clustering, routing, and assignment problems, • validation of the model and the algorithm with scenario analysis.

Mathematical Modelling of Extended and Real-Time Resource Optimization in Cyber-Physical Matrix Production
Within the frame of this chapter, a two-level mathematical model is discussed including extended and real-time scheduling problems of in-plant supply of matrix production.

Extended Logistics Resource Optimization
The extended optimization of supply resources in matrix production can be divided into two main phases. The first phase is a clustering phase, where the available supply-demands are clustered based on time frame related objective function. The second phase represents a vehicle routing problem, where the clustered supply-demands are scheduled.

Clustering of Supply-Demand
The objective function of the clustering of supply-demands is the minimization of the total time deviance of supply-demands from the average time frame, which can be calculated as the sum of supply-demands assigned to route r in relations warehouse-matrix cell, tool storage-matrix cell and among matrix cells: where TD W is the time deviance of clustered supply-demands from component warehouse to matrix cells, TD T is the time deviance of clustered supply-demands from tool storage to matrix cells, and TD M is the time deviance of clustered supply-demands among matrix cells. The first part of the objective function includes the minimization of time frame deviance from the average time frame between the component warehouse and matrix cells: where, t W iαβ is average time frame of supply-demand from the component warehouse to matrix cell j for job α in time frame β, is the average time frame of route r, x W M iαβr is the assignment matrix of supply-demands from component warehouse to matrix cells. x W M iαβr takes value 1 if the supply-demand from component warehouse to the matrix cell i for job α in time frame β is assigned to route r, otherwise 0.
The second part of the objective function includes the minimization of time frame deviance from the average time frame between tool storage and matrix cells: where, t T iαβ is average time frame of supply-demand from the tool storage to matrix cell j for job α in time frame β, t T r is the average time frame of route r, x TM iαβr is the assignment matrix of supply-demands from component warehouse to matrix cells. x TM iαβr takes value 1 if the supply-demand from the tool storage to the matrix cell i for job α in time frame β is assigned to route r, otherwise 0.
The third part of the objective function includes the minimization of time frame deviance from the average time frame among matrix cells: where t MM ijαβ is average time frame of supply-demand between matrix cell i and matrix cell j for job α in time frame β, t MM r is the average time frame of route r, x MM ijαβr is the assignment matrix of supply-demands between matrix cell i and matrix cell j for job α in time frame β. x MM ijαβr takes value 1 if the supply-demand from matrix cell i to matrix cell j for job α in time frame β is assigned to route r, otherwise 0.
The solutions of the above-described clustering problem are limited by the following two constraints related to time frame and capacity of AGVs: Constraint 1: We can define an upper limit for time frame deviance for each route and it is not permitted to exceed the upper limit of time frame deviance within route r: where t Wmax is the upper limit of time frame deviance for supply-demands from component warehouse to matrix cells, t Tmax is the upper limit of time frame deviance for supply-demands from tool storage to matrix cells, and t MMmax is the upper limit of time frame deviance for supply-demands among matrix cells. Constraint 2: We can define the upper limit of AGVs' loading capacity and it is not permitted to exceed this upper limit after assigning suitable supply-demands from component warehouse to matrix cells, from tool storage to matrix cells and among matrix cells: where λ max is the number of supply-demands assigned to route r, s rλ is the ID of supply-demand assigned as destination λ to route r, p x i and p y i are the x and y coordinates of matrix cell i, and ξ s rλ−1 s rλ it the length of the route between matrix cell λ − 1 and matrix cell λ in route r and e r is the specific energy consumption of AGV used in route r.
The solutions of the above-described routing and scheduling problem are limited by the constraints related to the time frame of arrival times to matrix cells.
Constraint 3: Depending on the velocity of the AGVs we can calculate the travelling time among matrix cells, component warehouse or tool storage and the arrival time can be defined. It is not permitted to exceed the upper and lower limit of time frame for each supply-demand to the matrix cells: where t min rλ * and t max rλ * is the lower and upper limit of the arrival time to the matrix cell assigned as node λ * to the route r and t min rλ * = t min s rλ αβ and t max rλ * = t max s rλ αβ To simplify the representation of different types of supply-demands, we integrate the component warehouse-matrix cells, tool storage-matrix cells, and matrix cell-matrix cell relations into one type of relation and we create a virtual supply-demand matrix as follows:

•
Matrix cell-matrix cell relations are simply added to the virtual demand matrix: • Component warehouse-matrix cell relation is transformed into a matrix cell-matrix cell relation.
The component amount will be added as initial loading to the AGVs loading and a virtual matrix cell-matrix cell relation is added to the virtual supply-demand matrix: • Tool storage-matrix cell relation is transformed into a matrix cell-matrix cell relation. The tool amount will be added as initial loading to the AGVs loading and a virtual matrix cell-matrix cell relation is added to the virtual supply-demand matrix: In the same way, we can create the virtual time frame matrix and assignment matrix: As an example, Figure 9 demonstrates the transformation of assignment matrices to a virtual assignment matrix.
where * and * is the lower and upper limit of the arrival time to the matrix cell assigned as node * to the route r and * = and * = To simplify the representation of different types of supply-demands, we integrate the component warehouse-matrix cells, tool storage-matrix cells, and matrix cell-matrix cell relations into one type of relation and we create a virtual supply-demand matrix as follows: • Matrix cell-matrix cell relations are simply added to the virtual demand matrix: * = (11) • Component warehouse-matrix cell relation is transformed into a matrix cell-matrix cell relation. The component amount will be added as initial loading to the AGVs loading and a virtual matrix cell-matrix cell relation is added to the virtual supply-demand matrix: * = (12) • Tool storage-matrix cell relation is transformed into a matrix cell-matrix cell relation. The tool amount will be added as initial loading to the AGVs loading and a virtual matrix cell-matrix cell relation is added to the virtual supply-demand matrix: * = In the same way, we can create the virtual time frame matrix and assignment matrix: As an example, Figure 9 demonstrates the transformation of assignment matrices to a virtual assignment matrix. Using the virtual assignment, supply-demand and time frame matrices the objective function can be simplified as follows: Figure 9. Transformation of three different assignment matrices into one virtual assignment matrix.
Using the virtual assignment, supply-demand and time frame matrices the objective function can be simplified as follows: while Constraints 1 (5)- (7) can be written as: and Constraints 2 (8) can be written as: where q 0r is the initial loading of AGV r that can be calculated as follows: The described mathematical representation of the extended logistics resource optimization makes it possible to optimize the in-plant supply of manufacturing and assembly cells of matrix production in a cyber-physical system. This extended optimization is possible if the supply-demand of the manufacturing and assembly cells of the matrix production is known for a predefined time window represented by β in the model. The next phase of the optimization is the real-time rerouting and rescheduling of routed AGVs and supply tours caused by new orders, or malfunction of technological, logistic, or human resources.

Real-Time Logistics Resource Optimization
The second phase of our approach includes a real-time routing and scheduling problem. Within the frame of this phase, the extended assignment and routing can be modified depending on the real-time information of matrix production systems and ERP.
The decision variables of the real-time logistics resource optimization describe the decisions to be made. In this model it must be decided which new supply-demand by which AGV in which time is picked up. This decision represents an integrated assignment and scheduling problem. With this in mind, we define the following positions based on the results of extended logistics resource optimization describing the layout of the matrix production supply problem: The objective function of the problem describes the minimization of the energy consumption of the whole in-plant supply process including scheduled routes (extended optimization) and new supply-demands (real-time optimization).
where EC SR is the energy consumption of scheduled supply-demands without any assigned new supply-demands, EC NSP is the energy consumption of pickup route of new assigned and scheduled supply-demand, and EC NSD is the energy consumption of delivery route of new assigned and scheduled supply-demand. The first part of the objective function (20) includes the sum of energy consumption of scheduled supply-demands without assignment of new supply-demands, where the energy consumption is the function of positions of matrix cells for pickup and delivery, the loading of AGVs and the specific energy consumption, as written in (9).
The second part of the objective function (20) includes the energy consumption of the pickup route of new assigned and scheduled supply-demand: where r max is the total number of scheduled routes within the time frame, ψ max is the number of new supply-demands within the time frame (in the case of real-time scheduling ψ max = 1 because new supply-demands are scheduled real-time and they are not collected to be scheduled together), x P rλψ is the assignment matrix of pickup matrix cells of new supply-demands to the scheduled routes. x P rλψ takes value 1 if the new supply-demand ψ is assigned to route r following scheduled supply-demand λ, otherwise 0.
The third part of the objective function (20) includes the energy consumption of the delivery route of new assigned and scheduled supply-demand: where x D rλψ is the assignment matrix of destination matrix cells of new supply-demands to the scheduled routes. x D rλψ takes value 1 if the pickup matrix cell of the new supply-demand ψ is assigned to route r following scheduled supply-demand λ, otherwise 0.
The solutions of this integrated assignment and scheduling problem are limited by the following three constraints: Constraint 4: The capacity of AGV is not to exceed after assignment of new supply-demand. The new loading of AGV r passing pickup matrix cell λ − 1 can be calculated by adding the assigned new supply-demand and subtracting the value of a previously assigned delivery of an open task as follows: Constraint 5: It is not permitted to exceed the upper and lower limit of pickup time frame for each scheduled matrix cell.
where t Pmin rλ * and t Pmax rλ * is the lower and upper limit of pickup time for matrix cell s rλ * , t P1 rλ * ψ is the travelling time from the AGV-pool to the predecessor matrix cell of the new supply-demand's matrix cell ψ in route r, t 0r is the initial travelling time from the AGV-pool to the first scheduled matrix cell, t P2 rλ * ψ is the travelling time from the predecessor matrix cell to the new supply-demand's matrix cell ψ in route r, t P3 rλ * ψ is the travelling time from the new supply-demand's matrix cell ψ to the following matrix cell in route r, and t P4 rλ * ψ is the travelling time from the pickup matrix cell of the new supply-demand ψ to matrix cell λ * in route r.
Constraint 6: It is not permitted to exceed the upper and lower limit of delivery time frame for each scheduled matrix cell.
where t D1 rλ * ψ , t D2 rλ * ψ , t D3 rλ * ψ , and t D4 rλ * ψ can be calculated in the same was as in (25)- (27). Constraint 7: It is not permittFed to exceed the upper and lower limit of pickup and delivery time frame for each new supply-demand.
where t PNmin  supply-demands both in extended and real-time optimization, so we have only integer decision variables. Figure 10 demonstrates the model framework including time frame and capacity constraints. As the figure shows, the assigned new supply-demands have a great impact on the performance of supply routes. However, without constraints of time frame and capacity the new supply-demand can be assigned to the nearest matrix cells, but in the case of time and capacity related constraints the assignment and scheduling is an NP-hard optimization problem, therefore we suggest a heuristic approach to solve it. However, without constraints of time frame and capacity the new supply-demand can be assigned to the nearest matrix cells, but in the case of time and capacity related constraints the assignment and scheduling is an NP-hard optimization problem, therefore we suggest a heuristic approach to solve it.

Heuristic Optimization for Extended and Real-Time Logistics Resource Optimization Based on Black Hole Algorithm
Within the frame of this part of the article, a multiphase optimization algorithm is described. The algorithm includes an extended and real-time optimization phase. Within the extended phase, the in-plant supply of known supply-demands of the matrix production system is optimized. This extended optimization includes the clustering of supply-demands, the routing and the scheduling of clustered supply-demands. The second phase of the optimization is the real-time rerouting and rescheduling, where the existing routes are redesigned in order to insert new supply-demands into the existing routes. The objective function of the optimization algorithm includes time-related aspects, while time-frames and capacities are taken into consideration. The algorithm makes it possible to analyze the solutions from a sustainability point of view because greenhouse gas emission can be calculated. Within the frame of performance analysis, various heuristic algorithms are tested to measure their efficiency. Table 1 shows the results of this performance analysis. As the performance analysis shows, the results of black hole and flower pollination algorithms are comparable with genetic and harmony search algorithms.

Black Hole Optimization-Based Clustering
There is a wide range of clustering algorithms in the literature, which is suitable for the solution of clustering problems without complex restrictions. K-means clustering, mean-shift clustering, density-based spatial clustering, and agglomerative hierarchical clustering algorithms belong to the most well-known general clustering algorithms. However, their implementation codes are quite simple, but they have disadvantages: • K-mean: the classes must be defined [84]; • Mean-shift: the size of the sliding window must be defined [85]; • Density-based spatial clustering: its performance is low in the case of varying density of points [86]; • Agglomerative hierarchical clustering: its complexity is O n 3 while K-means is linear [87].
The constraints and the complexity of the multi-dimensional search space make the clustering problem NP-hard, which means that heuristic clustering methods are suitable to solve the clustering problem of the extended logistics resource optimization in matrix production.
The idea of black holes was first suggested by John Michel and Pierre-Simon Laplace. They proposed the existence of "invisible stars". They calculated its mass and size, which is the so-called event horizon in today's science. Later, in 1916 Albert Einstein predicted the existence of black holes with his general relativity theory. The first black hole called Cygnus X-1 was recognized by John Wheeler in 1971. Black holes are strange and fascinating places in space where the gravitation forces are so high that they can trap not only particles, planets, and stars but also light. Black holes are born when stars die. There are three types of black holes depending on their size and weight: supermassive black holes, stellar black holes, and miniature black holes. The black hole optimization is based on this phenomenon of black holes. Black holes have four layers: space outside the photonsphere, space between photonsphere and event horizon, space inside the event horizon, and the singularity, where the mass of the black hole in concentrated in one single point. The photon sphere is a spherical region of non-spinning black holes; photons reaching the photon sphere are not captured but they are forced to travel in orbits. The distance between particles and the black hole has a great impact on the behavior of the particles. If the distance between a particle is much higher than the Schwarzschild radius, then the particle can move in any direction. If this distance is larger than the Schwarzschild radius, but this difference is not too much, the space-time is deformed, and more particles are moving towards the center of the black hole than in other directions ( Figure 11). The event horizon and the photon sphere can be calculated as follows: = 2 , and r = 3 2 where g is Newton's gravitational constant, M is the mass, and c is the speed of light. Black hole algorithm belongs to the swarm intelligence algorithm, which are inspired either by living bodies, like ants [88], bees [89], fishes [90], bats [91], krill herds [92], fireflies [93], fruit flies [94], bacteria's [95], or by other natural phenomena, like gravitation [96], big-bang [97], or intelligent water drop [98]. Black hole optimization is used in a wide range of NP-hard optimization problems, like investigating the critical slip surface of soil slope [99], solving the non-unicost set covering problem [100], optimization of consignment-store-based supply chain [101], thermodynamic optimization of a Penrose process [102], power flow optimization [103], and design of electromagnetic devices [104], but one of its most important application fields is the clustering. The black hole algorithms have six phases as follows: • evaluation phase: this phase includes the calculation of the objective function based on the parameters represented by the coordinates of the star.
The event horizon and the photon sphere can be calculated as follows: r eh = 2gM c 2 , and r ps = 3 2 r s (30) where g is Newton's gravitational constant, M is the mass, and c is the speed of light. Black hole algorithm belongs to the swarm intelligence algorithm, which are inspired either by living bodies, like ants [88], bees [89], fishes [90], bats [91], krill herds [92], fireflies [93], fruit flies [94], bacteria's [95], or by other natural phenomena, like gravitation [96], big-bang [97], or intelligent water drop [98]. Black hole optimization is used in a wide range of NP-hard optimization problems, like investigating the critical slip surface of soil slope [99], solving the non-unicost set covering problem [100], optimization of consignment-store-based supply chain [101], thermodynamic optimization of a Penrose process [102], power flow optimization [103], and design of electromagnetic devices [104], but one of its most important application fields is the clustering. The black hole algorithms have six phases as follows: • big-bang phase: this phase is the initialization of the position and velocity of stars in the multidimensional search space. The stars represent potential solutions of the optimization problem, where the coordinates of the stars in the search space are the values of the decision variables. Stars can be initialized only inside the search space.
• evaluation phase: this phase includes the calculation of the objective function based on the parameters represented by the coordinates of the star.
• selection of black hole: within the frame of this phase a new black hole is defined as having the highest value of objective function. This star has the highest weight (represented by the value of objective function) and therefore it has the highest force of gravity and it is the center of movement of stars in the next movement phase.
• moving of stars: in this phase of the algorithm, a new position of stars is calculated. The movement of the stars can be influenced only by the black hole, but it is also possible to take into consideration the gravity force of the other stars.
• decreasing the event horizon and the photon sphere: in this phase, the size of the event horizon and the photon sphere is decreased based on the Hawking radiation, which describes the lost weight process of black holes. This phase makes it possible to prevent the absorption of stars representing solutions of the optimization problem near the optimum: where is the number of the current iteration step. • shift the position of the black hole: in this phase of the optimization we use the idea of Hawking radiation. Particles can escape and the black hole's mass reduces because if a particle-antiparticle pair is created beyond the event horizon, it is possible to have one drawn into the black hole itself while the other is ejected [105]. The position of the black hole is shifted using the following calculation: where µ is the shift-factor.
We demonstrate the clustering with a short example shown in Tables 2 and 3. Table 2 shows the parameters of the clustering problem. There are 12 tasks which must be clustered within a predefined time frame so that the objective function is the minimization of time deviance of average supply time (1), while time and capacity related constraints (5)-(8) must be taken into consideration. As Table 2 shows, the loadings to be supplied are given in loading units. The algorithm clustered the dataset given in Table 2 and resulted a time deviance of 104 min, while the constrained loading capacity of AGVs was not exceeded. Within the frame of the extended optimization of logistics resources of matrix production, we are using the above-mentioned black hole optimization-based clustering algorithm to find the best sets of supply-demands to be assigned to supply routes in order to minimize the time deviance from the time frames. As Table 3 shows, in this simple scenario, two supply routes must be performed to minimize the objective function while the upper limit of available AGVs is not exceeded.

Discretized Flower Pollination-Based Routing and Scheduling for Extended and Real-Time Optimization
Flower pollination algorithm is used in many fields of science: maximizing area coverage in wireless sensor networks [106], sizing optimization of truss structures [107], economic dispatch problems in modern power systems [108], optimizing wire electrical discharge machining [109], or calculation of maximum permitted capacity of photovoltaic in distribution network [110].
The flower pollination algorithm takes its metaphor from nature, from the pollination process of plants. Pollination is the act of transferring pollen grains from the male anther of a flower to the female stigma. External agents are responsible for the transportation of pollen grains. Typical agents are the following: insects, wind, birds, mammals, or water. Floral pollination algorithms are based on this natural phenomenon and their most important rules are the followings: [111]: the potential solutions of the optimization problem are represented by pollen grains; the global search in the search space is modelled through the biotic pollination; the local search in the search space is modelled by abiotic pollination and self-pollination; the global and local search is controlled through a switching probability between biotic, abiotic, and self-pollution. The algorithm has the following phases: • initialization of parameters: in this phase both problem-specific and algorithm-specific parameters are initialized. Problem-specific parameters are the parameters of search space (dimensions and size) and the constraints-defined parameters. Algorithm-specific parameters are the following: switch parameter between local and global search, distribution function parameters for Lévy flight, termination criteria, and the number of pollen grains. • calculation of the initial solutions: in this phase, the initial potential solutions of the optimization problem are defined. • evaluation of pollen grains: within the frame of this phase, pollen grains are evaluated based on the objective function of the optimization problem. • initialization of iteration phase: in this phase, a random number h ∈ [0, 1] is generated to switch between global and local search option. If h ≤ h * then global pollination (biotic pollination) takes place otherwise local pollination (abiotic pollination) takes place. • biotic pollination phase: this phase represents the global search in the search space. The operator is based on Lévy flight and can be defined as follows: where ω t i is the value of variable i at iteration step t, ω best,t i is the value of variable i at iteration step t in the case of the global best solution and L(λ) is the Levy distribution. • abiotic pollination: this phase represents a local search, in which pollen grains are spread to a local neighbor: where ω t ϑ and ω t ιζ are random selected pollen grains about the neighborhood of the currently processed pollen grain and ψ ∈ [0, 1] is a random number. • transformation of the continuous representation into permutation-based representation: within the frame of this phase the continuous variables are transformed into discrete numbers describing a permutation-based problem. We are using the smallest position value rule and the largest order value rule [112] for this transformation (Table 4). • checking the termination criteria: in this phase, the following termination criteria's can be checked: computational time, iteration steps, the value of the best solution, lower limit of convergence speed. Within the frame of the remaining part of this chapter, we will demonstrate the performance of the above-mentioned hybrid heuristic optimization method including clustering, assignment, and scheduling problems. In this scenario, 36 assembly stations are in around and there are 12 supply-demands to be clustered, routed, and scheduled. Table 5 shows the input parameters of the scenario, while Table 6 demonstrates the optimal clustering of the 12 supply-demands. The upper limit of loading capacity of the AGVs is 38 and the clustering algorithm has found the best clusters for extended scheduling and routing with a maximum capacity of 34 and 35 LUs.  Figure 12 demonstrates the solution of extended clustering and routing problems including two routes. The value of the objective function is 137 min, while the total length of the unloaded sections is 3468 m.
Increasing the available loading capacity of AGVs the extended clustering and routing gives a better solution (Figure 13), because the time frame deviance is only 104 min. Increasing the available loading capacity of AGVs the extended clustering and routing gives a better solution (Figure 13), because the time frame deviance is only 104 min.  Increasing the available loading capacity of AGVs the extended clustering and routing gives a better solution (Figure 13), because the time frame deviance is only 104 min. If the objective function of the extended clustering and routing problem is the minimization of the empty routes, then the energy efficiency can be minimized, but the time frame deviance is too high and some supply-demands cannot be performed within the lower and upper limit of the predefined time frame. The minimization of the length of empty routes can be performed in the case of one route, which means that the available loading capacity of AGV must be higher than in the case of scenarios 1 and 2. In the case of scenario three, the total length of the empty routes is 2948.7 m, while the required AGV's capacity is 69 LU and the total time frame deviance is 192 min. The key functionality of the algorithm has been explained. Figures 14 and 15 show the pseudocode of the algorithm because the details of the software engineering part would be interesting for anyone aiming to replicate the implementation. If the objective function of the extended clustering and routing problem is the minimization of the empty routes, then the energy efficiency can be minimized, but the time frame deviance is too high and some supply-demands cannot be performed within the lower and upper limit of the predefined time frame. The minimization of the length of empty routes can be performed in the case of one route, which means that the available loading capacity of AGV must be higher than in the case of scenarios 1 and 2. In the case of scenario three, the total length of the empty routes is 2948.7 m, while the required AGV's capacity is 69 LU and the total time frame deviance is 192 min. The key functionality of the algorithm has been explained. Figures 14 and 15 show the pseudocode of the algorithm because the details of the software engineering part would be interesting for anyone aiming to replicate the implementation.

Results from the Scenario Analysis of Extended and Real-Time Logistics Resource Optimization in Matrix Production
Within the frame of this chapter, a scenario analysis demonstrates the application possibilities of the above described mathematical model and validates the applied heuristic optimization algorithm. The scenario is simplified to make examples as perspicuous as possible. We have chosen a simple scenario, which makes it possible to check the performance of the optimization algorithm and to validate the suggested model and solution algorithm. It makes sense to consider this specific scenario because both the clustering and the routing/rerouting problems can be demonstrated. In this scenario, 16 assembly stations are in a matrix grid and there are 16 supply-demands to be clustered, routed and scheduled. Table 7 shows the input parameters of the scenario, while Table 8 demonstrates the optimal clustering of the 16 supply-demands.

Results from the Scenario Analysis of Extended and Real-Time Logistics Resource Optimization in Matrix Production
Within the frame of this chapter, a scenario analysis demonstrates the application possibilities of the above described mathematical model and validates the applied heuristic optimization algorithm. The scenario is simplified to make examples as perspicuous as possible. We have chosen a simple scenario, which makes it possible to check the performance of the optimization algorithm and to validate the suggested model and solution algorithm. It makes sense to consider this specific scenario because both the clustering and the routing/rerouting problems can be demonstrated. In this scenario, 16 assembly stations are in a matrix grid and there are 16 supply-demands to be clustered, routed and scheduled. Table 7 shows the input parameters of the scenario, while Table 8 demonstrates the optimal clustering of the 16 supply-demands. The upper limit of loading capacity of the AGVs is 120 and the clustering algorithm has found the best clusters for extended scheduling and routing with a maximum capacity of 109, 79, and 113 LUs.  The value of the objective function (total deviance of time frame) is 237.75 min, while the total length of unloaded sections is 372 m. The length of loaded routes is 492 m and the total length of the three supply routes is 864 m. The maximum loading of AGVs is 114, 91, and 117 LU, which means a capacity utilization of 95%, 76%, and 98%.
The AGVs are using electricity. As the comparison of the World Nuclear Association shows, the greenhouse gas (GHG) emission depends on the electricity generation source (Figure 18). The next phase of the optimization is the real-time scheduling. Within the frame of our scenario, one supply-demand must be performed. The optimization algorithm is responsible for the reclustering, rerouting, and rescheduling of the routes in order to find the most energy efficient way, while time frame and capacity related constraints are taken into consideration. The new supply-demand must be performed between matrix cell 2 and 12, the time frame to perform this supply chain is between 10:30 and 10:45 and the loading is 21 LU. The results of reclustering are shown in Table 9 and Figure 17.
The value of the objective function (total deviance of time frame) is 237.75 min, while the total length of unloaded sections is 372 m. The length of loaded routes is 492 m and the total length of the three supply routes is 864 m. The maximum loading of AGVs is 114, 91, and 117 LU, which means a capacity utilization of 95%, 76%, and 98%.
The AGVs are using electricity. As the comparison of the World Nuclear Association shows, the greenhouse gas (GHG) emission depends on the electricity generation source (Figure 18).
12 11 Figure 17. Results of real-time reclustering, reassignment, and rerouting of AGVs. Figure 18. Comparison of lifecycle greenhouse gas emissions of various electricity generation sources [113].
Using the specific emission in g/liter fuel consumption and calculate the proportion of them to the GHG emission reported by World Nuclear Association [113] we can calculate the specific virtual emission of used electricity (Table 10).    Using the specific emission in g/liter fuel consumption and calculate the proportion of them to the GHG emission reported by World Nuclear Association [113] we can calculate the specific virtual emission of used electricity (Table 10). Using the specific emission in g/liter fuel consumption and calculate the proportion of them to the GHG emission reported by World Nuclear Association [113] we can calculate the specific virtual emission of used electricity (Table 10). However, energy consumption of AGVs depends on both the length of routes and loading of AGVs, but within the frame of our model, we calculate with an average loading. As previous research results highlight, energy consumption minimization is regarded as the optimal object to planning efficient routes for heterogeneous AGVs. The energy consumption of electric AGVs is between 40 and 150 Wh/km depending on the loading weight [115]. Tables 11-13 shows the calculated virtual GHG emission in the case of lignite, oil, and photovoltaic based electricity generation.   1 We are calculating with 100 routes.
The above-described scenario validated the presented model based on extended and real-time routing, scheduling, and assignment and justifies the fact that in matrix production the enhanced logistics performance must be optimized in order to increase energy efficiency and decrease GHG emission. Figure 19 demonstrates the physical appearance of a matrix production system, where the flexible manufacturing and assembly cells are arranged in a grid layout.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 27 of 33 emission. Figure 19 demonstrates the physical appearance of a matrix production system, where the flexible manufacturing and assembly cells are arranged in a grid layout. To summarize, the proposed optimization model including a black hole algorithm-based clustering and a floral pollination-based routing and assignment makes it possible to analyze the impact of real-time routing in a complex, flexible cyber-physical manufacturing environment, where manufacturing and logistics are separated and the supply of categorized, standardized manufacturing and assembly cells is performed with autonomous electric vehicles.
As the findings of the literature review show, the articles that addressed the in-plant supply of manufacturing processes are focusing on conventional production environments, but none of the articles aimed to identify the challenges of matrix production. The comparison of our results with those from other studies shows that the optimization of in-plant supply processes in a cyber-physical environment still needs more attention and research. The reason for this is that, in the case of large-sized stochastic production systems, where the supply-demand can be scheduled both an extended way (production planning) and a real-time way (supply-demands caused by malfunction of technology, waste product, or customer demand) heuristic algorithms must be used in the case of these NP-hard optimization problems. In spite of the small size of the demonstrated problems, these results show that the proposed method using black hole and floral pollination algorithms performs better than the conventional formal models. The proposed model and algorithm can obtain different objectives (time frame deviance, energy consumption, route length, GHG emission) and various constraints (time frame and capacity related) of the matrix production.

Conclusions
Within the frame of this research work, the authors developed a mathematical model and a black hole and floral pollination algorithms-based optimization method, which makes it possible to optimize the in-plant supply of a cyber-physical production environment called matrix production suggested by KUKA robotics. More generally, this paper focused on the mathematical description of the framework of in-plant supply of matrix production including time frame, capacities, energy consumption, and emissions and shows the impact of optimization on the performance of the To summarize, the proposed optimization model including a black hole algorithm-based clustering and a floral pollination-based routing and assignment makes it possible to analyze the impact of real-time routing in a complex, flexible cyber-physical manufacturing environment, where manufacturing and logistics are separated and the supply of categorized, standardized manufacturing and assembly cells is performed with autonomous electric vehicles.
As the findings of the literature review show, the articles that addressed the in-plant supply of manufacturing processes are focusing on conventional production environments, but none of the articles aimed to identify the challenges of matrix production. The comparison of our results with those from other studies shows that the optimization of in-plant supply processes in a cyber-physical environment still needs more attention and research. The reason for this is that, in the case of large-sized stochastic production systems, where the supply-demand can be scheduled both an extended way (production planning) and a real-time way (supply-demands caused by malfunction of technology, waste product, or customer demand) heuristic algorithms must be used in the case of these NP-hard optimization problems. In spite of the small size of the demonstrated problems, these results show that the proposed method using black hole and floral pollination algorithms performs better than the conventional formal models. The proposed model and algorithm can obtain different objectives (time frame deviance, energy consumption, route length, GHG emission) and various constraints (time frame and capacity related) of the matrix production.

Conclusions
Within the frame of this research work, the authors developed a mathematical model and a black hole and floral pollination algorithms-based optimization method, which makes it possible to optimize the in-plant supply of a cyber-physical production environment called matrix production suggested by KUKA robotics. More generally, this paper focused on the mathematical description of the framework of in-plant supply of matrix production including time frame, capacities, energy consumption, and emissions and shows the impact of optimization on the performance of the system. Why is so much effort being put into this research? The role of in-plant supply has changed in the last few years from the conventional material handling to a highly flexible, responsive supply, where IoT solutions like gentelligent products, intelligent tools, networking manufacturing and assembly cells and digital twin applications influence the operation of the whole cyber-physical environment.
The added value of the paper is the description of the in-plant supply model of matrix production, which makes it possible to describe the time, capacity, energy, and emission-related impacts of the operation. The scientific contribution of this paper for researchers in this field is the mathematical modelling and the heuristic optimization including clustering, assignment, routing, and scheduling. The results can be generalized because the model can be applied for different production environments from small and middle-sized enterprises to multinational production companies. The described method makes it possible to support managerial decisions; not only the manufacturing but also the logistics and supply chain strategy can be influenced by the results of the above-described contribution.
However, there are also limitations of the study. The inventory of components and tools are not taken into consideration and the parameters of the matrix production systems are given as deterministic parameters. These limitations show the directions for further research. In further studies, the model can be extended to a more complex model including inventory optimization for components and tools. Second, this study only considered time, capacity, and energy consumption as deterministic parameters. Fuzzy models can be also suitable for the description of a stochastic environment (uncertain capacity, time window, availability of resources) because Fuzzy models are based on degrees of truth. This should be also considered in future research.