A Novel Multi-Agent-Based Collaborative Virtual Manufacturing Environment Integrated with Edge Computing Technique

: This paper proposes a multi-agent-based collaborative virtual manufacturing environment (VME) to save energy consumption and improve e ﬃ ciency in the manufacturing process. In order to achieve the high autonomy of the manufacturing system, a multi-agent system (MAS) is designed to build a collaborative VME. In this new VME environment, edge computing is embedded to strengthen the cyber resource utilization and system economy. Moreover, an e ﬃ cient communication channel between networks is proposed. The subsequent cooperation and collaboration protocols among agents are designed to ensure ﬂexible and process-oriented operations. Furthermore, the fuzzy resolution algorithm is employed to resolve the competition conﬂicts among function-similar MASs in the distributed manufacturing scenario. Lastly, a simulation and case study are performed to evaluate the performance of the proposed VME in Internet of Things (IoT)-based manufacturing. The analysis results have demonstrated the feasibility and e ﬀ ectiveness of the proposed VME system.


Introduction
The virtual manufacturing environment (VME) is an environment that executes manufacturing processes [1].This environment enables the manufacturer to evaluate the production activities beforehand without using physical plants and facilities.With the rapid development of artificial intelligence, VME is often chosen as a platform on which work is carried out for various applications of intelligent systems, e.g., management systems, control systems, networks, and computing modes [2][3][4].In a real manufacturing environment, an entire production procedure is comprised of subtasks in different function domains, such as process control, quality assurance, maintenance, and logistics.Therefore, collaboration among the fragmented domains is necessary to cope with both the internal and external fluctuating factors [5], e.g., energy cost-down plan, voice of customers, intense global competition, and shorter time-to-market strategy.Concerning the complexity of object management and collaboration, VME has to be developed in a modular and distributed way, and the distributed module requires a low coupling and high cohesion performance with strong independency principle [6].A multi-agent system (MAS) is a loosely coupled agent network that solves problems exceeding single agent capability or knowledge through interaction [7], and has proven to have great advantages regarding the construction of distributed systems, resources allocation, and adaptive reactivity.The goal of a MAS is to decompose large complex systems (software and hardware systems) into small, interoperable, and easy-to-manage systems.The merits of taking MAS into application embrace intelligent decision-making, high-level autonomy, interoperation with heterogeneous systems, high-level interactivity, etc.
On the other hand, the Internet of Things (IoT) has attracted great attention in the last decade.Many researchers have tried to construct IoT systems combined with thorough data manipulation and resource sharing mechanisms with the help of VME.For instance, large-scale IoT systems based on cloud computing have been prevailing in system establishment and management [8], in which cloud computing enables powerfully centralized data processing and storage with various service-provisioning paradigms such as "Software as a service" (SaaS).However, related difficulties that originated from the fixed features of cloud computing have included transmission latency, explosive bandwidth requests, and a high risk of privacy concerns.To solve these rigid dilemmas, embedding the edge computing into cloud computing is gradually becoming a development trend.
Bearing the above observations in mind, this article intends to carry on the comprehensive development of a collaborative VME through the integration of MAS and edge computing techniques with a case study.Distinguished from other research hotspots such as service, product life cycles, or supply chains, this study extends the study into production-oriented manufacturing, and concentrates more on daily activities.
The remainder parts are organized as follows: work related to VME, MAS, and edge computing are outlined in Section 2. Section 3 presents the system architecture of the developed VME with the elaboration of the MAS and edge computing framework.In Section 4, the system communication channel, the cooperation protocol, and the collaboration protocol in MAS are proposed.A fuzzy comprehensive evaluation method is adopted for the competition resolution.Section 5 demonstrates an exemplary network simulation, a case study based on edge computing platform, and a resolution of MAS competition.In the last section, conclusions and future research are generalized.

Literature Review
Recent publications relevant to this paper are mainly concerned with three research streams: VME, MAS, and edge computing.In this section, the correlative literature is listed and concluded.

Application of Virtual Manufacturing Environment
The field of VME has gradually broadened with the help of computing power.Various solutions for VME have been developed to overcome engineering deficiencies effectively, e.g., innovative design, the evaluation of production activities, the elimination of inappropriate results, and the maintenance of models in daily operation to achieve high-quality simulation [9].Matsas et al. [10] built up a highly interactive fiber VME as an experiment platform where robots cooperate to switch and remove adhesive strips and fabrics from molds.Cai et al. [11] utilized an intelligent efficient autonomous hand behavior construction method for VME to improve the current mainstream hand animation method that totally depends on capturing hand movements.In the past decade, virtual reality technology has been prevailing in constructing VME.For instance, Vosniakos et al. [12] elaborated the approach that constructs a simulation model for robotic production units from scratch under virtual reality exemplification.Abidi et al. [13] embedded a lean simulation of a production process based on virtual reality technology in the virtual environment, which provided users with the interaction with a simulation model in three-dimensional (3D) format and in real time.Colledani et al. [14] developed a data-sharing model-based virtual factory environment that was exploited to afford a universal language for data exchange within all applications.Apart from the preceding techniques, emerging technology was also adopted to address stubborn problems in specific areas such as information-sharing barriers among different enterprises.Hao et al. [15] developed a messaging and data exchange platform that can impulse the interoperability and integration within virtual factories partners.The above literature review has shown that VME can be extended in many application fields with high efficiencies and performances.However, VME has rarely applied for IoT-based manufacturing.The merit of VME motivates us to embed the innovative conceptual framework of smart manufacturing within it.

