Copyright © IFAC Control of Industrial Systems, Belfort. France. 1997
RESOURCE ALLOCAnON IN THE HOLONIC MANUFACTURING SYSTEM AT K.U.LEUVEN
Jo Wyns, Paul Valckenaers, Hendrik Van Brussel
Katholieke Universiteit Leuven Celestijnenlaan 300 B B-3001 Leuven. Belgium Email:
[email protected] http://www.mech.kuleuven.ac.be/pma/pma.html
Abstract: Dynamic resource allocation is an important task within next generation manufacturing control systems. Since the problem is crucial to the correct functioning of the manufacturing system, a generic and reusable concept is preferred. A deadlock prevention mechanism based on sequential numbering of the resources is adopted from computer science research. The entitlement to resources is an extension of this basic mechanism to increase the potential resource utilisation rate. More advanced resource allocation mechanisms can be introduced into the system by using the concept of aggregated processes (teams) and aggregated resources (domains). The presented deadlock avoidance concepts are being implemented in the prototype holonic manufacturing system currently under development. Keywords: resource allocation, deadlock, holonic manufacturing systems, manufacturing systems.
Because traditional manufacturing systems perform poorly outside their nominal operating conditions, the division PMA of the Katholieke Universiteit Leuven currently undertakes long-term research on Holonic Manufacturing Systems (HMS) aiming to develop novel manufacturing control systems that are able to cope with production change and disturbances both effectively and efficiently.
1. INTRODUCTION Manufacturing systems today are increasingly exposed to changes and disturbances. Changes are the result of intentional actions, e.g. the introduction of new products to survive in a competitive market, the move toward more customised products to safeguard profit margins, and the introduction of new production equipment and technology in the factory to comply with more stringent environmental legislation. Disturbances refer to non-intentional variations, like equipment failure, late component deliveries, and lower-than-expected yields. Changes and disturbances are sources of uncertainty which the manufacturing control system has to cope with.
The present paper starts with a short discussion on the need for dynamic resource allocation and the research background in holonic manufacturing systems. Next, it selects and adapts a resource allocation mechanism from available literature. Finally, extensions to this mechanism are discussed.
1353
control system, and for more flexibility and a larger decision space for higher control levels. More background on this research can be found in (Van Brussel, et at. 1996; Van Brussel, et at. 1995).
In the context of this paper, resources are an abstraction for the production means, and processes are abstraction of order holons. Examples of manufacturing resources are machines, furnaces, pallets, components, raw materials, tools, tool holders, personnel, energy, floor space, conveyors, pipelines, computer memory space, material storage capacity, etc. Order holons are active entities (agents) issuing commands to the resources (Bongaerts, et aL. 1996).
The development of this architecture follows an evolutionary development approach: first a simple prototype systems is based upon mature concepts. Next, this system is made to evolve into more powerful and more complex systems by incorporating new -more advanced- concepts. This approach is illustrated in this paper in the development of a deadlock avoidance mechanism: First a simple resource allocation policy (sequence numbering of resources) is elaborated. Next, this basic mechanism is extended to evolve into a more powerfull system (entitlement, aggregated processes, aggregated resources). These extended systems are require more knowledge about the processes and resources.
Although, the given examples will refer to the manufacturing context, the presented resource allocation concepts are equally applicable to other domains. 1.1
Dynamic resource allocation
Within conventional mass production systems (consider for instance transfer lines), the resources are allocated in a static manner. Most allocation is implicit through the physical structure of the manufacturing plant; tools are not mobile but remain with a single machine; products, components and raw materials follow a fixed route through the system. The remainder of the resource allocations follow a predetermined plan (e.g. controlled by a pull mechanism).
Another design principle applied in the HMS prototype development is separation of concerns to keep subsystem complexity manageable. The allocation of resources to processes compreses two aspects which are explicitly separated: the resource utilisation optimisation aspect (scheduling) and the the deadlock prevention aspects. For details on the scheduling aspects, the reader is referred to (Bongaerts et al. 1995). Since scheduling will often require heuristics, often customised solutions will be developed. On the other hand, deadlock prevention is crutial to the correct functioning of the manufacturing system, so proven reliable methods should be used. Avoiding customisation by using generic, widespread solutions enfavours the quality of the system.
Today's pressure to face uncertainty forces resource allocation to become an online function. This online dynamic resource allocation shall, for instance, pennit the manufacturing control system to contend with equipment failure by allocating alternative resources, or to handle variations of demand within the product mix by using processing alternatives imposing different demands upon the available resources (thus minimising contention). The manufacturing control system shall enforce an appropriate resource allocation policy to ensure that the manufacturing system stays out of forbidden states. Important categories of states forbidden states are deadlock. starvation or repetitive exclusion, repetitive change over (trashing) and certain types of races. The control policy must prevent the system from entering such states under normal operating conditions. Moreover, even when uncontrollable events go beyond the safety margins imposed by the control policy (e.g. multiple tool failures, out-of-spec process yields), the control system shall manoeuvre the system out of the undesirable state at reasonable/minimal cost. Amongst these pathological system states, deadlock is a prominent one. Deadlock prevention is the central issue of this paper.
2. RESOURCE ALLOCAnON MECHANISM There is an important trade-off concerning resource allocation control: policy complexity versus policy restrictiveness. Simple control policies are more restrictive and tend to forbid resource allocations unnecessarily. This may prevent optimal resource utilisation. To avoid this, more complex policies are used, requiring more detailed knowledge of the systems. In industrial practice, brute-force methods are quite common. Often, all-or-nothing allocation is used; all required resources need to be available before processing starts. Evidently, this may result in poor resource utilisation; companies may need to buy more tools earlier than strictly necessary. With the trend towards small volumes of short-lived customised products, this problem becomes worse; where a company bought its tools too early in the past, it may be buying too many tools today, compared to a situation with a more suitable control policy. Today, companies will solve the worst problems in this respect by delegating the resource allocation to skilled person-
1.2 Research background PMAlKULeuven is investigating the Holonic Manufacturing Systems concept (HMS), aiming to develop next-generation manufacturing systems. The HMSarchitecture strives for easy (self)-configuration, easy extension and modification of the manufacturing
1354
nel; this is only a solution for high-value resources that are allocated at relatively low frequency.
•
Academic research on the control of discrete-event dynamic systems (DEDS) represents the other extreme. They typically aim to generate maximally pennissive controllers (e.g. Krogh and Holloway. 1991), which safeguard resource utilisation completely. These controllers will not impose any unnecessary constraints with respect to the forbidden states and the controllability of the state transitions of the manufacturing system. There are however a number of unsolved problems related to the research results and to the research approach: The generation of the maximally permissive controller for realistic examples suffers from combinatorial explosion; the approach does not address the problem of manoeuvring out of a forbidden state; the generated control system is unique!, so explicit validation is essential. Finally, a maximally-pennissive resource allocation policy is unlikely to offer added value compared to a welldesigned less-pennissive policy since near-deadlock situations are often unattractive regarding system utilisation.
Any method which guarantees that one of the above conditions does not hold, is a valid solution to tackle deadlock. The method which is most suited 2 to the manufacturing context, is the deadlock prevention mechanism which prevents that processes can enter into a circular waiting. It is based on a system-wide numbering order imposed on the resources; each resource has a unique sequence number. To prevent deadlock, the allocation mechanism uses the following rule: "no process shall wait for the allocation of a resource with a given sequence number while holding resources with higher sequence numbers." Due to the sequence of requesting resources, the protocol does not induce the danger for starvation of processes requesting scarce resources. The proper assignment of the sequence numbers to the manufacturing resources will safeguard the utilisation rate of the resources. For instance, in a machine shop, the product carriers will typically have the lower numbers, machines will have intennediate numbers, and tools/probes and operator intervention have the highest numbers.
In view of the above, the research at PMAlKULeuven investigates traditional deadlock prevention methods - discussed below - that are significantly more permissive than the static or brute-force dynamic methods in industry, and that avoid the fundamental problems of the approaches in academic research on the control of discrete event dynamic systems. This section presents the basic deadlock prevention mechanism and three extensions which enable the system to be less restrictive. 2.1
2.2 Entitlement to resources The entitlement to resources is a first extension to the basic resource allocation mechanisms. Up to now, "resource" referred to a physical production resource in the factory. By introducing an abstract resource representing rights upon a physical resource, the system allows a higher utilisation rate of the physical resources. An "entitlement resource" represents the warrant that the corresponding physical resource will not get involved in a deadlock and will become available to the process having the entitlement. This allows a process to postpone the allocation of the physical resource, which allows other processes to use the physical resource on the condition they can release the resource without having to acquire additional resources (to avoid circular waiting).
Basic deadlock prevention method
The danger for deadlock arises whenever multiple active processes (customer orders, machining jobs, ...) compete for resources (tools, machines, ...). In computer science research, the deadlock problem has been studied extensively (Peterson and Silberschatz, 1985). Following four conditions need to be fulfilled simultaneously for deadlock to occur: •
• •
Circular wait: closed chain of processes in which each process is waiting for a resource held by the next process in the chain.
The definitions and the rules to be applied in the system can be fonnally specified as follows:
Mutual exclusion: at least one resource is held in non-sharable mode; only one process at a time can use the resource. No pre-emption: a resource can only be released voluntarily by a process Hold and wait: a process is holding a resource while waiting to acquire additional resources.
First, following sets are defined: • •
1 Note that the DEDS controller typically must be regenerated when the underlying system changes; sometimes even when the production mix or production load changes.
P ={ Ph P2, ... Pm}; P is the set of processes in the system. ER ={erj, er2, ... er m}; ER is the set of entitlement resources in the system.
2 (Wyns, et al. 1996) gives a detailled motivation for selecting this method as the basic scheme to prevent deadlock in manufacturing systems 1355
• •
={
directly request allocation of the physical resource without acquiring the entitlement. In either case, when the physical resource is allocated to a process, the process may release (de-allocate) the entitlement resource only when it is able to release the physical resource without needing to wait for additional resources.
PR prJ, pr2, ... prm }; PR is the set of physical resources in the system. R = PR u ER. The symbol rj E R denotes either prj or eri for all i.
Next, the functions H, W, F and G are defined: H x: a process holds a resource H: (PxR) ~ B; V x, i: H x (ri) = true <=:} rj is allocated to Px, rj cannot be pre-empted from Px, and Px cannot release rj without acquiring additional resources
The entitlement resources increase the potential utilisation rate of the physical resources without giving in on the safety, nor on the general applicability of the resource allocation scheme.
W x: a process waits for a resource W: (PxR) ~ B; V x, i: Wx(ri) =true <=:} Px is requesting the allocation of ri, and Px will wait until he acquires rj
An example from a job shop machining plant may illustrate the concept. An operation on an order typically needs following resources: a pallet, clamping equipment, a workstation, tool holders, tools, and an operator. Fig. I shows the Gantt-chart of the resource needs for a typical milling job. Note that the measuring probe (RS) is needed during set-up and before the finishing step.
F: gives the sequence number of an entitlement resource F: ER ~ N; Vi, j: (F(eri) = F(er) <=> (i =j). G: maps entitlement resources to physical resources G: PR ~ ER; V i: G(pri) = erj. Any processes Px and py in the system shall respect the following five resource allocation rules when holding resources and/or waiting for resources.
R6
(I) Mutual exclusion - a resource can be held by only
R5
one process at a time: V x, y, i: Hx(r;)
R4
~
-,Hy(rj)v(x
-.
Resources
=y)
_ _
R3
R2
(2) Ranking - Linear sequence for entitlement resources: V x, i, j: Wx(erj)I\Hx(eri) :=::) F(erj»F( erj)
RI T5 T6 T7 T8 T~ Timl RI: pallet, clamping equipment R2: NC-workstation R3: roughing tools R4: finishing tools R5: measuring probe R6: operator
T1 1'2 T3 T4
(3) When an process holds a entitlement resource, it may only wait for physical resources with higher ranking, unless the process already holds the entitlement for this physical resource. V x, i,j: Wx(pr)I\Hx(erj):=::) F(erj»F(erj)vHx(erj)
LEGEND:
(4) When a process holds a physical resource, it may only wait for an entitlement resource, if it holds the entitlement for the physical resource that it holds V x, i,j: Wx(er)I\Hx(pri):=::) Hx(erj)
Fig. I: Resources needed for a typical milling operation
(5) When a process holds a physical resource, it may only wait for another physical resource, if it holds the entitlement for the physical resource that it holds V x, i, j: Wx(prj)I\Hx(pr;) :=::) H x(erj )
With the resource allocation policy based on numbering of resources (l for RI up to 6 for R6), tools can be shared among orders. When two of these orders are being processed simultaneously, they want to share the operator, finishing tools, and measuring probe. For an order to start, it will request RI, R2, RS and R6 in this sequence. Although R5 is not needed until time T2, it will be allocated at T1 before allocating R6. Otherwise, to respect the numbering scheme, the order would have to release R6 (at time T2) before requesting RS. R6 is released at T3, and RS is released at T4.
The formal proof that this adapted resource allocation mechanism is deadlock free is omitted from this paper due to space limitations. As a result, a process can allocate a physical resource in two ways: (I) If the process cannot release the resource unconditionally, it has to acquire the entitlement of the physical resource. Having the entitlement resource, the process may request the physical resource when needed. (2) If the process can release the resource without waiting for additional resources, or the resource may be pre-empted, the process may
Using the entitlement resources, resource utilisation might be a little better. To start an order A, a reservation of R5 is taken at T1 before allocating R6. How-
1356
ever, R5 is not physically allocated to this order, so it can still be used by another order B on condition order B does not have to wait for additional resources. Therefore, order B may use R5 (between T6 and TI), while order A can already start its operation using R6.
If possible, the domain will grant the allocation of the resource to the process. Provided that the resource allocation mechanism inside the domain is deadlock free, deadlock cannot occur in the overall system. Neither circular wait involving only resource inside the domain, nor circular wait involving only resource outside the domain can occur. Also circular wait involving resource inside and outside the domain cannot occur: a process holding a resource from the domain cannot wait for resources with lower ranking than the lowest ranking in the domain; a process holding a resource with higher ranking than the highest ranking in the domain cannot wait for a resource from the domain.
2.3 Aggregated processes (Team) In specific cases, resource usage could be optimised by explicitly using a different resource sharing policy between a limited set of processes. This team of processes will act to the rest of the manufacturing control system as one single process requesting resources from the system. Internally, another resource allocation mechanism may be used to share the resource among the members of the team.
In the example of allocating floor segments for AGV systems, no single logical sequence can be derived out of the physical nature of the resources. A solution is to group the segments into a domain which uses a different deadlock avoidance mechanism. In this case, the banker's algorithm or the mechanism found in (Banazak, et at. 1990) offer a good alternative. The domain grants the allocation of a segment based upon the occupation of segments by other processes and the future needs for segments of these processes.
The team is an aggregated process, since the entire team is seen by the overall system as one single process. The aggregated process requests resources from the overall system using the above mentioned resource allocation rules, therefore deadlock cannot occur in the overall system. On condition the resource allocation mechanism used inside the aggregated process is safe, the entire manufacturing control system will remain deadlock free.
A more trivial example is a domain of identical resources: a process requests a specific resource from the domain, but the domain may decide to allocate an alternative resource for the process.
The resource allocation mechanism inside the aggregated process may be a slight variation of the concept used in the overall system (e.g. other ranking of resources), or it can be a totally different mechanism (e.g. a maximally permissive controller, or a resource scheduler taking time into account). To accomplish this, the different team members may need knowledge about each-others' resource needs and current status.
2.5 Future work The above techniques are currently used to develop a prototype manufacturing control system. It is the intention to apply this to a number of case studies during which the system may grow more complex when the need arises. During these case studies, the team will investigate:
2.4 Aggregated resources (Domain) Some types of resources are not compatible with the proposed deadlock avoidance mechanism because, e.g. no assignment of the sequence numbers corresponds to a natural sequence of requesting for resources. Typically, multi-direction transport systems -like AGV-systems- allocate the next floor segment along their driving direction before being able to release the occupied segment. If not all processes transport goods in the same direction, the sequence numbering of floor segments will prevent acceptable resource utilisation rates. Therefore, these resources can be grouped into a separate resource domain.
• • •
•
the impact of the deadlock prevention techniques on resource utilisation, the effect of failures, also beyond the normal safety margins, the complexity of the relationship between the resource allocations and the manufacturing processes (e.g. alternatives, uncertainties), deadlock issues beyond pure resource allocation (e.g. resource consumption, spatial constraints on allocation and de-allocation).
More specifically, the research team will investigate the allocation of abstract objects to handle more advanced deadlock prevention tasks. These abstract objects represent rights to, e.g. consume resources or use a resource during a specific time period. This fits within the evolutionary approach envisaged by the team.
A set of resources with successive ranking numbers can be regarded as one, aggregated resource, called a resource domain. This aggregated resource provides its own resource allocation interface and conceals the domain members from the overall manufacturing control system. When a process requests allocation of such member resource, the domain will map this request upon its internal resource allocation mechanism.
1357
Finally, the choice of a deadlock prevention subsystem based on comparatively simple techniques allows the development of a re-usable software component. The team aims to shape its solution into a software class library possibly augmented by a suitable design pattern (Gamma, et at. 1995).
Banaszak, Z. A., Krogh, B.H., Deadlock Avoidance in Flexible Manufacturing Systems with Concurrently Competing Process Flow, IEEE Transactions on robotics and automation, Vol. 6, No. 6, pp 724-734, December 1990 Bongaerts L., Valckenaers P., Van Brussel H., Wyns J. (1995). Schedule execution for a holonic shop floor control system. Proceedings of the ASI-95 of NOE on ICIMS (Advanced Summer Institute '95 of the Network of Excellence in Intelligent Control and Integrated Manufacturing Systems), ppI15-124, Lisbon, 24-28/6/1995. Bongaerts L., J. Wyns, J. Detand, H. Van Brussel, P. Valckenaers (1996). Identification of Manufacturing Holons. Proceedings of the European Workshop for Agent-Oriented Systems in Manufacturing, Berlin, 27-28/9/1996 Gamma, E., R. Helm, R. Johnson and J. Vlissides (1995), Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley. Krogh B.H. and L.E. Holloway (1991). Synthesis of feedback control logic for discrete manufacturing systems. Automatica, vol. 27, no. 4, 1991. Peterson J.L. and A. Silberschatz (1985). Operating System Concepts. Addison-Wesley. Van Brussel H., P. Valckenaers, F. Bonneville, L. Bongaerts and J. Wyns (1995). Architectural and system design issues in holonic manufacturing systems. Proc. 3rd IFAC Workshop on Intelligent Manufacturing Systems, Bucharest, 1995. Van Brussel H., P. Valckenaers, J. Wyns, L. Bongaerts, J. Detand (1996). Holonic Manufacturing Systems and IiM, ESPRIT Conference on Integration in Manufacturing, Galway, Ireland, 2-4 October 1996. Wyns J., P. Valckenaers, H. Van Brussel, L. Bongaerts (1996). Implementation of Resource Allocation in the Holonic Workstation Architecture. Proceedings of the Jst Europe-Asia congress on MECHATRONICS, pp680-685 , October 1-3, 1996, Besan~on, France
3. CONCLUDING REMARKS This paper addresses dynamic resource allocation in manufacturing systems with special attention to deadlock avoidance. Dynamic resource allocation is becoming increasingly more important for manufacturing control systems facing change and disturbances. Since this implies that resource allocations are decided on-line, control policies need to ensure that the manufacturing systems avoid pathological states, especially deadlock situations. The approach taken by the research team is situated between the industrial practice and academic DEDS research; the control policy in the HMS prototype is simpler than the DEDS maximally permissive controllers but significantly more subtle than industrial practice. The motivation for selecting a comparatively simple solution lies in the focus of the HMS research project; it studies the overall problem of developing a next-generation holonic manufacturing system. Therefore, the research must be able to address (important) issues not considered in more fundamental research on DEDS control theory (e.g. the evolutionary development of validated software solutions). Today, DEDS solutions are unable to provide suitable answers in this context. Future research consists of applying the deadlock prevention policy in case studies, elaborating the deadlock prevention subsystem as a system component, and eventually enhancing the subsystem to provide more advanced deadlock prevention services in co-operation with other holons/subsystems. 4. ACKNOWLEDGEMENT This paper presents research results obtained through work sponsored by the Concerted Research Action (GOA) on holonic manufacturing, by a specialisation grant of the Flemish Institute for Support of Scientific and Technological Research in Industry (IWT), and by Belgian Programme on Interuniversity Poles of Attraction by the Belgian State, Prime Minister's Office, Science Policy Programming. The scientific responsibility is assumed by its authors. REFERENCES Abstracts of PMA publications can be found at http://www.mech.kuleuven.ac.be/pma/pubs/pubs.html
1358