FORMALISING AN AGENT-BASED CONTAINER STACKING MODEL VIA PETRI NETS

FORMALISING AN AGENT-BASED CONTAINER STACKING MODEL VIA PETRI NETS

FORMALISING AN AGENT-BASED CONTAINER STACKING MODEL VIA PETRI NETS M. Kefi 1, O. Korbaa 2, K. Ghedira 1, P. Yim 2 1 Ecole Nationale des Sciences de l...

607KB Sizes 4 Downloads 62 Views

FORMALISING AN AGENT-BASED CONTAINER STACKING MODEL VIA PETRI NETS M. Kefi 1, O. Korbaa 2, K. Ghedira 1, P. Yim 2 1

Ecole Nationale des Sciences de l’Informatique Université de Manouba 2010 Manouba, Tunisie 2

Ecole Centrale de Lille BP 48, Cité scientifique, F59651Villeneuve d’Ascq, France

Abstract: Within the frame of combinatorial optimisation problem solving, particularly the one that concern scheduling in fluvial and maritime transport domain, we are interested in quay management of fluvial ports and precisely in the activity of loading of ISO containers within a barge. First, we present a multi-agent model dedicated to the stacking of containers while minimizing the number of done movements. Then, we propose an associated formalisation using Coloured Petri Nets. Such formalism is developed and is visualized via the environment software CPN-Tools. Finally, the use of such a formal method to express a multi - agent model for this class of problems will be briefly discussed. Copyright © 2006 IFAC Keywords: Combinatorial optimisation problem, Scheduling problems, Maritime transportation systems, Container terminal operations, transport delay minimization, agents, formal methods, Petri Nets, Software tools.

1.

INTRODUCTION

The improvement of customer service in fluvial or maritime ports constituted of container terminals becomes an important problem facing the big concurrence between ports. One of the measures of performance of this service is the berthing time of ships. This time is composed in major part of container loading and unloading time. To reduce loading duration, it is necessary to choose adequate storage slots either for the arriving containers or for the shifted containers after successive departures of others, in order to be loaded efficiently (minimization of the number of done movements) within a ship. This operation allying transfer, stacking and unstacking of containers is claimed to be an important problem among the decision problems met in container terminal (Vis and DeKoster, 2003) (Fig. 1). In literature, few studies are dedicated to this problem which is known by "Container Stacking Problem ". (Kim and Bea, 1998) proposed dynamic programming to attain an ideal configuration while minimizing the number of

containers to move and the follow-on travelled distance.

Unloading plan

Barge Arrival

Container Loading/ Unloading

Container transport

Stack

Inter terminal Transport

Other modalitie

Loading plan

Fig. 1. Processes at a container terminal The problem is divided into two sub-problems: Bay matching and move planning problem, and moving tasks sequencing problem. A mathematical model is used for the resolution of each of these subproblems. It is note worthy that (Kozan and Preston, 1999) used genetic algorithms in their study to reduce container transfer and handling times and thereafter the berthing time of ship at port quays.

An interesting work, propounded by (Kim and al., 2000), dealt with the problem of determination of the best storage slot for containers with the aim of minimizing the number of expected relocation movements in loading operation. They deployed the weight of the container as criteria to define certain priority between the different containers to be stacked in the storage yard. (Duinkerken and al., 2001) provided an empiric and comparative survey of the different strategies of container storage in a terminal port according to several parameters. Another work (Kim and Kim, 2002) proposed a cost model for determining the optimal storage position and the optimal number of cranes used for container handling. A recent work (Korbaa and Yim 2004) has described a model to determine in real time the best slot of an arriving container in the storage yard, while minimizing the number of the expected relocation movements at the phase of loading containers in a ship. It should be noted that these studies often used the above-mentioned mathematical models to solve the underlined problem. These models prove to be limited facing the complexity and the dynamicity of this problem. Besides, we observe that the multi-agent approach used in (Gambardella and al., 1998), (Rebollo and al., 2000) and (Henesey and al., 2003) is applied very insufficiently to solve the problem of container stacking. In this paper, we focus on the distributed resolution via the multi-agent systems. In fact, these systems prove to lend themselves to model phenomena in which the interactions between various entities are too complex to be apprehended by classic tools of mathematical modelling. Therefore, we set a multiagent model to solve a particular version of the problem of container storage. We refer to concepts that are exploited in a multi-agent context to solve Combinatorial problems by Ghedira (Ghedira and Verfaillie 1992), and in eco-solving method applied to solve the the Block world Problem (Ferber, 1995). The use of formal methods of specification to represent the multi-agent models seems to be the appropriate to analyze these virtual worlds that are often studied by simulation. Among the numerous formalisms that exist (Singh, 1999), we use the coloured Petri nets to represent a multi-agent model dedicated to the storage container activity in a fluvial. This paper is organized as follows: Section 2 describes parameters, hypotheses and objectives of the considered problem. Section 3 invokes the ecosolving and its use for the resolution of several problems, in particular the block world problem which is analogous to our problem. Section 4 describes the conceived multi-agent model. Section 5 presents the corresponding Petri nets that we deducted. The last section 6 provides conclusion and future prospects.