Multi-Agent System (MAS) in Engineering Application
MAS provides a particular intelligent aspect to resolve the coordination and cooperation between the product design, manufacturing, and even the whole life cycle of the product.It affords a more effective means for system integration, concurrent design, and intelligent manufacturing [16].In the review, the multi-agent application in the manufacturing fields is focused.Cristalli et al. [17] introduced a new method to design a distributed production control system and demonstrated how to apply the multi-agent mechanism of a distributed system to enhance the integration of quality control in production processes.Feng et al. [18] designed a MAS formed by four types of agents, covering three layers: enterprise resource planning (ERP), a manufacturing execution system (MES), and the factory automation layer.In [19], a proposal for an IoT system represented by the user-orientated and environment-oriented ability was discussed.A system configuration platform furnished with a multi-agent framework was adopted to address the common problems of edge computing and traditional IoT architecture.Barenji et al. [20] introduced a novel architecture deploying an RFID (radio frequency identification) distributed monitoring and control system through multiple agents.The system is responsible for implementing different tasks and collaborating to enhance the flexibility and re-configurability of the production system.Marks et al. [21] utilized MAS to respond to manufacturing alternation requests and create adaptive choices for the equipment based on the system's mechatronic model.Besides, Durica et al. [22] presented MAS and adopted a novel bio-inspired algorithm in energy-efficient manufacturing.García-Magariño et al. [23] proposed a tool named MTBE (model transformation by example) for the creation of model transformations in MAS that are based on the generation of model transformations as an example.It overcomes the limitations of other similar tools in the sense that it can generate many-to-many transformation rules.As reviewed, in short, with the help of the high autonomy of MAS, the management of manufacturing can be greatly simplified.One contribution of this paper is to design MAS to realize the collaborative manufacturing environment.

Edge Computing
Even though the public cloud service mode provides a relatively secure and convenient environment for enterprises as an alternative, transmission latency and congestion remain to be considered as the rigid characters for cloud computing.On the other hand, due to cost and efficiency factors, minor enterprises still want to have a solution that makes the most use of their local computing devices [24].A flexible technology is needed to take up such challenges.Edge computing, as an emerging distributed computing technology and an improvement of cloud computing, is launched.Compared with cloud computing, there are the following advantages by applying edge computing: (1) Not all the data is necessary to be aggregated to the backstage data center (DC) such as OpenStack for centralized processing.Edge computing can perform the intelligence at the network edge that is close to data source or sensor to obtain rapid local access and load distribution [25].This specific merit will decrease communication delays as well as the entire size of the data to be migrated to the remote end through public and private DCs.(2) Data processing performed by edge computing enables the application of a cluster of mechanisms to implement the analysis of acquired signal and instant decision making on-site [26].
(3) Edge computing can utilize idle resources effectively, which helps further reduce the load of central processing.(4) Edge computing enhances the offline protection of privacy and security [27].Although a cloud-based solution may also help offload the computation overhead of security protection, users are required to hand in their security keys to cloud servers.Edge computing preprocesses a matched algorithm on the acquisition processing; the data can be transmitted only after privacy protection, which means the security remains as security keys concealed by users.
Currently, the application of edge computing concentrates mostly on the mobile field and IoT.In [28], a new robust dynamic edge network architecture (RDNA) based on edge computing was proposed that leverages the advantages of recent advances in mobile devices to acquire left-off resources and mitigate the crowding of networks in a dynamic way.Amjad et al. [29] proposed a framework solution based on cognitive edge computing to achieve efficient distributed resources utilization that provided end users with a dynamic flexible extension of cloud computing and devices.Tran et al. [30] designed a context-aware, real-time cooperation structure that sits on the edge of a radio access network.The highlight of this article also lies in the integration of heterogeneous resources to the edge.Despite the merits of quick response and high computing efficiency, Hsu et al. [31] described a novel reconfigurable security architecture based on edge computing that uses an edge device near users, i.e., security agents, with the view of simplifying the key governance and offloading calculation costs for algorithms on IoT devices.As an emerging technique, edge computing can provide more flexible solutions than cloud computing, especially for SMEs (small and medium-sized enterprises).Therefore, one of the contributions in this paper is to apply this technique to IoT-based manufacturing, with the view of saving resources (e.g., energy and means of production) and increasing communication efficiency.

Discussion
Each aforementioned advanced technology or model has its own emphasis and plays an important role in the development of manufacturing industries.There are still some observations.(1) Most researches have focused on a single technology rather than comprehensiveness.However, to ensure numerous features of an IoT-based manufacturing system simultaneously, a combination of different technologies is essential.(2) As far as we know, few studies have integrated MAS together with edge computing technique into the VME.It has meaning to give play to their own advantages for supporting the mobility requirements and geographic independence of VME.Bearing the above observation in mind, an edge-based MAS architecture to realize the functionality of a collaborative VME is proposed.It is worth mentioning that although edge computing has many advantages, cloud computing remains in the proposed VME, as it executes more powerful central resource management.

Architecture of the Proposed Virtual Environment
To demonstrate the research work more clearly, an overview of the research process of the proposed study model is summarized.Firstly, the overview of the proposed VME with a hierarchical description of each working environment is presented, and the cooperation framework of the system layer in VME is specially illustrated in Section 3.1.The MAS architecture and individual agent functionality are depicted with an example in Section 3.2.The network communication and agent interactions in MAS will be elaborated in Section 4.

