Applying multi-agent systems to simulate dynamic control in flexible manufacturing scenarios

Size: px
Start display at page:

Download "Applying multi-agent systems to simulate dynamic control in flexible manufacturing scenarios"

Transcription

1 Applying multi-agent systems to simulate dynamic control in flexible manufacturing scenarios Rodrigo A. M. Braga *, Rosaldo J. F. Rossetti, Luís Paulo Reis, Eugénio C. Oliveira Artificial Intelligence and Computer Science Laboratory (LIACC) Faculty of Engineering, University of Porto (FEUP) Rua Dr. Roberto Frias, s/n Porto Portugal {rodrigo.braga, rossetti, lpreis, Abstract This paper reports on a simple application of autonomous agents that cooperatively work in a multi-agent system trying to efficiently handle control in flexible manufacturing scenarios. The focus of the paper is on the simulation of scheduling and dispatching algorithms for automated guided vehicles (AGV) in flexible manufacturing systems (FMS). The paper presents a basic design management system for parts transfer and production, in which agents cooperate through negotiation to improve their production and transportation efficiency. The system was implemented using the JADE framework and the results obtained through simulation suggested the developed system is flexible enough to perform a dynamic control as expected. It allowed balanced scheduling of tasks, for the machines on the shop floor, and enabled AGVs very flexible and efficient transportation. 1 Introduction Nowadays multi-agent systems (MAS) are being used in an increasingly wide variety of application areas, ranging from operational support and diagnosis, electronic commerce, manufacturing, information searching and filtering, planning and resource allocation, to service integration and many others. Agent-based technology, in the sense of distributed computing, is an area of emerging and increasing interest in the domain of complex systems design and analysis. The metaphor of autonomous agents can be seen as a real enhancement of the object oriented paradigm where objects become autonomous, proactive, perceptive and responsive with respect to their dynamic environments. Meanwhile, a large number of commercial agent management systems, for different purposes, are made available or are being developed [Wooldridge, 2002]. * The first author is financially supported by a PhD scholarship from CAPES, a Brazilian Government s agency for R&D. On the other hand, manufacturing companies are facing radical challenges. Worldwide competition, customers desires for exclusive and varying products in small quantities (mass customization), demand for higher quality and lower prices, increasing product complexity, faster delivery times, shorter product life cycle, as well as fast technological evolution and new environment protection regulations are just examples of demands faced up by manufacturing companies. Some of these changes have been foreseen before [CVMC et al., 1998]. However, their pace is much faster and more challenging than ever, which makes companies to recognize the need for flexible reconfiguration and agile adaptation as an important requirement in their daily life operations. The goal of this work includes the development of a simulation system for dynamic control of dispatching and scheduling of transport and production tasks in a system managing AGVs in FMS. To tackle such a problem, we devised a multi-agent system that was implemented in the JADE framework. This paper is organized as follows: section 2 briefly presents some concepts and works related to FMS and AGV systems that use the autonomous agent metaphor as the modelling approach. Section 3 describes the tools used in this work, whereas section 4 discusses on the development of the proposed multi-agent system. In section 5, we present some simulation results illustrating the potentials of the approach reported in this work, and we conclude the paper in section 6, emphasising main results and suggesting further developments. 2 Related concepts and works In the competitive world market, a product must have high reliability, high standards, customizable features, and low price. These challenging requirements have given a new impulse to all fields in the industrial sector, particularly the production arena. The need for flexibility has been temporarily satisfied at the assembly level. For example, several similar parts, differing from each other in few characteristics, such as colour and other small attributes, are produced in great quantities using traditional manufacturing lines, and then are

2 assembled together to produce smoothly different products. Unfortunately, this form of flexibility is unable to satisfy the increasingly differentiated market demand. The life cycle of complex products, such as cars, motorbikes, and so forth, has substantially decreased, and the ability to produce a greater range of different parts has become a strategic industrial leverage. Manufacturing systems have been evolving from line manufacturing into job-shop manufacturing, eventually arriving at the most advanced expression of the manufacturing system, that is to say the Flexible Manufacturing System (FMS) [McDuffie et al., 2001]. Considering the high level of automation and cost involved in the development of an FMS, all development phases of this technology are important in order to achieve the maximum utilization and benefits brought about by this type of systems. Considering this work is aimed at smart scheduling in FMS, we are not discussing further on other aspects in related areas, such as economical issues, comparisons between FMS and standard technologies, design of an FMS, and so forth, which, nonetheless, can be found in [McDuffie et al., 2001]. In this work we focus on dynamic scheduling and dispatching, as initially suggested in [Xiaomeng et al., 2002; Hoshino et al., 2005; Vidal et al., 2001]. In other words, no fixed schedule and dispatching strategy are obtained before the actual operations start. These terms are quite relevant to FMS, and are defined as follows. Scheduling is the process encompassing all the decisions related to the allocation of resources to operate over time in a certain domain. Dispatching is the process or decision of determining the next operation for a resource when the resource becomes available, as well as the next destination of a part when its current operation is finished. Yams, as reported in [Parunak, 1993], is a former implementation of a multi-agent system in manufacturing, which assigns an agent to each node in a control hierarchy (factory, cell workstation, and machine). According to [Maes, 1995], an agent is defined as a computational system that tries to fulfill a set of goals in a complex, dynamic environment. It can sense the environment through its sensors and act upon the environment using its effectors. Depending on the types of environment in which an agent inhabits, it can take many different forms. For instance, agents inhabiting the physical world are typically robots. Maes also suggests that an agent s goals can have many different manifestations. For example, they can be end goals or particular states of affair the agent tries to bring about, they can be a selective reinforcement or a reward that the agent attempts to maximize, they can be internal needs or motivations that the agent has to keep within certain viability zones, and so on. Some works described in the literature [Suesut et al., 2004; Barata and Camarinha-Matos, 2002; Ouelhadj et al., 1999; Ouelhadj et al., 1998] report on examples of intelligent manufacturing systems that apply the agent metaphor together with negotiation protocols. [Emelyanov, 2002] proposed the development of a new approach for designing a decentralized management system that performs the exchange of industrial resources based on the model of collective behaviour of intelligent agents. Their activities determine a required intelligent behaviour of the whole multi-agent system, which naturally emerges from their interactions. These agents realize the creation of some required types of resources and interchange them for reaching the global purpose of the production system. In this area, another work [Camarinha-Matos et al., 1997] presented an integrated hardware and software solution for a supervision and software maintenance system for industrial robot controllers integrated in welding lines. The methodology applied to integrate a system comprising more than 200 industrial robot controllers was presented and some implementation issues about the developed infrastructure were also discussed. In this work a multi-agent architecture was required to fulfil the requirements of the industrial shop floor. The same authors described other implementation approaches for a multi-agent shop floor control architecture supported by cooperation contracts designed to support agile manufacturing. The architecture proposed is based on the concepts of clustering, consortium, manufacturing components, manufacturing resource agents, agent-machine interfaces, and contracts, which are used to govern the skills brought to the consortium or cluster. The basic architecture for each agent is described and analysed, as well as the knowledge model and ontology used [Barata and Camarinha-Matos, 2002]. As suggested in [Ouelhadj et al., 1999], a totally distributed approach combining multi-agent architectures and a Multi-Contract Net protocol for a dynamic scheduling of flexible manufacturing systems presents some advantages, such as the possibility of scheduling several tasks at the same time, distributing the scheduling function over all the multi-agent architecture, real-time behaviour, processing the uncertainty of the environment, optimizing resources occupation rate and conflict resolution, which can be implemented in agent-based frameworks such as Jade. Conflict-free routing is another important problem to be addressed in AGV systems, in particular when they are bidirectional. [Breton et al., 2006] present a multi-agent approach that tackles this problem. The main idea of his algorithm is to consider an AGV as a reactive agent, whose goal is to reach a predefined destination without conflict with other moving AGVs. 3 The prototyping framework The main development tool used in this work was JADE (Java Agent DEvelopment framework). As reported in [Camacho et al., 2002], JADE presents a regular behaviour that fosters the implementation of multi-agent systems. The implementation of multi-agent systems using JADE is very easy and fast [Castelnuovo and Ferrarini, 2005; Vrba, 2003]. The tools that were used in this research work are described below. 3.1 The development environment In this work, JADE was used as the main development platform. It is a framework to develop multi-agent

3 systems in compliance with the FIPA specifications [Bellifemine et al., 2007]. It was chosen as the development platform mainly because it is open source, it has good support and documentation, it implements the FIPA Architecture, including the FIPA Agent Communication Language and FIPA protocols that saves programming time, it includes a suite of graphical tools that allows administrating and monitoring the activity of running agents, and finally a behaviour abstraction model, which is used to model the tasks that an agent is able to perform. Agents basically execute their behaviours according to their internal status and the messages (external events) they receive from other agents. The behaviours of our agents were implemented using this abstraction model. The main behaviours devised in our approach were extended from the Ciclic- Behaviour and the SimpleBehaviour. This work is based on a simple example reported in the JADE tutorial to illustrate the steps required to develop agent-based applications with JADE. The scenario considered in that example includes some agents selling books and other agents buying books on behalf of their users [Bellifemine et al., 2007]. 3.2 The negotiation protocol As for the negotiation between agents, the FIPA Contract Net Interaction Protocol was used. The FIPA Contract Net Interaction Protocol (IP) is a minor modification of the original contract net IP pattern (originally developed by [Davis and Smith, 1988]) in that it introduces rejection and confirmation communicative acts. In the contract net IP, one agent (the Initiator) takes the role of a manager who wishes to have some task performed by one or more other agents (the Participants) and further wishes to optimize a function that characterizes the task. This characteristic is commonly expressed as the cost, in some domain specific way, but could simply represent other performance measures such as the soonest time for a task completion, fair distribution of tasks, and so on. For a given task, any number of the Participants may respond with a proposal, whereas the rest will just refuse it. Negotiations then continue with the Participants that have issued some proposals [FIPA, 2000]. The representation of this IP is given in Figure 1, which is based on extensions to UML [Odell et al., 2001]. This protocol is identified by the token fipa-contract-net as the value of the protocol parameter of the ACL message. The Initiator solicits m proposals from other agents by issuing a call for proposals (cfp) act, which specifies the task, as well any conditions the Initiator is placing upon the execution of the task. Participants receiving the call for proposals are viewed as potential contractors and are able to generate n responses. Of these, j are proposals to perform the task, specified as propose acts. A Participant s proposal typically includes the preconditions that the Participant is setting out for the task, which may be the price, time when the task will be done, and so forth. Alternatively, i (meaning n j) Participants may refuse to propose. Once the deadline passes, the Initiator evaluates the received j proposals and selects agents to perform the task, when one, several or no agents may be chosen. The l agents of the selected proposal(s) will be sent an accept-proposal act and the remaining k agents will receive a reject-proposal act. The proposals are bound to the Participant, so that once the Initiator accepts the proposal the Participant acquires a commitment to perform the task. Once the Participant has completed the task, it sends a completion message to the Initiator in the form of an inform-done or a more explanatory version of this act in the form of an inform-result. However, if the Participant fails to complete the task, a failure message is sent. Readers are referred to [FIPA, 2000], where a more detailed explanation on the contract net protocol can be found. Figure 1: IP Diagram Such a simple approach has demonstrated to be effective for the initial premises of this work. Nonetheless, extensions to the contract net protocol have been published in the literature, adding more flexibility to the assignment of tasks, such as [Fischer et al., 1995; Aknine et al., 2004; Knabe, 2002; Weyns et al., 2007], which would certainly improve the performance of the present approach. They will be included in future developments. 4 The agent-based perspective of the system AGV systems and FMS environments are very dynamic in nature and thus need adequate control mechanisms to cope with the uncertainty inherent in their distributed tasks. In this work a multi-agent system (MAS) for controlling material transfer and machine task operation was developed. Some characteristics of this system include: The shop floor is represented by a square-shaped area, with machines of different types and AGVs moving between them (as depicted in Figure 2-a). Each type of machines is responsible to process a product; An agent (namely the order agent) is responsible for managing the production orders. It is in charge of

4 initiating the production and registering its end. To start the production, the order agent sends a message to a storage agent, which represents machines of type H. The sequence of production tasks is enclosed in the content of such a message. The order agent record this information in a table that is illustrated in Figure 2-b. This table is divided into three sub-tables, namely pending work, work in progress and finished work; Each one of the machines is represented by an agent. Whenever a machine finishes its process, it negotiates the part s transferring with the machines that are responsible for the following stages in the production process. The factors accounted for in the negotiation are the speed of production (task to perform/time) and state of the machine tool. Each machine presents different values for speed of production, whereas the machine tool is depreciated as it is used throughout life. After finding the winning machine in the negotiation process, the machine agent immediately starts a negotiation with the AGVs that are active in the system so as to find a better option to transfer the piece to the other machine. A machine agent also keeps a table with its tasks (which is shown in Figure 2-d). in a certain machine and Tmaq represents the remaining time before an exchange of the machine tool is needed. retcost(tprod) = Tprod Tmaq Tprod (1) Equation 2 is used to calculate the total cost of the task being negotiated, where RetCostTot represents the time to perform pending tasks. Cost = retcost Tprod + RetCostTot() (2) AGVs also are represented by means of agents. They are responsible for calculating the cost associated to transferring workpieces between machines. Such a cost depends on the distance to be transposed and the time for loading and unloading the workpiece, as given in Equation 3. In the equation, x represents the displacement in x, y is the displacement in y, Vel represents the velocity of the AGV agent, and RetCostTot(), in this case, is a function returning the remaining time to finish the current transferring. The AGVCost is then given by: AGVCost = x+ y Vel + RetCostTot() (3) After receiving a CFP, AGV agents send their proposal for part transferring. The transfer task of each AGV and the information on battery status are stored in an internal table, which is shown in Figure 2-c. Figure 3 depicts the sequence in which information on the production process of a workpiece is exchanged between agents. For a better understanding, we briefly explain the interaction below: Figure 2: Interfaces of the developed system As focus is primarily put on the simulation of scheduling and dispatching algorithms, some other issues are left outside the scope of this paper, such as AGVs movements and collisions. Other issues regarding environment modelling and its role to the interactions of agents will be addressed in the future, on the basis of concepts presented in [Weyns et al., 2007]. Equation 1 represents the cost for one operation, considering the depreciation of the machine tool, where Tprod represents the time needed to process the product Figure 3: Interactions among agents within the system 1. The user introduces an order of production in the table of an order agent; 2. The order agent sends a massage with all the information on the product to a store agent ( maq H ); 3. The store agent gets the material to load onto an AGV agent;

5 4. The store agent negotiates with other machines for the next steps of the production process. It searches for the next machine in accordance with the sequence of production; 5. After finding the next machine, it negotiates with an available AGV to perform the transfer; 6. The AGV agent transfers the workpiece to the destination machine; 7. The machine agent executes its operation, and step 4 up to 6 are repeated all over again; 8. In the case a machine agent has executed the last operation, then the workpiece is returned to the store agent; 9. The store agent then informs the order agent about this situation and finishes the production. Machine agents are basically composted of four cyclic behaviours and their task table. It has one behaviour for production selling service, another for production buying service, one behaviour for executing the production task, and finally one behaviour for transport buying service. The AGV agent, on the other hand, is composted of only two cyclic behaviours, one for transport selling service and another for movement. 5 Experiments and results To ease results demonstration, simulation experiments have been carried out with only two workpieces of four different products (namely P1 to P8). In this scenario four machines were used: two machines for operations of type A (named maq1 and maq11 ) and the two other for operations of type B (named maq2 and maq22 ). At this first stage, only two AGVs (named agv1 and agv2 ) have been used for parts transportation. Nonetheless, the framework can be easily extended, allowing other machines and AGVs to be instantiated in other scenarios. The products are produced in the following machine operation sequences: P1 and P2 - only operations of type A ; P3 and P4 - only operations of type B ; P5 and P6 - operations A and B respectively; P7 and P8 - operations B and A respectively. The sniffer agent, as the name itself suggests, allows tracking messages exchanged in a JADE agent platform. When the user decides to sniff an agent, or a group of agents, every message directed to or coming from that agent or group of agents is tracked and displayed in the sniffer agent window. The results yielded during the scheduling and dispatching processes for this scenario are shown in Table 1. It presents products sequence in the FMS with respective machine allocation and the AGV used for part transportation. To better understand, let us take product P2 as an example. P2 production is started by the order agent, who sends product information to the maq0 agent. Considering maq0 is the store or magazine, thus it can be seen as an Automated Storage and Retrieval Systems (AS/RS). In the next step, maq0 negotiates with next machine to perform following tasks, as well as the part transportation to the winner machine. This was represented by steps 3 and 4. In this example the winner machine was maq11 and the workpiece was transported by the winner AGV, namely agv1. We must bear in mind that maq11 e maq1 are responsible for operations of type A. In the following sequence, P2 returns to the store, transported by agv2. Finally, maq0 (the store or magazine) informs the order agent the production has terminated. Table 1: Sequence of production Table 2 presents the usage statistics for each machine and AGV in this scenario. It is also possible to see how often operations A and B were executed, as well as the number of transfers that have been carried out (agv1 transported pieces 14 times, whereas agv2 did only 6). The developed system also allows the generation of a production report. This report includes product code, sequence, and when production starts and finishes. 6 Conclusions Table 2: Production statistics This paper describes our approach for a multi-agent architecture where agents interact with each other on the basis of cooperation contracts to improve control in a shop floor environment. A classical contract net protocol is used for negotiating the next task an agent is to perform, as well as the associated transportation task, which demonstrated to be suitable to handle the dynamic nature of processes within Flexible Manufacturing Systems. Cost equations were devised and implemented within this system, allowing a distributed and balanced scheduling of machine tasks and the consequent im-

6 provement in controlling a shop floor environment, as we expected. Besides the balanced scheduling of tasks for machines on the shop floor, it also enables AGVs a very flexible and efficient transportation of workpieces. JADE allowed an easy and fast prototyping of the simulation scenarios and good results for the dynamic control problem were yielded through an approach similar to the one for the agents selling books and agents buying books principle. Albeit JADE supports a great number of agents to be simulated, it is also our intention to evaluate the scalability of the system. In further developments, we expect to implement and apply it not only for simulation purposes but also for real-time control scenarios. Another important improvement to be pursued in near future includes the comparison of the contract net protocol used in this first experience with other extensions, as mentioned in Section 3.2, as well as to benchmark it against such kinds of approaches. Emphasising the potential contribution of this research to real applications, we are now using ideas and concepts discussed in this paper to feature dispatching and scheduling abilities within intelligent wheelchairs in hospital environments, as part of the first author s PhD research project. References [Aknine et al., 2004] S. Aknine, S. Pinson, and M. F. Shakun. An Extended Multi-Agent Negotiation Protocol. Autonomous Agents and Multi-Agent Systems, 8(4):5 45, [Barata and Camarinha-Matos, 2002] J. Barata and L. M. Camarinha-Matos. Implementing a contract-based multi-agent approach for shop floor agility. IEEE Proc. 13th Workshop on Database and Expert Systems Applications, [Bellifemine et al., 2007] F. L. Bellifemine, G. Caire, and D. Greenwood. Developing Multi-Agent Systems with JADE. Indianapolis, IN: Wiley [Breton et al., 2006] L. Breton, S. Maza, and P. Castagna. A multi-agent based conflict-free routing approach of bi-directional automated guided vehicles. IEEE Proc. American Control Conference, [Camacho et al., 2002] D. Camacho, R. Aler, C. Castro, and J. M. Molina. Performance evaluation of ZEUS, Jade, and SkeletonAgent frameworks. IEEE Proc. Conference on Systems, Man and Cybernetics, [Camarinha-Matos et al., 1997] L. M. Camarinha-Matos, J. Barata, and L. Flores. Shopfloor integration and multiagent based supervision. IEEE Proc. Conference on Intelligent Engineering Systems, [Castelnuovo and Ferrarini, 2005] A. Castelnuovo and L. Ferrarini. Petri net models of agent-based control of a FMS with randomly generated recipes. IEEE Proc. 10th Conference on Emerging Technologies and Factory Automation, [CVMC et al., 1998] Committee on Visionary Manufacturing Challenges, Commission on Engineering and Technical Systems, National Research Council. Visionary Manufacturing Challenges for National Acad. Press, [Davis and Smith, 1988] R. Davis and R.G. Smith. Negotiation as a Metaphor for Distributed Problem Solving. Distributed Artificial Intelligence. San Mateo, CA: Morgan Kaufmann, [Emelyanov, 2002] V. V. Emelyanov. A decentralized management system based on multi-agent model. IEEE Proc. Conference on Artificial Intelligence Systems, [FIPA, 2000] FIPA. Communicative Act Library Specification. FIPA Specifications. FIPA. At (last visited: ). [Fischer et al., 1995] K. Fischer, J. P. Müller, M. Pischel, D. Schier. A Model for Cooperative Transportation Scheduling. Proc. 1st Conference on Multiagent Systems, [Hoshino et al., 2005] S. Hoshino, J. Ota, A. Shinozaki, and H. Hashimoto. Highly efficient AGV transportation system management using agent cooperation and container storage planning. IEEE/RSJ Conference on Intelligent Robots and Systems, [Knabe, 2002] T. Knabe, M. Schillo, and K. Fischer. Improvements to the FIPA Contract Net Protocol for Performance Increase and Cascading Applications. Proc. Workshop on Multiagent Interoperability, [Maes, 1995] P. Maes. Modeling adaptive autonomous agents. Artificial Life: an overview. The MIT Press, [McDuffie et al., 2001] E. L. McDuffie, M. Cristofari, F. Caron, M. Tronci, W. J. Wolfe, and S. E. Sorensen. Computer-Aided Design, Engineering, and Manufacturing - Systems Techniques And Applications. Computer Integrated Manufacturing, 2, [Odell et al., 2001] J. Odell, H. V. D. Parunak, and B. Bauer. Representing Agent Interaction Protocols in UML. Agent-Oriented Software Engineering. Springer, [Ouelhadj et al., 1998] D. Ouelhadj, C. Hanach, and B. Bouzouia. Multi-agent system for dynamic scheduling and control in manufacturing cells. IEEE Proc. Conference on Robotics and Automation, [Ouelhadj et al., 1999] D. Ouelhadj, C. Hanachi, B. Bouzouia, A. Moualek, and A. Farhi. A multi-contract net protocol for dynamic scheduling in flexible manufacturing systems (FMS). IEEE Proc. Conference on Robotics and Automation, [Parunak, 1993] H. V. D. Parunak. Autonomous Agent Architectures: a non technical Introduction. ITI, [Suesut et al., 2004] T. Suesut, V. Tipsuwanporn, P. Nilas, P. Remgreun, and A. Numsomran. Multi level contract net protocol based on holonic manufacturing system implementation to industrial networks. IEEE Conference on Robotics, Automation and Mechatronics, [Vidal et al., 2001] T. Vidal, B. Archimede, and T. Coudert. Distributed forward checking for scheduling in flexible manufacturing cells. IEEE Proc. 8th Conference on Emerging Technologies and Factory Automation [Vrba, 2003] P. Vrba. MAST: manufacturing agent simulation tool. IEEE Proc. Conference on Emerging Technologies and Factory Automation, [Weyns et al., 2007] D. Weyns, A. Omicini, and J. Odell. Environment as a first-class abstraction in multiagent systems. Autonomous Agents and Multi-Agent Systems, 14 (1): [Weyns et al., 2007] D. Weyns, N. Boucké, T. Holvoet, B. Demarsin. DynCNET: A Protocol for Dynamic Task Assignment in Multiagent Systems. SASO [Wooldridge, 2002] M. Wooldridge. An Introduction to MultiAgent Systems. John Wiley & Sons Ltd, [Xiaomeng et al., 2002] L. Xiaomeng, G. Tao, Y. YuPu, and X. Xiaoming. Multiagent AGVs dispatching system using multilevel decisions method. Proc. American Control Conference,