2.

PROBLEM DESCRIPTION

As mentioned earlier, our emphasis is on the modelling and the resolution of the problem of container storage on container terminal quay of a fluvial port. Our essential concern is to arrange the containers in adequate slots respecting spatiotemporal constraints, and minimizing the movement relocation “unproductive / parasitic movements” at the moment of their departure in order to be loaded on different barges. It should be mentioned that in fluvial port’s storage yard distances are not very big. Therefore, the time that a reach stacker takes to transport a container from one slot to another is very similar whatever the position of the container is. For this reason, we focus on the relocation movements which induce delays. Thus, our study seeks to answer the following question: after every departure of some containers, how can we rearrange the containers unconcerned by this departure in most adequate manner? The rationale underlying this was to manage the next departures efficiently (retrieving easily the containers to load on barge) as well as the next arrivals (determining easily the appropriate slots for the containers to stack). To clarify the problem raised, we present next its parameters, its hypotheses, and its objectives. 2.1 Parameters The following parameters were taken into account in our study: - A storage yard composed of M Slots, - N ISO Containers stocked in stacks, - Hmax: the maximal height of every stack S, -initConfig: an initial arrangement of the N containers in the M available slots, - finConfig: a final arrangement of containers in the M slots, it must be attained initConfig. 2.2 Hypotheses We adopt the following hypotheses: - The considered containers arrive by roadway on trucks, and leave by waterway on barges, - An arrival and a departure cannot coincide, - The departure order of the containers is known, while their arrival order is unknown, - Only one container arrives at once, - The service policy to unload the arriving trucks is FIFO, - The containers of different dimensions (1 TEU, 2 TEU etc.) are stacked on two different storage yards, - The barges are classified as A, B, C, D, E, and F according to the chronological order of their departure dates which are known in advance, - The barges of which the exact departure dates is beyond F are called Y, - The barges of which the departure date is completely unknown are called Z, - We associate to every container the barge whereby it is going to leave (A, B, C, D, E, F…Y & Z) which determines implicitly its departure date t. For exam-