Overview of the VME
Figure 1 depicts an overview of the proposed VME.The VME covers three layers: a service layer, an edge-based system layer, and a user interaction layer.Next, each layer with their functionalities is elaborated separately.
The service layer attends to the cloud infrastructure.The cloud processing module in this layer takes charge of big data processing and analysis, while the storage module empowers an abstraction for flexible data storage.Since the IoT in the manufacturing field contains plenty of physical machines furnished with heterogeneous systems in the form of configurations, models, and semantics, it is inevitable to shield such heterogeneous systems to provide uniform standard service.Here, a virtual machine technique [32,33]  locations to virtual machines on the cloud platform.All the resources are centralized, integrated, and further rented out on a pay-as-you-go model [34].When any users intend to access the resources through the gust OS (operation system) under the SaaS paradigm, relative virtual machines will be triggered and organized availably for sharing through cloud connectivity.This cloud infrastructure brings the advantage of high scalability, because alternative service providers can be arbitrarily selected according to data types, e.g., structured/semi-structured binary and semantic data.
alternative service providers can be arbitrarily selected according to data types, e.g., structured/semistructured binary and semantic data.
The edge-based system layer is deployed in relation to an IoT system and MAS architecture.Figure 2 illustrates the cooperation of the key components that are relevant to this layer.In the proposed framework, edge computing is granted permission to shrift the required computational power out of the cloud center, and locate it closely to end-user devices (e.g., test equipment).That is, edge devices acquire the equipment data and transfer it to the edge server (e.g., intelligent gateway) through network interconnection.An edge gateway facilitates the necessary performance of storage and computing resources, management of membership, and logic operation.On the other side, the allocation of edge computing is regulated by MAS.MAS proceeds reasoning and makes decisions that act on the end effectors (work site) based on information fusion.The edge server keeps delivering the aggregated data to the cloud platform for further analysis and storage.The user interaction layer generated by user abstraction comprehends service requests and preferences via human-computer interaction.As internal users, the supervisors and operators have access and permission to retrieve and invoke the underlying data with LAN (local area network) /WAN (wide area network); as external users, the customer and supplier can share their actual product, delivery, and quality information in a standard data format through cloud connectivity in The edge-based system layer is deployed in relation to an IoT system and MAS architecture.Figure 2 illustrates the cooperation of the key components that are relevant to this layer.In the proposed framework, edge computing is granted permission to shrift the required computational power out of the cloud center, and locate it closely to end-user devices (e.g., test equipment).That is, edge devices acquire the equipment data and transfer it to the edge server (e.g., intelligent gateway) through network interconnection.An edge gateway facilitates the necessary performance of storage and computing resources, management of membership, and logic operation.On the other side, the allocation of edge computing is regulated by MAS.MAS proceeds reasoning and makes decisions that act on the end effectors (work site) based on information fusion.The edge server keeps delivering the aggregated data to the cloud platform for further analysis and storage.The framework also specifies a domain-based hierarchical structure.The MAS is equipped with a set of intelligent agents (production agent, quality agent, logistics agent, and maintenance agent) that regulate their subagents in each respective domain.There are two hierarchies.In the first hierarchy, the quality agent, maintenance agent, and logistics agent collaborate with each other and are harmonized by the production agent for achieving a common production target.These four intelligent agents own the capabilities of data processing, aggregation, and storage, and can act as an edge server (intelligent gateway).With the features of intelligent gateways, the agents realize the protocol transformation between different types of perceptual networks and communication networks both in WAN and LAN.According to the categories in [35], and taking the functionality into account, they are designed as a kind of hybrid collaborative and deliberate agent (CDA) whose structure is presented in Figure 4 as an example.A CDA consists of database module, repository module, control module, and communication interface module.It can be abstracted using a four-tuple:

Multi-Agent Architecture and Individual Agent Functionality
where: D: database.The database holds all the associated data for processing.It keeps the operation logs and records activities.
R: repository.The repository stores the knowledge that forms the base of decision-making, and supports activities.
C: control.The control module makes decisions and controls the activities.Functions such as cooperation with other agents and task allocation are executed by the control module.
I: communication interface.The communication interface provides access from agent to agent, the network, and the environment.It is namely a primary conduit for communication between agents and externality.The user interaction layer generated by user abstraction comprehends service requests and preferences via human-computer interaction.As internal users, the supervisors and operators have access and permission to retrieve and invoke the underlying data with LAN (local area network) /WAN (wide area network); as external users, the customer and supplier can share their actual product, delivery, and quality information in a standard data format through cloud connectivity in XML.Since the communication and interaction are implemented on the centralized platform, the user interaction layer is virtually a cloud-based application layer.The framework also specifies a domain-based hierarchical structure.The MAS is equipped with a set of intelligent agents (production agent, quality agent, logistics agent, and maintenance agent) that regulate their subagents in each respective domain.There are two hierarchies.In the first hierarchy, the quality agent, maintenance agent, and logistics agent collaborate with each other and are harmonized by the production agent for achieving a common production target.These four intelligent agents own the capabilities of data processing, aggregation, and storage, and can act as an edge server (intelligent gateway).With the features of intelligent gateways, the agents realize the protocol transformation between different types of perceptual networks and communication networks both in WAN and LAN.According to the categories in [35], and taking the functionality into account, they are designed as a kind of hybrid collaborative and deliberate agent (CDA) whose structure is presented in Figure 4 as an example.A CDA consists of database module, repository module, control module, and communication interface module.It can be abstracted using a four-tuple:

