Simulation of Workflow Scheduling Strategies Using the MAST Test Management System Munir Merdan
Thomas Moser Dindin Wahyudin Stefan Biffl
Pavel Vrba
Automation & Control Institute Vienna University of Technology Vienna, Austria
[email protected]
Inst. of Software Technology & Interactive Systems Vienna University of Technology Vienna, Austria {tmoser, dindin, biffl}@ifs.tuwien.ac.at
Rockwell Automation Research Center Prague, Czech Republic
[email protected]
Abstract—Workflow simulation is an effective approach to investigate dynamic workflow scheduling and evaluate system performance. In this paper we report on a test management system for the evaluation of a range of workflow scheduling strategies based on multi-agent negotiation, where each resource agent performs local scheduling using dispatching rules. The newly developed test management system runs test cases on the Manufacturing Agent Simulation Tool (MAST), which provides comprehensive support for performance measurement and data analysis reporting. Keywords—scheduling strategies, MAST, automated simulation
I. INTRODUCTION Assembly systems have to cope with trends in manufacturing systems that increase system complexity characterized by many product variants, smaller lot sizes, and shorter product life cycles. These assembly systems should also be able to handle failure events, e.g., if a resource becomes unavailable or overloaded. Scheduling, defined as the allocation of resources over time to perform a collection of tasks [1], is a key feature for maximizing system output if appropriately selected and executed. Extensive research efforts have been spent on developing mechanisms to dynamically allocate the resources required to support production [2, 3]. However, the traditional centralized control approach, due its rigidity and centralized structure, suffers from the lack of flexibility and reconfiguration abilities especially if unexpected events occur, e.g., resources become unavailable, variations in job processing times, or sudden changes in task priorities. Moreover, the central unit could be also seen as a bottleneck, which may limit the capacity of the shop, and as a single point of failure, which can bring down the entire shop [4]. The multi-agent systems (MAS) approach, based on decentralized control architecture, has been suggested as an alternative to centralized control and scheduling [5]. MAS are composed of distributed heterogeneous units/agents, where each agent manages its own activities on the basis of its local state and the information (messages) received from other agents. The agent can supervise one or more physical entities (machine, tool, etc.) or functional manufacturing entities (order, product, task, etc.) [6, 7]. Each agent is responsible for maintaining its local scheduling as well as for supporting global system scheduling through coordination and interaction with the other agents. The advantages of MAS such as heterogeneity, modularity, flexibility and robustness against
failures seem especially appropriate for building complex systems [8]. In this work we employ MAS to study dynamic scheduling strategies with particular attention on parallel machine scheduling strategies. In parallel machine scheduling, there are n tasks that have to be allocated respecting a set of constraints (capacity, due date, processing time, etc.) to m machines, each of which running at its own speed. Our MAS assembly system is modeled as closed queuing transfer network with redundant paths, where each machine station connected to at least one transfer path (conveyor) can perform a particular operation. The order of tasks, which have to be accomplished to finish the product, is fixed and each product as well as the related tasks can have different due dates. Balancing the workload between parallel machines properly in such complex environments makes it possible to maximize the overall system throughput, minimizing the work in process, flow time and makespan at the same time [9]. The parallel machine scheduling problem has two separate aspects: resource allocation and task sequencing. Resource allocation concerns the assignment of tasks to appropriate machines that can handle such tasks, while task sequencing prioritizes the tasks assigned to a machine. Our approach is structured according to these aspects: (i) resource allocation that is based on the negotiation between agents and (ii) task sequencing based on workflow balancing and dispatching rules for machine agents. Significant research results have been reported in the field of parallel machine scheduling [10, 11]; agents in combination with dispatching rules have been tested for dynamic scheduling [12, 13, 14]; various agent architectures for dynamic scheduling in flexible manufacturing systems have been reported [15]. However, a main shortcoming of the scheduling approaches mentioned above is the exclusion of transportation times in their scheduling. We consider transportation as a relevant task because the transportation times between machines might be important when they are considerably longer than the machine processing times. Our approach introduces the product agent, whose main responsibilities are: (i) to send a call for proposals on tasks allocation to machine agents, (ii) to receive proposals for a particular task from the machine agents, (iii) to compare the proposals and to calculate the necessary transportation time to the machines taking in account also the processing time and the machine speed, and (iv) to finally allocate the tasks.
Figure 1: Overview of the MAST Test Management System.
As a suitable tool providing agent-based simulation support for our empirical study of scheduling strategies we have used the Manufacturing Agent Simulation Tool (MAST) developed by Rockwell Automation [16]. The MAST is calibrated to realworld hardware manufacturing components and thus can provide realistic transport information. Using MAST enabled us to (i) introduce additional features to the MAST machines such as speed, processing time and set-up times, (ii) set up a fixed order between separate parts of the product that have to be produced, and (iii) imitate the complexity of the real system in the simulation. Moreover, in order to assure that the established configurations meet overall requirements including system safety and functionality, a tool to measure system quality and performance has been developed and connected to the simulation. In our case the developed simulation has been used as an indispensable tool for tuning and validating the agents’ behavior and for testing a range of production scheduling algorithms. The simulation offers also the possibility to test different scheduling strategies much faster then in the real testbed. Moreover, the relations between different manufacturing parameters, such as throughput, tardiness, capacity, complexity of products assembled, could be established much more effective, at lower costs, and – what should not be underestimated – safer. The remainder of the paper is structured as follows. The multi-agent architecture and simulation features of MAST system are described in the second section. The third section presents the set of scheduling algorithms to be investigated. In the fourth section the performed test simulations are described and their results are elaborated in the fifth section. Section 6 concludes and outlines future work. II.
MULTI-AGENT ARCHITECTURE AND SIMULATION
The Manufacturing Agent Simulation Tool – MAST – has been developed by Rockwell Automation with the intent to introduce a simulation tool providing transparent demonstration of the advantages of the deployment of multi-agent systems paradigms in the industrial control domain. Particular attention has been paid on the material handling tasks where the redundant transportation paths and machines with overlapping capa-
bilities represent a perfect fit for the agent technology. From its initial prototype MAST matured into a comprehensive agentbased simulation and control solution providing a PLC-based interface for actual control of the real physical equipment. MAST is entirely implemented in Java and uses the opensource JADE agent platform as the agent development and runtime environment. The MAST system is composed of the following parts: 1. The library of agent classes representing basic material handling components like a storage, docking station, conveyor belt, diverter, and sensor. The behavior of each agent is aimed at the autonomous local control of the supervised manufacturing equipment and on mutual cooperation with the other (usually neighboring) agents on accomplishing the overall goals of the manufacturing plant. The tasks that need the cooperation of agents (based on message sending) is particularly transportation of a work piece from one machine to the other one while guiding it through the network of conveyors, properly reacting to failures of equipment, negotiation about scheduling, etc. 2. The simulation engine emulates the behavior of the physical system, particularly movement of the transported work pieces, triggering of the sensors of particular components, functionality of actuators (like switching of work pieces by diverters), etc. 3. The GUI provides transparent visualization of the simulation run where the user can observe the decisions made by agents about optimal routing of work pieces between machines, their reaction to failures in terms of alternative routing and dynamic rescheduling, etc. 4. The control interface implements a link between the agents and the simulation engine. Via this interface, agents are notified about activation of sensors in the simulated world and, vice versa, propagate their decisions to the virtual actuators. As one of the major PLC manufacturers, Rockwell Automation is aware of the demand for the integration of the agent technology with the current automation control and visualization architectures based on programmable logical controllers,
operator panels, SCADA systems, etc. Coupling the deployment of agents with the requirement for new generation control hardware is not a viable option. This is the reason why Rockwell pushes forward the architecture of combining the software agent responsible for high-level decision making with the lowlevel real-time control subsystem running on PLC and ensuring the real-time responsiveness and natural connectivity to the physical process. The unique control interface to link these two subsystems is based on sharing I/O data directly in PLC memory, so called data table. This same interface is also used in MAST to exchange control data between the agents and the simulation subsystem – the agents directly access the sensor and actuator values in the PLC. A simple replacement of the simulation subsystem in MAST with the real physical environment connected through the PLC I/O cards enables to use the MAST system and its agent-based control features for the real-life control of the physical manufacturing process. MAST has been successfully deployed for simulation of the packing cell in the Distributed Information and Automation Laboratory – DIAL (formerly known as CDAC) at the University of Cambridge [17]. The operations on the prototype production line include packing of customized gift boxes with any combination of three out of four available grooming items according to the user order. The packing is done by two Fanuc M6i robots that pick the raw items up from the four-verticalslots temporary storage units. The transportation is done via Montech conveyor track system with one major loop and two subsidiary loops leading to robots. The deployment of MAST involved extension of the agent library with a couple of new agents representing various manufacturing equipment like robots, docking stations, temporary storage units, gantry robots and rack storages. Particularly, the product agent representing a box to be packed has been implemented. This agent (one per product) coordinates the packing process – it proactively negotiates with the resource agents about providing particular operations, like unloading from rack storage, transportation, packing, etc., and about providing material resources (grooming items held in storage units) [18]. Another successful deployment of MAST in the manufacturing testbed at Automation and Control Institute (ACIN), Vienna University of Technology is presented in [7]. The MAST system has been used for physical control of the palette transfer system of the testbed consisting of 14 conveyor belts, 12 diverters, 4 docking stations and a number of sensors and stoppers. The conveyor system transports pallets carrying raw materials or products between the docking stations, where the shuttles are held until a particular manufacturing operation finishes. The I/O data are transferred via DeviceNet industrial communication network to a ControlLogix PLC where they were directly accessed by MAST agents controlling particular physical components. A failure scenario has been tested – after a conveyor has been failed (by turning off its drive), the conveyor agent notified its neighboring agents (representing for instance diverters or docking stations) that the conveyor is not available any more. Subsequently, the agents started to look for alternative routes for shuttles to avoid the broken area. MAST is also designed as a development environment with well-defined API that allows a developer to either extend the behavior of existing agent classes or to implement the new ones
with desired application specific behavior. This feature has been used to develop the MAST Test Management System (TMS), as shown in Figure 1, an extension of the original MAST system. The TMS uses the MAST system for automatically running pre-defined sets of test cases described in XML files. These test cases describe goals, strategies, and constraints: the products to assemble, assembly steps, the workflow scheduling strategy to apply, the number of pallets to use, and the duration of a production shift. For running a test suite, the MAST system is reset to a starting state, the XML file is parsed and the test cases are consecutively injected into the MAST system, which acts on the input parameters of the test cases to run the agent-based simulation and control system. Relevant events and result data (e.g., number of finished products, machine utilization rates) are measured using pluggable measuring methods and algorithms to the agents and then logged to an XML output file. This approach allows scheduling automated runs of a large number of systematic test case variations, resulting in comprehensive output data for statistical data analysis. In addition to the automated runs of test cases, the MAST TMS provides a generator for preparing a given number of systematically derived test cases, e.g., for evaluating the impact of the variation of one or more parameters in the simulation (e.g., with exhaustive enumeration of the parameter range or with statistical sampling). III.
SCHEDULING ALGORITHMS
We define a task as an activity that consists of resource allocation, transportation time to the machine and execution time of particular operations on the machine (including operation processing time, set up time, and handling time). However, as mentioned in the introduction, the parallel machine scheduling problem has two aspects: resource allocation and task sequencing. In our tests, we combined two scheduling strategies to handle this challenge: negotiation between the agents for resource allocation and dispatching rules for task sequencing. A. Negotiation between Agents Negotiation has been used for machine selection, if more than one machine can provide the same operation (parallel machine scheduling) for particular tasks. In such cases, the Product Agent (PA) asks machine agents (MAs) for offers on a particular task; then the PA receives proposals from MAs, the PA calculates the expected finishing time Ttasktotal and awards the task to the best bidder. The proposal from the MAs contains the expected finishing time of all already allocated operations Tallfinish to its machine. The Ttasktotal time is calculated as follows: Ttasktotal= Tallfinish+Toperationtime+Ttransporttime (1) where Ttransporttime is the transport time to the machine. Since the PA has a complete system overview, the PA can calculate the distances to particular destinations and corresponding transportation times needed. The PA can consider different processing speeds of machines in its calculation (see Figure 2).
Figure 2: Calculation of the task’s expected finishing time.
The main objective for applying the negotiation strategy was to balance the workload among the resources evenly. B. Dispatching Rules The dispatching rules have been used by MAs for sequencing the tasks allocated to their machines. Dispatching rules are extensively applied in manufacturing practice due to their simplicity, effectiveness, and their nature of an on-line algorithm [19, 20]. In our test, we created four scenarios in which MAs alternately use one of the following rules: (1) First Come, First Served (FCFS): The first allocated task is executed first. (2) Critical Ratio (CR) expressed as: CR =
Rt Pt
( 2)
where Rt is the remaining time from the current time to the due date and Pt is the total processing time needed for a particular product. A lower CR indicates that the task has a tighter due date or longer processing time. A task with a lower CR is given higher priority than tasks with higher CR. (3) Earliest Due Date (EDD) gives the highest priority to the task with the earliest due date. (4) Shortest Processing Time (SPT): The task with the shortest processing time is sequenced first. IV.
SIMULATION APPROACH
This section describes the steps performed to run the MAST simulation of the four dispatching rules. A total of 600 test cases was been generated with the TMS. Each test case consists of a workflow scheduling strategy (FCFS, CR, EDD, SPT), the number of pallets to use (5, 10, 15 and 20) and a workload of 40 orders. An order consists of a product type to be built and a randomly generated due date (defined in seconds) for the product. For simplicity reasons, three pre-defined product types were used, which differ in the number of machine operations and sub-products needed to assemble the final product; these product types are called simple, medium or complex products. The shift time for a test case was set to 10 minutes (600 seconds); this value was chosen in order to ensure that 40 randomly selected orders could not easily be finished without a proper workflow scheduling strategy (resulting in the need for the four basic dispatching rules used for the simulation).
………