ple, for two different containers C and C’, if C is going to leave on the barge A and C’ is going to leave on the barge B, C, D or Y then t (C) < t (C '), - The containers are categorised identically to the associated barges. For example a container is of category A if it is going to leave on the barge A, - One container is prioritized to another by its category.

4. MULTI-AGENT MODEL The analogy that we have noticed between the problem that we treat and the classic problem of block world leads us to conceive a multi - agent model based on the principles of the eco-solving principles evoked in the previous section.

2.3 Objectives

4.1 Assumptions and definitions

The core objective of the present study is to determine a sequence of successive operations of unstacking-stacking. After the departure of the containers A, this sequence will permit to reach a final arrangement (Fig. 3) known in advance from a given initial arrangement (Fig. 2). The temporal and spatial constraints are not considered currently.

- A Container agent CAi corresponds to a container i, - The Container agent CA0 is a “virtual Container agent” associated to ground.A Container agent cannot be placed on another one unless it is free. - The Container agent CAj is a Container agent target CA_Target of a Container agent CAi if CAi wants to be on CAj. - A Container agent CA is satisfied if it is placed on its CA_Target. - The state of a Container agent CA is either satisfied or unsatisfied. - A Container agent CA is free if he does not have Container agents above.

E

C D

B

A

F

B

Z

A

B

Y

D

C

Z

4.2 Architecture

Fig. 2. Initial configuration D B C

A A

F

E

A

Z

C

B

Z

Fig. 3.Final configuration 3. ANALOGY WITH THE BLOCK WORLD PROBLEM As previously described, the problem that we consider is very analogous to the well-known scheduling problem: block world the problem. This problem consists in stacking some blocks (moving only one block at once) in order to attain a precise stacking from an initial stacking. It belongs to the class of planning problems PP: from the specification of initial situations σinit, of goals and the set of the available actions, the planning finds a set of plans Pi. It is necessary to select a plan to reach a final situation σfin. The eco-solving is used for the resolution of the block world problem presented in (Ferber, 1989) and (Drogoul and al., 1991). It is about conceiving the problem as a set of agents in interaction. Each one attempts to satisfy its own objective individually to reach global objective thereby. Its principle is to apprehend a problem by defining a population of agents of which the set of the behaviours has the tendency to lead to a steady state, called the solution of the problem. Each agent fulfils the principles of autonomy and locality, i.e. it undertakes actions that are the consequence of its local perceptions and its relations with other agents.

The agents defined in the proposed multi-agent model are: the Container agent and the Interface agent. The Container agent is defined by its acquaintances formed by the other Container agents and the agent Interface, its static knowledge: identifier, destination port, load, tare and dimension; and its dynamic knowledge: Category, CA_Under, CA_On, CA_Target and State. Its behaviour will be described in the following section. 4.3 Global dynamic Given an initial arrangement, our model has to ensure first the departure of the containers having the most priority A, then the rearrangement of the other containers with respect to a final arrangement known in advance, and finally the updating of this arrangement (to shift the container categories). In order to attain our objective, the Container agents cooperate and negotiate while leading a particular conversation in such a way that each achieves its local individual objective i.e. to be placed on its Container agent target. This conversation obeyed the eco- solving model. It is assured by direct exchange of the following messages: - “you_Block_me” (B): a CA1 wants to be free; it is blocked by a CA_On. - “Search_Place” (SP): a CA1 is in state of flight, he is looking for a suitable empty slot. - “I_am_Free” (FI): a CA1 informs a CA2 that it is free, so CA2 can take place on it. - “you_are_Free” (F): a CA1 indicates to a CA2 that it goes away, so CA2 became free. - “On_you” (O): a CA1 informs a CA2 that it takes place on.

5.

PETRI NET FORMALISATION

5.1 Modelling a Multi-Agent System One of the features of the multi-agent approach is the liberty given when applying it. Few rules to respect exist, and no formalism is defined clearly. According to Ferber, formalising a MAS is proved to be relevant to represent the actions of agents and their consequences in the environment which can be complex and of an autonomous evolution, their behaviour and their internal mechanism, and their interaction between themselves particularly the different modes of communication (cooperation, coordination, conflict resolution). Few formalisms have been defined: the finite-state automates that are efficient to represent some sequential processes, but they are proved to be quickly inefficient when considering parallelism aspects of MASs, and the algebraic models of differential equations adapted to a formal analysis, but inefficient when it is necessary to represent autonomous entities in interactions or qualitative behaviours. Then, the necessity to have more elaborated formalisms becomes primordial. In this context, we can mention the Petri nets that seem to be a good compromise between the different cited models. Many works have been realised on the MAS formalisation via Petri nets. Indeed, the Petri nets can be considered as graphic and mathematic modelling tools. The graphic aspect permits to visualize the processes and to facilitate the conception, whereas the mathematical aspect assures to this formalism rigorous foundations. The use of the Petri nets PNs and particularly the coloured PNs for modelling the simultaneous communications between agents to treat real-world problems and the decision processes is described in several works such as (Seghrouchni and al., 1998) and (Bakam and al., 1998). This formalism showed efficiency to model the aspects of asynchronisation (messages) and parallelism characterizing agent behaviour in a MAS. In our context, we have opted for the coloured PNs to give more semantics to the behaviour of the Container agents defined in the MAS described in the previous section. In what follows, we will present first the Petri nets, extended to the coloured Petri nets. Then we will provide the PNs models associated to the structure of the Container agents and the exchanged messages, which were implemented via CPN-tools. 5.2 Petri Nets A Petri net is a bipartite graph composed of two types of nodes: the places and the transitions. The edges of this graph connect the transitions to the places or vice versa. The places contain tokens or marks that remove from place to place while firing the transitions according to the firing rules.

A transition T is enabled by a given marking M if and only if there is at least one token in each input place of T. When a transition T is enabled it can fire. A token is removed from each of the input places of T (the preset of T) and a token is generated in each of the output places of T (the post set of T). (Fig. 4).

Fig. 4. Firing an enabled transition The formal definition of a PN is a 5-uple (Murata, 1989): - P is a finite set of places - T is a finite set of transitions - Pre: P * T -> IN: pre-incidence application - Post: T * P - >IN: post –incidence application - M0: P -> IN: application initial marking (tokens distribution) - Enablement of a transition: A transition is enabled by a marking M if and only if: (1) - Firing of a transition: after firing an enabled transition, a new marking M’ is reached defined as follows:

(2) 5.3 Coloured Petri Nets and CPN Tools Coloured Petri nets have got their name because they allow the use of tokens that carry data values and can hence be distinguished from each other, in contrast to the tokens of low level Petri nets (Kurt, 1997). Each place has eventually an associated type or colour set determining the kind of data that the place may contain. A transition is able to be fired if it has sufficient tokens on its input places, and if these tokens have values that match the edge expressions (token number and type). After firing a transition, the tokens mentioned on incoming arcs are removed from the input places while those mentioned on outcoming arcs are immediately put in the output places. To implement our CPN’models, we used the software CPN-Tools1. It is a tool for editing, simulating and analysing state spaces. Otherwise, CPN-Tools adjusts much more to our survey seen that he also permits to create hierarchical models, i. e., some transitions may hide other sub-nets. Below, we will elucidate the different models that we have elaborated, while respecting at most one agent's structure. 5.4 PNs models We cannot confine our model to the formalism of the classic Petri nets because our Container agents are 1

Http://www.daimi.au.dk/CPNtools 2003

going to take their decision according to welldetermined criteria. It is necessary to give a more sense to our tokens, by distinguishing “classic” tokens of a binary state, and the tokens that can contain some information, such as the type of the message exchanged and the state of the Container agent which vary during communications between different Container agents. The coloured Petri net model associated to the underlying problem is composed of modules corresponding to the behaviour of a Container agent. This model is made up of two modules of basis: autonomy module (Fig. 5) and reception model (Fig. 6). These two modules are detailed next. Coloration of the tokens. We defined tokens of different colour that contain information: - The colour set Container agent, noted CA contains the main information relative to a Container agent: its identifier idcc, the identifier of the Container agent under idc-1, the identifier of the Container agent on idc+1, the identifier its Container agent target idcg and its state statcc (satisfied / unsatisfied). This colour is defined by a tuple: (idcc, idc-1, idc+1, idcg, statecc) e.g. (1, 10, 2, 0, “sat”). - The colour set Message, noted MES, contains the informations related to a message exchanged between the Container agents: its sender, its recipient and its type (“B” / “SP” / “O”/ “FI”/ “F”). This colour is defined by a triplet of colour (Rec, Send, Type) e.g. (i, j, “B”). - The simple binary colour set defined in the ordinary Petri nets, will be noted e. Autonomy Module. This module describes the cognitive behaviour of a Container agent. As long as that it does not receive any messages, it tries to satisfy its local objective.

In the case where it is blocked in by a Container agent, it sends to this one a message “B”. And we throw back the same process. Reception Module. This module describes the behaviour of a Container agent when receiving every type of messages: “B”, “SP”, “O”, “F”, or “FI”.

Fig. 6. Reception Module When receiving the message “B” (Fig. 7), if the Container agent blocker is free, it goes away and searches another slot until the reception of a message “FI”. If it is not free, it sends a message “B” to its CA_On until the reception of a message “F”.

Fig. 7. Message « B : you_Block_me » When receiving a message “SP” (Fig. 8), if the container agent is free, it sends back a message “FI”. In the opposite case, it ignores this message.

Fig. 8. Message « SP : Search_Place » Fig. 5. Autonomy Module In the case where it is satisfied, it remains in waiting of a message. If it is not satisfied, it tries to go away and to look for another empty slot, two sub-cases are presented: if it is free, it diffuses to the other Container agents a message “SP” and remains in waiting of a message “FI”. Once received, it updates its CA - Under and sends both the message “F” to its old CA_Under and the message “O” to its new CA_Under.

When receiving a message “O” (Fig. 9), a Container agent updates its CA_On.

Fig. 9. Message « O : On_you »

When receiving a message “F” (Fig. 10), a Container agent updates its CA_On to “free”.

Fig. 10. Message « F: you_are_Free» 6.

CONCLUSION

In this article, we first intended to conceive a multi agent model for the resolution of a particular version of the problem of container storage on a fluvial port quay, while referring to the eco-solving method applied to well-known scheduling problem: block world problem. Then, we expressed this multi-agent model by a formal method: the coloured Petri nets, in order to give semantic to the different agent behaviours. The formalisation process helped towards the model clarification and showed an easiness to apprehend the aspects of asynchronisation and parallelism during communications between the agents. Currently, we proceed to implement the proposed multi-agent model, to extend it taking into account the spatio - temporal constraints of the problem, and to validate it by analyzing the associated coloured Petri nets. REFERENCES Bakam, I., F. Kordon, C. Le Page, and F. Bousquet, 2000. Formalisation de modèles multi-agents par les réseaux de Petri : Application à l’étude d’un système de gestion de la chasse à l’EstCameroun. 5e colloque Africain sur la Recherche en Informatique, Madagascar. In Frensh Drogoul, A., J. Ferber, and E. Jacopin, 1991. Viewing cognitive modeling as EcoProblem Solving : The Pengi Experience, Rapport N 2/91. Duinkerken, M.B., J.J.M. Evers and J. A. Ottjes, 2001. A simulation model for integrating quay transport and stacking policies automated containers terminals. Proceedings of the 15th European Simulation Multi-conference. Prague. Ferber, J., 1989. Computational reflection in class based object oriented languages. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages and Applications, New Orleans, Louisiana, p. 317326. Ferber, J., 1995. Les systèmes multi-agents : vers une intelligence collective. Ghedira, K and G. Vertfaillie, 1992. A Multi-Agent Model for the Resource Allocation Problem: A Reactive Approach. Proceedings of the 10th

European Conference on Artificial Intelligence, Vienna, Austria, p. 252-254. Gambardella, L.M., A.E. Rizzoli, and M. Zaffalon, 1998. Simulation and planning of an intermodal container terminal, Simulation, 71(2), p. 107-116. Henesey, L., F. Wernstedt, and P. Davidsson, 2003. Market-Driven Control in Container Terminal Management, Proceedings of the 2nd International Conference on Computer Applications and Information Technology in the Maritime Industries, Hamburg, Germany. p. 377386. Jensen, K., 1997. A Brief Introduction to Coloured Petri Nets. In: E. Brinksma (ed.): Tools and Algorithms for the Construction and Analysis of Systems. Proceeding of the TACAS'97 Workshop, Enschede, The Netherlands, Lecture Notes in Computer Science, (1217), Springer-Verlag, P. 203-208. Kim, K.H. and J.W. Bae, 1998. Re-marshaling export containers in port container terminals, Computers & Industrial Engineering, 35(3-4), p.655-658. Kim, K.H., Y.M. Park, and K.R. Ryu, 2000. Deriving decision rules to locate export containers in container yards, European Journal of Operational Research, 124, p. 89-101. Kim, K.H. and H.B. Kim, 2002. The optimal sizing of the storage space and handling facilities for import containers, Transportation Research, Part B 36, p. 821-835. Korbaa,O and P.Yim, 2004. Container Assignment to Stock in a Fluvial Port, International Conference on Systems, Man and Cybernetics. The Netherlands. Kozan, E. and P. Preston, 1999. Genetic algorithms to schedule container transfers at multimodal terminals, International Transactions in Operational Research, 6, p. 311-329. Murata, T., 1989. Petri Nets: Properties, analysis and applications, Proceedings of the IEEE, 77(4), p. 541-580. Rebollo, M., V. Julian, C. Carrascosa, and V. Botti, 2000. A Multi-Agent System for the Automation of a Port Container Terminal. Autonomous Agents workshop on Agents in Industry, Barcelona, Spain. Seghrouchni, A. El Fallah, S. Haddad, and H. Mazouzi,1998. Observation répartie et analyse des interactions dans un sytème multi-agents, Journées Francophones IAD et SMA. (Eds. Hermes), Nancy. Singh, M.P., S.R. Anand, and P. G. Michael, 1999. Formal Methods in DAI: Logic Based Representation and Reasoning. Multiagent Systems: A Modern Approach to Distributed Artificial Intelligence. Vis, I.F.A. and R. De Koster, 2003. Transshipment of containers at a container terminal: an overview, European Journal of Operational Research, 147(1), p. 1-16.