Multi-Agent Architecture and Individual Agent Functionality
where: D: database.The database holds all the associated data for processing.It keeps the operation logs and records activities.
R: repository.The repository stores the knowledge that forms the base of decision-making, and supports activities.
C: control.The control module makes decisions and controls the activities.Functions such as cooperation with other agents and task allocation are executed by the control module.
I: communication interface.The communication interface provides access from agent to agent, the network, and the environment.It is namely a primary conduit for communication between agents and externality.The CDAs in the first hierarchy manage and dominate the performances of their subagents (e.g., monitor agent, resource agent, and scheduling agent in Figure 3) that stay on the second hierarchy of the multi-agent architecture.These subagents collaborate with each other to support the decision makers (CDAs) in their own functional domains.According to the work specification, they are designed as a type of reactive agent.From Figure 3, it can be seen that in each specific domain, one CDA harmonizes two reactive agents.Therefore, there are in total eight reactive agents in a MAS.The exemplary structure of the reactive agent is shown in Figure 5.It is worth mentioning that both CDAs and reactive agents possess certain abilities to resolve problems autonomously through continuously perceiving environmental information, updating their own information database, and communicating with each other.In addition, each agent in the system layer is furnished with decision-making functions and expert knowledge in dedicated fields, which help observe different aspects, space, and characteristics of the manufacturing environment.The differences between CDA and reactive agent stay mainly on the decision-making scope and data-processing ability.The CDAs in the first hierarchy manage and dominate the performances of their subagents (e.g., monitor agent, resource agent, and scheduling agent in Figure 3) that stay on the second hierarchy of the multi-agent architecture.These subagents collaborate with each other to support the decision makers (CDAs) in their own functional domains.According to the work specification, they are designed as a type of reactive agent.From Figure 3, it can be seen that in each specific domain, one CDA harmonizes two reactive agents.Therefore, there are in total eight reactive agents in a MAS.The exemplary structure of the reactive agent is shown in Figure 5.It is worth mentioning that both CDAs and reactive agents possess certain abilities to resolve problems autonomously through continuously perceiving environmental information, updating their own information database, and communicating with each other.In addition, each agent in the system layer is furnished with decision-making functions and expert knowledge in dedicated fields, which help observe different aspects, space, and characteristics of the manufacturing environment.The differences between CDA and reactive agent stay mainly on the decision-making scope and data-processing ability.The CDAs in the first hierarchy manage and dominate the performances of their subagents (e.g., monitor agent, resource agent, and scheduling agent in Figure 3) that stay on the second hierarchy of the multi-agent architecture.These subagents collaborate with each other to support the decision makers (CDAs) in their own functional domains.According to the work specification, they are designed as a type of reactive agent.From Figure 3, it can be seen that in each specific domain, one CDA harmonizes two reactive agents.Therefore, there are in total eight reactive agents in a MAS.The exemplary structure of the reactive agent is shown in Figure 5.It is worth mentioning that both CDAs and reactive agents possess certain abilities to resolve problems autonomously through continuously perceiving environmental information, updating their own information database, and communicating with each other.In addition, each agent in the system layer is furnished with decision-making functions and expert knowledge in dedicated fields, which help observe different aspects, space, and characteristics of the manufacturing environment.The differences between CDA and reactive agent stay mainly on the decision-making scope and data-processing ability.Next, the functionalities of all the agents concerning each domain are elaborated as follows: (1) Production domain: The production agent harmonizes other CDAs and collaborates the subagents in the production domain.The scheduling agent dispatches production tasks according to the actual overall production status dynamically.The process agent adjusts the production processes with respect to the product or material changes from the customer or supplier side.formulates reasonable inventory rules for all the resources that circuit between the logistics system, and takes the responsibility of connecting with suppliers and customers for buffer balance.Since modern management is committed to promoting a zero-inventory strategy, the allocation of resources for plant areas is restricted and limited.Too little or too much buffer will create an inventory alert, and production activities will be greatly affected.Both the transfer agent and resource agent collaborate with each other as subagents under the guidance of the Next, the functionalities of all the agents concerning each domain are elaborated as follows: (1) Production domain: The production agent harmonizes other CDAs and collaborates the subagents in the production domain.The scheduling agent dispatches production tasks according to the actual overall production status dynamically.The process agent adjusts the production processes with respect to the product or material changes from the customer or supplier side.management is committed to promoting a zero-inventory strategy, the allocation of resources for plant areas is restricted and limited.Too little or too much buffer will create an inventory alert, and production activities will be greatly affected.Both the transfer agent and resource agent collaborate with each other as subagents under the guidance of the logistics agent.

Network Communication and Agent Interactions in MAS
Communication is a key element of system operation.The accuracy and efficiency of communication between entities determine the performance of the proposed system architecture.On the other hand, a VME needs to forge a platform where information could be exchanged freely by any task participants.In this section, the communication channel between networks and particular interaction (cooperation, collaboration, and competition) protocols for the MAS are proposed.

Network Communication Channel
As aforementioned in Figure 4, the CDA such as the production agent plays the role of an intelligent gateway that integrates the performance of protocol, application, and safety.One primary functionality of the gateway is to translate data using diverse communication protocols, data formats, or languages.Since the CDA in the proposed framework interconnects with the IoT and can access the global cloud server, the communication between networks can be characterized via edge gateways.The edge gateways are deployed in the edge network communication, which is shown in Figure 6.
FOR PEER REVIEW 9 of 19

Network Communication and Agent Interactions in MAS
Communication is a key element of system operation.The accuracy and efficiency of communication between entities determine the performance of the proposed system architecture.On the other hand, a VME needs to forge a platform where information could be exchanged freely by any task participants.In this section, the communication channel between networks and particular interaction (cooperation, collaboration, and competition) protocols for the MAS are proposed.

Network Communication Channel
As aforementioned in Figure 4, the CDA such as the production agent plays the role of an intelligent gateway that integrates the performance of protocol, application, and safety.One primary functionality of the gateway is to translate data using diverse communication protocols, data formats, or languages.Since the CDA in the proposed framework interconnects with the IoT and can access the global cloud server, the communication between networks can be characterized via edge gateways.The edge gateways are deployed in the edge network communication, which is shown in Figure 6.In Figure 6, the OPC UA OLE (object linking and embedding) for Process Control, Unified Architecture) [36] affords a complete, secure, and reliable cross-platform architecture for information interaction.It enables the system to reach the semantic interoperability as well as the illocal perception of the manufacturing.The server of the OPC UA could be constructed using the edge nodes.To deploy edge computing, a software container on the gateway can be installed.To ensure the requirements of low congestion and latency, edge computing can be regarded as a time-aware scheduler by introducing the time-sensitive networks (TSN) [24].In such a scenario, edge computing allocates the information communication and affords the real-time capability on the time nodes.
At the device terminal, device-to-device (D2D) communication is a new technology that allows terminals to communicate directly by multiplexing cell resources under the control of the system [37].D2D realizes a convenient resource allocation with the base station in the manufacturing environment.To some extent, it solves the problem of resource scarcity in wireless communication systems.With D2D, smart mobile devices can interact freely with each other through the wireless access.In the case of no network coverage, devices can separate their connections from nearby devices and form local sub-networks intelligently.Then, they can access the core network through the intermediate connections [24].

Agent Communication
Virtually, communication between function domains is the communication between agents.There are commonly three kinds of communication modes between individual agents: a message- In Figure 6, the OPC UA OLE (object linking and embedding) for Process Control, Unified Architecture) [36] affords a complete, secure, and reliable cross-platform architecture for information interaction.It enables the system to reach the semantic interoperability as well as the illocal perception of the manufacturing.The server of the OPC UA could be constructed using the edge nodes.To deploy edge computing, a software container on the gateway can be installed.To ensure the requirements of low congestion and latency, edge computing can be regarded as a time-aware scheduler by introducing the time-sensitive networks (TSN) [24].In such a scenario, edge computing allocates the information communication and affords the real-time capability on the time nodes.
At the device terminal, device-to-device (D2D) communication is a new technology that allows terminals to communicate directly by multiplexing cell resources under the control of the system [37].D2D realizes a convenient resource allocation with the base station in the manufacturing environment.To some extent, it solves the problem of resource scarcity in wireless communication systems.With D2D, smart mobile devices can interact freely with each other through the wireless access.In the case of no network coverage, devices can separate their connections from nearby devices and form local sub-networks intelligently.Then, they can access the core network through the intermediate connections [24].

Virtually, communication between function domains is the communication between agents.
There are commonly three kinds of communication modes between individual agents: a message-based mode, an event-based mode, a signal-based mode.Here, the message-based mode for the illustration of agents' communication is chosen due to its intuitive feature.Under this mode, messages in MAS can be transmitted through an ontology model to achieve excellent compatibility and feasibility.Recently, ontology technology has been prevailing in the representation of a set of concepts and their relation in specific domains.Among most ontology languages such as the resource description framework (RDF), DARPA agent markup language + ontology interchange language (DMAL + OIL), extensible markup language (XML), simple HTML ontology extensions (SHOE), and web ontology Langauge (OWL), XML was verified to have great advantages regarding the readability and exchange of information.It is the semantic markup language that was designed as the vocabulary extension of the resource description framework (RDF), which provides more modeling primitive constructors and possesses clearer and more formal semantics [38].In this study, XML is adopted as the ontology to describe the communication between individual agents.That is, different types and formats of messages will be transformed into XML representation through the semantic annotation firstly.The annotated message in the agent can be processed through the editor and explorer module.At last, an output message in a formatted document depicted by RDF is created, and other agents can recognize it.Figure 7 illustrates the XML and RDF-based message transmission procedure between two agents.

FOR PEER REVIEW 10 of 19
messages in MAS can be transmitted through an ontology model to achieve excellent compatibility and feasibility.Recently, ontology technology has been prevailing in the representation of a set of concepts and their relation in specific domains.Among most ontology languages such as the resource description framework (RDF), DARPA agent markup language + ontology interchange language (DMAL + OIL), extensible markup language (XML), simple HTML ontology extensions (SHOE), and web ontology Langauge (OWL), XML was verified to have great advantages regarding the readability and exchange of information.It is the semantic markup language that was designed as the vocabulary extension of the resource description framework (RDF), which provides more modeling primitive constructors and possesses clearer and more formal semantics [38].In this study, XML is adopted as the ontology to describe the communication between individual agents.That is, different types and formats of messages will be transformed into XML representation through the semantic annotation firstly.The annotated message in the agent can be processed through the editor and explorer module.At last, an output message in a formatted document depicted by RDF is created, and other agents can recognize it.Figure 7 illustrates the XML and RDF-based message transmission procedure between two agents.

Agent Cooperation Protocol between Function Domains
Since one agent forms merely an inaccurate picture of the whole MAS, the system will be tangled without cooperation between the individuals.In general, the purpose of cooperation is to fulfill the targets of agents furthest.Complied with cooperation, the interactive agents need to adjust their targets and corresponding behavior, especially regarding the utilization of resources, because the behaviors of multi-agents interfere with each other by all means to achieve common objectives.The basic content of cooperation concludes target cooperation, resource allocation, procedure cooperation, and result cooperation.In this study, the cooperation is depicted in our hierarchical architecture based on organization structuring, which defines the responsibility, capability, interaction, and control flow.Figure 8 illustrates the cooperation protocol of the CDAs.

Agent Cooperation Protocol between Function Domains
Since one agent forms merely an inaccurate picture of the whole MAS, the system will be tangled without cooperation between the individuals.In general, the purpose of cooperation is to fulfill the targets of agents furthest.Complied with cooperation, the interactive agents need to adjust their targets and corresponding behavior, especially regarding the utilization of resources, because the behaviors of multi-agents interfere with each other by all means to achieve common objectives.The basic content of cooperation concludes target cooperation, resource allocation, procedure cooperation, and result cooperation.In this study, the cooperation is depicted in our hierarchical architecture based on organization structuring, which defines the responsibility, capability, interaction, and control flow.Figure 8 illustrates the cooperation protocol of the CDAs.

Agent Collaboration Protocol in Individual Function Domain
The relationship between individual agents in a dedicated function domain is mainly collaborative, such as that between the monitor agent and repairs agent in the maintenance domain (please see Figure 3).The collaboration behaviors within a function domain emphasize that the domain has a unifying overall goal and is generally applicable to situations where the targets and intentions of each agent are consistent.Multi-agent collaboration can extend the application fields and improve the performance of individual agents and the overall flexibility of the system.Figure 9 shows an example of collaboration protocol in the logistics domain.It is worth mentioning that "collaboration" distinguishes from "cooperation" through the action definition of individual agents.Even though the CDAs in the upper hierarchy are granted a specific role to manage the subagents, they are still harmonized by the production agent.Therefore, such CDAs participate both in "collaboration" and "cooperation" activities.

Agent Collaboration Protocol in Individual Function Domain
The relationship between individual agents in a dedicated function domain is mainly collaborative, such as that between the monitor agent and repairs agent in the maintenance domain (please see Figure 3).The collaboration behaviors within a function domain emphasize that the domain has a unifying overall goal and is generally applicable to situations where the targets and intentions of each agent are consistent.Multi-agent collaboration can extend the application fields and improve the performance of individual agents and the overall flexibility of the system.Figure 9 shows an example of collaboration protocol in the logistics domain.It is worth mentioning that "collaboration" distinguishes from "cooperation" through the action definition of individual agents.Even though the CDAs in the upper hierarchy are granted a specific role to manage the subagents, they are still harmonized by the production agent.Therefore, such CDAs participate both in "collaboration" and "cooperation" activities.

Agent Collaboration Protocol in Individual Function Domain
The relationship between individual agents in a dedicated function domain is mainly collaborative, such as that between the monitor agent and repairs agent in the maintenance domain (please see Figure 3).The collaboration behaviors within a function domain emphasize that the domain has a unifying overall goal and is generally applicable to situations where the targets and intentions of each agent are consistent.Multi-agent collaboration can extend the application fields and improve the performance of individual agents and the overall flexibility of the system.Figure 9 shows an example of collaboration protocol in the logistics domain.It is worth mentioning that "collaboration" distinguishes from "cooperation" through the action definition of individual agents.Even though the CDAs in the upper hierarchy are granted a specific role to manage the subagents, they are still harmonized by the production agent.Therefore, such CDAs participate both in "collaboration" and "cooperation" activities.

Example of Agent Cooperation and Collaboration
An example is introduced to show how the MAS operates.After one routine sampling inspection, the quality agent delivers a report with quality related data as an attachment, which shows that one sampling from one machine of the production line is contingently out of tolerance.The production agent immediately starts an analysis using big data matching with the aid of a knowledge-based database and locks in a few potential factors (e.g., the machine and tool, the operator, the process, the environment, and the raw material) that might cause the quality problem.Then, the production agent will assign parallel tasks and collaborate with other CDAs: the quality agent will organize its subagents (analysis agent) to check whether the dimensions of the troubled batch raw material are qualified, and send the result back to production agent.The maintenance agent will organize its subagent to examine whether the machine geometry and the tools are in good condition, and send the feedback to the production agent.In the meantime, the report from the maintenance agent indicates that the bad conditions of machine geometry had caused the above problem.Then, the production agent will issue commands, and the machine will be halted for maintenance immediately.After the maintenance agent accomplishes the maintenance process, the adjusted samples will be transferred to the quality domain for dimension checking by the logistics agent.If all of the checking results from the different samples are stable regarding the tolerance and meet the standard, the production agent will organize the quality agent and maintenance agent to release the blocked parts and suspended the machine, respectively.Then, production resumes.

Competition Resolution Algorithm
Due to the distributed characteristics in intelligent manufacturing, competition among MASs with identical functionality is viewed always as a prominent factor for modern enterprises.For a collaborative manufacturing initiation system, it is vital to select the appropriate potential executors for the tasks.The evaluation of manufactural activity is the premise of making choices, and establishing a scientific evaluation index system is a good basis for evaluation.
The fuzzy comprehensive evaluation method (FCEM) [39] is a qualitative and quantitative system analysis method that has been widely extended in application fields of decision-making, prediction, and evaluation.In this study, FCEM is implemented as a tool for tackling the conflict problem caused by competition.The FCEM procedure is presented based on [40]: (1) A production task is claimed.A set of bid MASs B with k elementsand a set of evaluation arbiters E with n elements are created.
(2) A set of evaluation criteria C concerning E is constructed as: where C i specifies the key factors that impact the manufacturing system.
(3) The system builds up a set of weight coefficients W for the evaluation criteria as: (4) Each evaluation arbiter gives its estimation for a bid MAS according to the evaluation criteria C, and a fuzzy relation matrix R can be formulated as: where r ij specifies the evaluation score when the evaluation agent j (j = 1, 2, 3, . . ., n) evaluates the bid MAS based on evaluation criteria i (i = 1, 2, 3, . . ., m).
(5) The evaluation criteria can be based on quality, cost, and experience.So, an evaluation grade set is established by: where v 1 -worse; v 2 -bad; v 3 -normal; v 4 -good; and v 5 -better.(6) Establish a fuzzy set: where b j (j = 1, 2, 3, . . ., n) reflects the status of comment v j in the comprehensive evaluation, and B relies on the weight of each factor: (7) Applying the fuzzy operator model (•, ∨) expressed as: The final evaluation V i for the MAS i can be derived with the help of the maximum degree of the membership method.
(8) Repeat steps ( 4) to (7) to obtain the evaluation for all the MASs.( 9) Compare all the evaluations and choose the optimal one.(10) End.

Case Study 1: Simulation of the Proposed VME
In this section, a network simulation software eNSP ® (open source) is applied to construct a virtual production system containing 20 virtual machines as infrastructures, four gateways as edge computing actuators, one wireless access as cloud connectivity, and one PC terminal as the central processing unit.Table 1 lists the basic events that occur in manufacturing, where data packages and messages are transmitted through networks that interconnect the global system.The network transceivers are organized through triggering the events in intensive intervals.Recovery activities denote the event-handling procedures where multi-agents collaborate to resolve the predicament that occurred.The event-handling procedure consumes a huge amount of bandwidth due to the multirole coordination across different function domains.In the simulation, three architectures are tested.They are cloud architecture, edge architecture without MAS, and edge + MAS architecture.Figure 10 demonstrates the simulation results.The X and Y coordinates specify the time and average throughput of the networks, respectively.As can be seen in Figure 10, at the beginning of the production, the overall throughput proliferated until reaching the normal production state.This indicator is impacted after triggering the abnormal events.Especially when the network suffers from sampling inspection failure and machine breakdown issues asynchronously (overlap area), the throughput capacity of the two edge-based architectures exhibit better tenacities.The results show that the two edge architectures have overcome the cloud architecture in offloading data processing.Compared with cloud-based architecture, the average throughput has been improved by more than 50% when applying the edge architectures.This could be attributed to the distributed characteristics of edge computing.On the other hand, among two edge architectures, the proposed edge + MAS architecture has also shown superiority over the normal one.The phenomenon can be attributed to the efficient autonomy provided by the MAS. Figure 11, the tasks are allocated through a private cloud; the robots grasp the boxes and put them in the warehouse separately.Since the edge nodes work independently, the competition resolution algorithm for the MAS that was introduced in Section 4.4 is also appropriate for them.In case one edge node fails to work or is overloaded, the tasks from this node will be handed over to another idle node intelligently.Through this method, the tasks are accomplished with a self-organized mechanism.
FOR PEER REVIEW 15 of 19 also considered as the actuators of the production agent.The experimental platform is shown in Figure 11.As can be seen in Figure 11, the tasks are allocated through a private cloud; the robots grasp the boxes and put them in the warehouse separately.Since the edge nodes work independently, the competition resolution algorithm for the MAS that was introduced in Section 4.4 is also appropriate for them.In case one edge node fails to work or is overloaded, the tasks from this node will be handed over to another idle node intelligently.Through this method, the tasks are accomplished with a self-organized mechanism.In the case study, the proposed self-organized mechanism is compared with the central handling processor, i.e., the central allocation mechanism.The estimation indicators are the robot operation time and the average upload speed of the backbone network speed.The results are shown in Figure 12.As can be seen from Figure 12a, with the increment of order quantity, the self-organized mechanism has shown more efficient characteristics than the central allocation mechanism.In Figure 12b, after the production line becomes stable, the upload speed of the backbone network based on the central allocation mechanism has reached 6-8 Mb/s.This value has been reduced by more than 50% by the self-organized mechanism.It indicates that the MAS with the competition resolution algorithm can schedule the tasks dynamically in an IoT-based environment.In the case study, Raspberry Pi is granted permission to implement the data fusion and information interaction with the production partners.Owning to the deployment of the edge network and MAS, the service delay is reduced, and the data transmission congestion is avoided.In the case study, the proposed self-organized mechanism is compared with the central handling processor, i.e., the central allocation mechanism.The estimation indicators are the robot operation time and the average upload speed of the backbone network speed.The results are shown in Figure 12.As can be seen from Figure 12a, with the increment of order quantity, the self-organized mechanism has shown more efficient characteristics than the central allocation mechanism.In Figure 12b, after the production line becomes stable, the upload speed of the backbone network based on the central allocation mechanism has reached 6-8 Mb/s.This value has been reduced by more than 50% by the self-organized mechanism.It indicates that the MAS with the competition resolution algorithm can schedule the tasks dynamically in an IoT-based environment.In the case study, Raspberry Pi is granted permission to implement the data fusion and information interaction with the production partners.Owning to the deployment of the edge network and MAS, the service delay is reduced, and the data transmission congestion is avoided.
FOR PEER REVIEW 15 of 19 also considered as the actuators of the production agent.The experimental platform is shown in Figure 11.As can be seen in Figure 11, the tasks are allocated through a private cloud; the robots grasp the boxes and put them in the warehouse separately.Since the edge nodes work independently, the competition resolution algorithm for the MAS that was introduced in Section 4.4 is also appropriate for them.In case one edge node fails to work or is overloaded, the tasks from this node will be handed over to another idle node intelligently.Through this method, the tasks are accomplished with a self-organized mechanism.In the case study, the proposed self-organized mechanism is compared with the central handling processor, i.e., the central allocation mechanism.The estimation indicators are the robot operation time and the average upload speed of the backbone network speed.The results are shown in Figure 12.As can be seen from Figure 12a, with the increment of order quantity, the self-organized mechanism has shown more efficient characteristics than the central allocation mechanism.In Figure 12b, after the production line becomes stable, the upload speed of the backbone network based on the central allocation mechanism has reached 6-8 Mb/s.This value has been reduced by more than 50% by the self-organized mechanism.It indicates that the MAS with the competition resolution algorithm can schedule the tasks dynamically in an IoT-based environment.In the case study, Raspberry Pi is granted permission to implement the data fusion and information interaction with the production partners.Owning to the deployment of the edge network and MAS, the service delay is reduced, and the data transmission congestion is avoided.

Case Study 3: Conflicts Resolution
This example is designed to verify the feasibility and efficiency of the FCEM introduced in Section 4.4.Suppose that two MASs bid for a production task.To be short, they are denoted as MAS 01 and MAS 02.The bidding process and evaluation procedure are expressed as follows: ( (4) The single evaluation matrices for bidding MAS 01 and 02 can be generated as follows: (5) The fuzzy comprehensive estimation matrices for MAS 01 and MAS 02 can be derived through Equation ( 7 (6) In accordance with maximum membership principle and Equation ( 5), the MAS 01 is evaluated as the best solution, while MAS 02 is the better one.MAS 01 is awarded the tender, and will carry on the production task.

Conclusions and Future Work
This study presents a proposal of VME characterized by MAS and edge computing in optimizing the rigid system configuration of a manufacturing environment and its computing mode.The MAS-based framework can improve the operation performance of the manufacturing environment, while edge computing demounted the computing load.Moreover, the communication channel between networks is provided using the edge computing technique.The protocols for agent interaction are designed to create a collaborative operation of the MAS.Finally, the simulation with throughput as an evaluation indicator is implemented to verify the superiority of the proposed edge + MAS architecture over the cloud-based architecture and edge-based architecture.The case study is applied with a prototype platform to show the effectiveness of the proposed architecture.The resolution algorithm designed for the competition of MASs is also proven to be feasible.
Although the MAS has realized the self-organized mechanism in task allocation, the allocation of computing resources is not a concern in this study.It is better to allocate the computing resource in a dynamic way so that the network system will always keep a dynamic balance during the manufacturing procedure despite any emergencies.Future works aim at designing a flexible architecture that allocates the computing resources and bandwidth dynamically with the view of carrying the cost-down project.Besides, the definition mechanism for agent type is relatively rigid, efforts need to be attempted to make the system adapt to the complicated and changeful environment freely.Moreover, as a research hotspot, the combination of fog computing with a MAS in a manufacturing environment is considered.

Figure 1 .
Figure 1.Overview of the virtual manufacturing environment (VME) architecture.

Figure 1 .
Figure 1.Overview of the virtual manufacturing environment (VME) architecture.
the communication and interaction are implemented on the centralized platform, the user interaction layer is virtually a cloud-based application layer.

Figure 2 .
Figure 2. Cooperation framework of the system layer.

Figure 3
Figure 3 schematically demonstrates the system layer under the development of a MAS-based framework.The framework also specifies a domain-based hierarchical structure.The MAS is equipped with a set of intelligent agents (production agent, quality agent, logistics agent, and maintenance agent) that regulate their subagents in each respective domain.There are two hierarchies.In the first hierarchy, the quality agent, maintenance agent, and logistics agent collaborate with each other and are harmonized by the production agent for achieving a common production target.These four intelligent agents own the capabilities of data processing, aggregation, and storage, and can act as an edge server (intelligent gateway).With the features of intelligent gateways, the agents realize the protocol transformation between different types of perceptual networks and communication networks both in WAN and LAN.According to the categories in[35], and taking the functionality into account, they are designed as a kind of hybrid collaborative and deliberate agent (CDA) whose structure is presented in Figure4as an example.A CDA consists of database module, repository module, control module, and communication interface module.It can be abstracted using a four-tuple:

Figure 2 .
Figure 2. Cooperation framework of the system layer.

Figure 3
Figure 3 schematically demonstrates the system layer under the development of a MAS-based framework.The framework also specifies a domain-based hierarchical structure.The MAS is equipped with a set of intelligent agents (production agent, quality agent, logistics agent, and maintenance agent) that regulate their subagents in each respective domain.There are two hierarchies.In the first hierarchy, the quality agent, maintenance agent, and logistics agent collaborate with each other and are harmonized by the production agent for achieving a common production target.These four intelligent agents own the capabilities of data processing, aggregation, and storage, and can act as an edge server (intelligent gateway).With the features of intelligent gateways, the agents realize the protocol transformation between different types of perceptual networks and communication networks both in WAN and LAN.According to the categories in[35], and taking the functionality into account, they are designed as a kind of hybrid collaborative and deliberate agent (CDA) whose structure is presented in Figure4as an example.A CDA consists of database module, repository module, control module, and communication interface module.It can be abstracted using a four-tuple:

FOR PEER REVIEW 7 of 19 Figure 3 .
Figure 3. Schematic description of multi-agent architecture.

FOR PEER REVIEW 8 of 19 Figure 5 .
Figure 5. Exemplary structures of reactive agents.

( 2 )
Quality domain: The quality agent takes the overall responsibility of quality assurance through cooperating with the two subagents.Work refers to the quality assurance carried out on-site and mainly includes a pretest, sampling inspection, and emergency measures.The quality agent acquires quality data along the production cycle.The analysis agent is in charge of the measuring output and the follow-up analysis.It gives a necessary quality warning when an abnormal event occurs.The assurance agent decides how to handle the nonconforming products based on the quality handling knowledge, e.g., blocking, reworking, scraping, or releasing.(3)Maintenance domain: The maintenance agent has two subagents: a monitor agent and a repairs agent.The monitor agent executes the data acquisition from several sensors in the IoT environment.The status of equipment such as wear, tear, damage, collision, and other abnormality are detected through analyzing equipment data.Consequently, proactive maintenance and breakdown identification can be implemented.The repairs agent disposes of the repair and spare parts information, and interconnects with the maintainer on site.If a maintainer intends to change one spare part for a device, he will invoke the database in the repairs agent with the help of radio frequency identification (RFID) or another embedded platform to retrieve the available substitutes.The maintenance agent manages the performances of two subagents and assists the production agent around the lead-time.(4) Logistics domain: The logistics agent consists of two subagents.The transfer agent supplies the resources such as purchased parts and self-making parts through routing inspection for achieving a dynamical resource allocation.Due to the distributed manufacturing locations and inhomogeneous tasks that originate from customer demand, artificial intelligent algorithms are employed by the transfer agent to obtain the best routing planning.The resource agent

( 2 )
Quality domain: The quality agent takes the overall responsibility of quality assurance through cooperating with the two subagents.Work refers to the quality assurance carried out on-site and mainly includes a pretest, sampling inspection, and emergency measures.The quality agent acquires quality data along the production cycle.The analysis agent is in charge of the measuring output and the follow-up analysis.It gives a necessary quality warning when an abnormal event occurs.The assurance agent decides how to handle the nonconforming products based on the quality handling knowledge, e.g., blocking, reworking, scraping, or releasing.(3)Maintenance domain: The maintenance agent has two subagents: a monitor agent and a repairs agent.The monitor agent executes the data acquisition from several sensors in the IoT environment.The status of equipment such as wear, tear, damage, collision, and other abnormality are detected through analyzing equipment data.Consequently, proactive maintenance and breakdown identification can be implemented.The repairs agent disposes of the repair and spare parts information, and interconnects with the maintainer on site.If a maintainer intends to change one spare part for a device, he will invoke the database in the repairs agent with the help of radio frequency identification (RFID) or another embedded platform to retrieve the available substitutes.The maintenance agent manages the performances of two subagents and assists the production agent around the lead-time.(4) Logistics domain: The logistics agent consists of two subagents.The transfer agent supplies the resources such as purchased parts and self-making parts through routing inspection for achieving a dynamical resource allocation.Due to the distributed manufacturing locations and inhomogeneous tasks that originate from customer demand, artificial intelligent algorithms are employed by the transfer agent to obtain the best routing planning.The resource agent formulates reasonable inventory rules for all the resources that circuit between the logistics system, and takes the responsibility of connecting with suppliers and customers for buffer balance.Since modern Energies 2019, 12, 2815 9 of 19

Figure 6 .
Figure 6.Schematic description of the network communication channel.

Figure 6 .
Figure 6.Schematic description of the network communication channel.

Figure 7 .
Figure 7. Agent communication mechanism within a multi-agent system (MAS).

Figure 7 .
Figure 7. Agent communication mechanism within a multi-agent system (MAS).

Figure 8 .
Figure 8. Cooperation protocol of the collaborative and deliberate agent (CDAs).

Figure 9 .
Figure 9. Collaboration protocol within logistics function domain.

Figure 8 .
Figure 8. Cooperation protocol of the collaborative and deliberate agent (CDAs).

FOR PEER REVIEW 11 of 19 Figure 8 .
Figure 8. Cooperation protocol of the collaborative and deliberate agent (CDAs).

Figure 9 .
Figure 9. Collaboration protocol within logistics function domain.

Figure 9 .
Figure 9. Collaboration protocol within logistics function domain.

Figure 11 .
Figure 11.Experimental platform of the case study.

Figure 12 .
Figure 12.Experimental comparison of the task allocation mechanisms using indicators: (a) operation time; (b) average upload speed.

Figure 11 .
Figure 11.Experimental platform of the case study.

Figure 11 .
Figure 11.Experimental platform of the case study.

Figure 12 .
Figure 12.Experimental comparison of the task allocation mechanisms using indicators: (a) operation time; (b) average upload speed.

Figure 12 .
Figure 12.Experimental comparison of the task allocation mechanisms using indicators: (a) operation time; (b) average upload speed.
is employed to resolve such problems.It maps the physical machines distributed in scattered geographical