• Aucun résultat trouvé

Object oriented model for container terminal distributed simulation

N/A
N/A
Protected

Academic year: 2021

Partager "Object oriented model for container terminal distributed simulation"

Copied!
21
0
0

Texte intégral

(1)

Object oriented model for container terminal distributed simulation

Maurizio Bielli

a

, Azedine Boulmakoul

b,*

, Mohamed Rida

b

aInstitute of Systems Analysis and Informatics, ‘‘Antonio Ruberti’’—National Research Council, Viale Manzoni 30, 00185 Rome, Italy

bLIST Laboratory, Department of Computer Science, Mohammedia Faculty of Sciences and Technology (FSTM), B.P. 146, Mohammedia 20650, Morocco

Available online 14 April 2005

Abstract

In shipping port sector, containers are the most dynamic and complex to manage. To provide adequate strategy for the increasing traffic, ports must either expand facilities or improve efficiency of operations. In investigating ways in which ports can improve efficiency, this paper outlines a container terminal simulation model and gives components architecture that are implemented with Java. Simulator calibration and validation are also presented in the paper.

The main goal of the present work is to provide a help tool in a port decision support system. The object oriented soft- ware design using UML diagrams is deployed in this project.

2005 Elsevier B.V. All rights reserved.

Keywords: Object-oriented modeling; Discrete-event simulation; Container terminal; Simulator calibration and validation

1. Introduction

Every day containers arrive to a terminal by multiple means of transport and are stored in the terminal area. Then, containers leave the terminal by the same means to reach their final destinations [2,5,6,21].

A container port, which provides the interface between railroads, ocean-going ships, and over the road trucks, represents a critical link in the intermodal chain. The maritime container termi- nals show a high integration level of the various information systems and control engineering applications in an overall port information system architecture that include vessel traffic services, sea/

yard and freight station planning operations, administrative/financial management, manage- ment and control of handling activities, equipment maintenance, etc. [1].

0377-2217/$ - see front matter 2005 Elsevier B.V. All rights reserved.

doi:10.1016/j.ejor.2005.02.037

* Corresponding author.

E-mail addresses:[email protected](M. Bielli),boulmakou- [email protected], [email protected] (A. Boulmakoul), [email protected](M. Rida).

www.elsevier.com/locate/ejor

(2)

The amount of work a container port deals with depends on the quantity of containers in transit.

The management of a container port is a complex process, which involves a high number of deci- sions. A valuable simulation tool for a port man- ager, then, would be one that predicts profit out of each decision. To develop a decision support system for container terminals, this paper presents an architecture that simulates container terminal operations in order to improve efficiency in con- tainer terminal management.

The main goals of our simulation software are:

• evaluation of alternative ships loading and unloading operations in term of time and cost,

• evaluation of several storage policies,

• evaluation of different resource allocation procedures.

The rest of this paper is organized as follows:

In the following section we will provide an over- view of the operations within container terminals.

Section 3 presents the most known simulation techniques. Section 4, then, presents our object oriented modeling for container terminal described with several UML diagrams. Section 5 presents a description of container terminal simulator that we have developed. Section 6, then, gives the calibration and validation of this simulator. Sec- tion 7 concludes and incorporates suggestions to continue research on container terminal productivity.

2. Overview of container port operations

A container port is a terminal where containers enter and leave by different means of transport, as trucks, trains, and ships (input/output transport means) [2,5,7]. It provides the interface between railroad, ocean-going ships, and over road trucks, and presents the critical link in the intermodal chain. Containers arrive at terminal by trains, ships or trucks and are stored in the terminal yard.

Then, they leave the terminal by the same means to reach their final destinations [9,15]. In this section we present an overview of container terminal operations.

2.1. Quay crane operations

A quay crane is a crane that services container- ship by shifting on a rail to reach the assigned stowage within the same ship and also to move from one ship to a successive ship once the first one has been completed (see Fig. 1). It provides, arguably, the single most important operation (called move) associated with loading and unload- ing a ship and represents the only means of moving containers to or from a ship [3]. To unload a ship, one or several (even up to 5 or 6 for largest contai- nerships of latest generation) quay cranes pick up containers from the ship and put them on shuttle trucks that move them to the assigned yard posi- tions within the terminal storage area. To load a ship the quay crane unloads a container from a shuttle and puts it on the ship. For both types of move (loading and unloading operation) a very re- stricted area for buffering some containers is natu- rally provided at the basis of each one of the on rail crane. Whenever a crane breaks down, its work is interrupted until it is repaired or until an- other crane is positioned in place of the former one, if possible. Depending on both the size of the ship (small feeder to large oceanic vessel) and the instantaneous availability at the terminal, a different number of cranes are, typically, working in parallel on the same ship at the same instant, provided that a minimal length in between is guar- anteed to avoid arm collision.

Access into the ship is provided by a cable sus- pended carriage, shown in Fig. 1, specifically

Fig. 1. Quay crane servicing a ship, a shuttle truck is waiting for the container underneath the crane.

(3)

designed to pick up and release containers from top corner castings. The carriage expends to accept both 20- and 40-ft containers. Containers of greater length, such as 48 and 52 ft, can be moved by most cranes, though older cranes may be lim- ited by the clearance between the craneÕs legs.

The expansion or contraction of the container car- riage can be done, with negligible delays, while the carriage is in motion. The container carriage is also used to move specialty containers or oversized cargo.

Containers stacked in a ship are secured in sev- eral ways in order to prevent them from being damaged at sea. Locking corner castings are placed between stacked containers in non-cellular- ized or ro/ro ships to align the containers and to provide a place to brace them. The cross braces are then secured to the floor of the ship, and, final- ly, the hatch covers are put back in place. Cellular- ized ships do not require corner castings or cross braces, since permanent guides and locks (which allow containers to be showed more densely than in non-cellularized cargo vessels) are already on board.

The delays created by bracing the container stacks are usually negligible, sine most of the work can be completed while the crane is retrieving the next container. Noticeable delays occur only when corner castings or cross braces must be delivered from the ground to the longshoremen working in the ship.

Another activity that interrupts operations is the movement of the crane from one bay to an- other bay of a ship. Usually, quay cranes are rail mounted to allow movement laterally along the ship. The time spent moving a quay crane from one bay to the next is on the order of one container move, witch ranges from 1 to 3 minutes. Another delay related to crane operations is that of hatch cover placement. Hatch covers are placed over the containers stacked in the holds of the ship.

Thus, hatch covers form the decks of container- ships, on which containers are stacked three or four high. To gain access to the holds of a ship in service, the supervisor of the operation will have the hatch covers removed and then placed on the ground directly behind the crane. This operation usually takes 5 minutes to complete, and occurs

up to 12 or more times per ship, depending on the size of the ship.

Finally, the order or the sequence of the re- moval of the containers from a ship can occasion- ally cause delay for the quay cranes for two reasons: First, the quay crane may be required to make one or more container moves within the ship to uncover the desired container. This is known as a restow. The duration of the delay caused by a re- stow is determined by the number of restows re- quired. Second, the sequence of container moves can have profound effects on the stability of the ship. Ships without the equipment for automati- cally monitoring displacement, stability, trim and heel pose a difficult problem for the crane operator when placing the carriage on the corner castings of the container. Thus, containers are normally han- dled sequentially from one side of the ship to the other and from one end to the other. This tech- nique not only simplifies operations for the crane operator, but also minimizes the problem of keep- ing the ship level while it is being serviced.

2.2. Storage yard operations

Operations in the storage yard are more flexible than quay crane operations, in the sense that there are much more degrees of choice in operations management, due to the combinatorial explosion of the combined possibilities of

(i) identifying a given set of attributes;

(ii) then clustering containers that share some attributes and, finally

(iii) assigning containers to a dedicated sub-area within the yard storage area.

Under the goal of avoiding containerÕs overflow at selected sub-areas, and also changes of place (overhead moves called ‘‘housekeeping’’) during the sojourn time of a container within the yard, the complete process by which containers may be moved and stored within the yard area must be represented accurately [4] by adequate tools capa- ble of being adapted to different real frameworks.

In a storage yard, yard gantry crane (see Fig. 2),

top-pick loader, or straddle carriers are used to

stack containers.

(4)

In container ports, stacking is the most com- mon container storage method; in particular, straddle carriers are used in those ports where the availability of a ‘‘large’’ yard allows restricting the number of tires to two. More often, containers must be stacked to more than two tires. In this procedure, containers are stacked several levels deep with different types of containers and cargo are placed in specific areas of the storage yard.

For example, containers destined for a particular ship are placed together. In the same way, specialty containers, empty containers, and port specific containers are stored in designated areas. Hazard- ous materials are typically stored away from the general cargo containers, as are flammable materi- als and refrigerated containers. Finally, with these subsections, 20- and 40-ft containers are separated.

Even with these many subdivisions, the efficiency of storage yard equipment is greatly increased by being able to service only one portion of the yard at a time. This efficiency is particularly desirable when yard cranes are employed as the primary stor- age method. Stacking requires that close attention be paid to the location, or address, of the container to prevent multiple restows or misplaced containers.

Without efficient ways to assign container ad- dresses, multiple restows are likely [15,21].

The container stacking procedure is carried out primarily by yard gantry cranes. The yard gantry cranes operate similarly to the quay cranes, in that a suspended container carriage is used to place and to retract containers. The yard gantry crane allows containers to be stacked three deep, the fourth row being reserved for clearance of another container.

The clear span of the yard crane provides space be- neath the crane for trucks to be serviced or queued.

There are two types of yard gantry cranes: rub- ber tire and rail mounted. Rubber tire gantry

cranes ensure flexibility and mobility; they are able to move from one container bay to the next in a matter of minutes by traveling to the end of the bay and rotating all four tires in the desired direc- tion. Because of the length of a container bay, it is important to minimize the time required to reach the end of the bay.

A rail mounted gantry crane operates in the same way as the rubber tire gantry crane, with the exception of the rail mounted gantry craneÕs inability to maneuver quickly from bay to bay.

However, the higher stability of the rail mounted crane translates into higher productivity and a denser container stacking.

In a way similar to quay crane operations, con- tainers are assigned specific addresses before enter- ing the storage yard. The address is very important in minimizing the number of restows. Restowing in the storage yard may be slightly faster than in the ship because of the absence of corner castings or cross braces.

Another way to stack containers in the storage yard is through the use of straddle carriers. As the name implies, straddle carriers carry containers be- tween their legs to the appropriate place in a stor- age yard bay. Containers are stacked three high so that there will be clearance for one loaded straddle carrier. The only space between the single con- tainer width bays is the space for the legs of the straddle carrier.

A fourth way to store containers in the storage yard is through the use of top-pick loaders. The top-pick loaders operate like a large fork lift and have been modified to pick up containers by the top corner castings. An additional modification is that the loaders are able to reach over one row of containers to place or to retrieve blocked con- tainers. Bays are three containers wide so they can be serviced from either side. Note that more space is required between the bays for the opera- tions of loaders than the operations of gantry cranes. This results in lower density container stor- age. The advantages of the top-pick loader over other stacking techniques include increased speed and maneuverability.

Finally, containers can be stacked with simple fork lifts. Typically used for empty containers, the fork lift provides excellent maneuverability,

Fig. 2. Yard crane servicing the storage area.

(5)

but the fork lift cannot place one container behind another. For stability reasons, fork lifts are only able to stack containers three high. Often, fork lifts operate in storage yards as an accessory unit, retrieving empty containers or occasionally mov- ing cargo into a ro/ro vessel.

It is important to note that storage yard delays can be caused by commercial vehicles. Because the storage yard is the interface of ocean and over the road carriers, the stacking equipment must service both commercial vehicles and yard vehicles. Port managers usually detail stacking machinery to ser- vicing either the yard vehicles or commercial vehi- cles, but not both simultaneously. However, there are circumstances whereby stacking equipment is required to load or to unload both type of vehicles.

2.3. Shuttle truck operations

The third element of port operations presented in this paper is the movement of containers be- tween quay cranes and storage yard. Quay crane unloads ships and places containers on shuttle trucks, which move them to storage locations in the yard. This operation forms a closed loop that is traveled by shuttles servicing a ship (see Fig.

3). Containers, which are stored in the storage

yard, leave the terminal by input/output trucks to reach their final destinations (see Fig. 4). Pro- ductivity of containershipÕs journey depends on efficiency of transport operations between storage yard and quay crane. For example, too many trucks in the system cause long files at the cranes and long waiting times for service. Conversely, few trucks in the system will result in idle stacking equipment. Hence, a good management of con- tainer locations and stacking operations at yard storage area together with an optimal assignment of the right number of vehicles to quay cranes (and, in large ports, routes to vehicles) are crucial to avoid both phenomena of crane starvation and, at the opposite side, congestion of vehicles upon their arrival to both quay and/or yard cranes.

A collection of shuttle trucks, called gang, ser- vices each ship in the cyclic fashion described above. Each has 6–8 members, depending on sev- eral operating characteristics such as the distance that containers are carried from quay crane, and the type of yard storage method employed. Be- cause of the high cost of keeping a ship in port, it is important to keep the quay crane operating without delay in order to turn the ship around as quickly as possible. This is normally done by keep- ing enough shuttle trucks in the gang so that at

Ship

Queue of shuttles loaded Storage area Yard crane

Quay crane

Queue of shuttles unloaded

Truck loaded Truck unloaded

Fig. 3. Scheme of ship unloading process.

(6)

least one vehicle is ready for service at the quay crane. But one must pay a lot of care in some form of dynamic reassignment of shuttles to cranes in order to get a satisfactory compromise between the above-mentioned phenomena of cranes starva- tion and vehicles congestion. One gang is assigned to each quay crane servicing the ship. If yard cranes are employed in the storage yard, the same gang will be assigned to one or two yard cranes.

Thus, the gang operates to ensure the movement of containers between the yard and the quay crane.

If containers are stacked by top-pick loaders, or if chassis storage exists, the gang members will be re- quired to drive to the appropriate storage location, not necessarily in the same area of the storage yard.

Occasionally, the productivity of shuttling con- tainers from the quay crane to the storage yard can be increased in several ways: First, truck may be used to move two 20-ft containers at the same time. At the yard or quay crane, the first container is placed at the front of the chassis, and the second is placed on the back of the same chassis. While the service time underneath the crane is length- ened, productivity is increased significantly. Dou- ble moves are possible for 20-ft containers.

Because a ship may carry a limited number of 20-ft containers, double moves can be sustained for only a short period of time. The second form of double moves occurs when a quay crane, near- ing completion of the removal of import contain- ers from a hold, prepares to reverse the process by loading export containers. During that short

interval, a truck can transport the imported con- tainer into the storage yard, pick up an export con- tainer, and deliver it back to the quay crane.

Again, productivity increases temporarily, though this type of double move is rare.

Delays caused by the movement of containers are usually negligible, because most delays are rooted at a crane or stacking vehicle. Exceptions include mechanical breakdowns and traveling to the wrong place in the storage yard. Another delay is caused by port congestion, owing to the large number of trucks present. Port congestion occurs frequently when several ships are in port or when two cranes are simultaneously servicing the same ship.

3. Simulation techniques

3.1. Discrete-event driven simulation

A discrete-event driven simulation [3,8,11] is a popular simulation technique, which is applicable to a large variety of problems in the real world.

Discrete-event simulation has been done in a sequential manner. A variable clock holds time up to which the system has been simulated. A data structure, called the event list, maintains a set of messages, with their associated times of transmis- sion, that are scheduled for the future. Each of these messages can be sent at associated time in the system. At each step, the message with the smallest associated future time is removed from

Queue of input/output trucks

unloaded Storage area Yard crane

Entrance gate Exit gate

Truck loaded Truck unloaded

Fig. 4. Scheme of truck arrivals at the terminal to pick-up and delivery.

(7)

the event list and the transmission of the corre- sponding message in the system is simulated. Send- ing this message may, in turn, cause other messages to be sent in the future (which are added to the event list) or cause previously scheduled messages to be canceled (which are removed from the event list).

3.2. Distributed discrete-event simulation

This type of simulation was proposed as an alternative when the number of events to be simu- lated is high [11]. It offers a radically different ap- proach to simulation, and consists of partitioning the simulation problem on a set of processes exe- cuted in parallel, with each process carried out on a machine. An algorithm was suggested to be implemented in each machine in order to simulate a single physical process; messages in the physical system were simulated by message transmission among the machines.

Each process operates autonomously to change its state and interacts with other processes in the system. The interaction is made by messages. Con- tents of a message sent by a process depend on the characteristics of the process (its initial state, its rules of operation) and the messages that the process has received so far. Our approach con- sists to apply this type of simulation to container terminal using the multithreaded programming in Java.

In this section we introduce a model of distrib- uted computation and show how a simulation may be carried out by a set of communicating pro- cesses. We limit our discussion here to a basic scheme, one which can result in deadlock. More sophisticated schemes that resolve deadlock are discussed in [11].

3.2.1. Basic scheme for distributed simulation A distributed system consists of a finite number of processes and directed channels connecting some pairs of processes called Logical Processes (LP) [8,11]. Each LP may execute sequential code and two special commands: receive and send. In a send, an LP names an outgoing channel and a message that is to be sent along that channel. Exe- cution of the send results in the message being

deposited on the named outgoing channel; the sen- der then proceeds with the execution of its code.

Messages sent along a channel are delivered in the sequence in which they are sent. In a receive command, an LP names one or more incoming channels from anyone of which it wishes to receive a message. An LP wishing to receive may have to wait until a message arrives along one of the incoming channels. Note that the communication protocol is simple and can be implemented on many existing machine architectures.

A set of Logical Processes D is deadlocked at some point in the computation if all of the follow- ing conditions hold:

(1) Every LP in D is either waiting to receive or is terminated.

(2) At least one LP in D is waiting to receive.

(3) For any LP

a

in D that is waiting to receive from some LP

b

, LP

b

is also in D, and there is no message in transit from LP

b

to LP

a

. It follows then that none of the Logical Processes in D will carry out any further compu- tation since they will remain waiting for each other.

To simulate any given physical system, one con- structs a distributed logical system as follows. One will associate one Logical Process with each Phys- ical Process (PP), LP

a

will simulate the actions of PP

a

. If PP

a

can send messages to PP

b

, there is a channel from LP

a

to LP

b

.

An LP can simulate the actions of a PP up to time t if the LP knows the initial state and all mes- sages that the corresponding PP receives up to time t. This is because no future message can affect the PPÕs behavior at t. One notes that an LP may be able to simulate a PP beyond time t, even though it knows its input messages only up to t [11].

We make a chronology requirement: if an LP sends a sequence of messages {. . ., (t

i

, m

i

), (t

i+1

,

m

i+1

), . . .} to another LP, then t

i

< t

i+1

. . . We

note T

i

= min

i

{t

i

}. The basic distributed simula- tion algorithm for an LP

i

is given as follows [11]:

Initialize: T

i

= 0 {All messages received by PP

i

up to T

i

are now known to LP

i

}

(8)

While simulation completion criterion is not met do

{Simulate PP

i

up to T

i

by doing the following:

for each outgoing channel, compute the sequence of messages h(t

1

, m

1

), (t

2

, m

2

), . . . , (t

r

, m

r

)iwhere t

1

< t

2

< < t

r

and, PP

i

ends m

j

at time t

j

along this channel; send each message in sequence along the appropriate channel;

{Note: All messages sent by PP

i

up to T

i

can be deduced by LP

i

and sent; also some mes- sages to be sent beyond T

i

may be predicted by LP

i

and sent. Only new messages that have not been sent before are sent. Also note that some or all of these message sequences may be empty}

{Receive messages and update T

i

until T

i

changes value: T

0i

:¼ T

i

;

While T

0i

:¼ T

i

do

Wait to receive messages along all incom- ing channels;

Upon receipt of a message, update LP

i

Õs internal state and recomputed T

i

, the min- imum over all incoming channel clock values

End While End While

4. Container terminal logical view

Recent developments such as object-oriented modeling and Petri-net based simulation were reported by researchers in the field of construction simulation [20]. In this section we present our analysis of container terminal system, based on object-oriented paradigm. Fundamental classes are identified and different diagrams describing the system are presented. Such diagrams are denoted using the UML notations.

4.1. Class diagram

The first step of our conception process consists of identifying classes of the container terminal model. We want to describe these classes in a for-

mal manner and implement them with Java. UML allows, with the help of class diagram, to model container terminal system components and their relationships. In Fig. 5, we report a part of the hierarchy of these components. The class Termi- nalModel, which represents container terminal in our system modeling, aggregates multiple ob- jects of classes: Quay, TransMean, Crane, Queue, ArrivalsGenerator, and Area, since all these clas- ses represent terminal components. Each of these classes is a super class of the others in the system.

In Table 1, we give an explanation about each class.

4.2. Multi-process

Objects of the real world carry out their opera- tions in an independent and a simultaneous man- ner. In the implementation of our software we used Java [17,18], which is a multithreading language that makes simultaneous activities imple- mentation easy. UML provides also tools destined to the conception of simultaneous models. In this section, we analyze profits that extricate our simu- lation of the multi-process.

4.2.1. Threads and active classes

Java uses threads to represent simultaneous and independent activities. The UML provides in this context active class notion to represent a thread.

In our case, all generators, transport means, and

cranes, are considered as active classes, since their

objects must work simultaneously and indepen-

dently. For example, Shuttles move between a

storage area and a quay while a QuayCrane loads

a container from a ship. We report, in Fig. 6, the

main classes that perform simulation of loading

and unloading process. The class ShipArrivalsGen-

erator is associated to class Ship. The association is

named ‘‘Create’’; it indicates that ShipArrivalsGen-

erator generates ships arrivals. Each of classes

Ship, and Shuttle, is associated to a subclass of

Queue (ShipQueue, QuayQueue, or YardQueue),

which means all these means of transport may

wait in a queue for service. Yard crane and quay

crane load and unload shuttle trucks and corre-

(9)

sponding objects are therefore related to class Shuttle. Finally, classes that possess a thick are ac- tive classes, since their objects must run in an inde- pendent and simultaneous manner.

4.3. State and activity diagrams

To model a discrete-event dynamic system we need to take into account its states and events

Ship Queue Ship

Shuttle

Yard Queue Gate

Rail Gate

Straddle Carrier

Export Area Buffer Area

IOTruck Train

Termina lModel

Ship Arrivals Generator Train Arrivals Generator

Truck Arrivals Generator Road Gate

Area

**

Quay Crane

Storage Area Crane

**

Trans Mean

**

Quay

**

**

Yard Crane

Import Area

Quay Queue Arrivals Generator

**

Queue

**

Fig. 5. Class diagram for container terminal infrastructure.

Table 1

Meaning of each class given inFig. 5

Class Signification

TerminalModel Represents the container terminal in our system

TransMean Super-class of all transport means

Crane Super-class of all type of cranes

Queue Super-class of all type of queues in the terminal

Quay Represents the quays of the terminal

Area Supper-class of several surfaces in the terminal

Shuttle Trucks servicing yard areas, moving containers from point to point

IOTruck Input/output trucks, it moves containers toward or from the terminal

QuayCrane Crane that services ships

YardCrane Crane employed to stack containers in the storage yard

StorageArea Area to park containers

BufferArea Temporary storage area

QuayQueue A queue formed by shuttles waiting for quay crane service (Fig. 3)

YardQueue A queue formed by shuttles waiting for yard crane service (Figs. 3 and 4)

ShipQueue A queue formed by shuttles waiting for berth

Gate Where transport means enter and leave the terminal

RoadGate Where trucks enter and leave the terminal

ArrivalsGenerator A class that generates arrivals to terminal

(10)

leading to the state evolutions [3,9,14]. To model the dynamics of the container terminal system, we used state and activity diagrams. Figs. 7–9 de- scribe states and activities of ships, cranes, and shuttle trucks in the terminal. In these networks, scripts concerning all states and activities are designed.

4.4. Collaboration diagrams

UML collaboration diagrams are used to ex- plore the dynamic nature of our software. Collab-

oration diagrams show message flow between objects in an object oriented application, and also imply basic associations (relationships) between classes. Fig. 10 shows a collaboration diagram that represents interactions between QuayCrane and QuayQueue objects while objects of the class Shut- tle arrive for QuayCrane service.

It is a common practice to indicate concurrent threads in an UML collaboration diagram by pre- ceding sequence number of messages by letters. In our case, in Figs. 10 and 11 some messages are fol- lowed by letters indicating that those messages are being processed concurrently and asynchronously.

For example, a and b messages share the same se- quence number 1. A ship that arrives to terminal must wait in a queue (which is modeled by Ship- Queue) when berth is not available. When a quay is free, the first ship in queue occupies this quay.

Table 2 reports all messages of the collaboration diagram presented in Figs. 10 and 11.

4.5. Events management

As usual, objects do not execute their opera- tions in spontaneous way. A specific operation is, generally, invoked when a sender object (a client object) sends a message to a receiver object (a ser-

1 0..1

0..* Store in

0..1

*

Load/ Unload Load/ Unload

Load/Unload

Create

Wait in

Occupies

0..*

0..1

0..* 0..1

Wait in

1

0..1

StorageArea Quay

YardQueue

QuayQueue

Ship

QuayCrane Shuttle YardCrane

Ship Arrivals Generator Ship Queue

Wait in

*

Fig. 6. Class diagram for loading/unloading process.

Start of working Departure

Pilot service

Shipwork finished

Ship in work

Wait in berth

Berth availability

Pilot availability

Crane availability yes no

yes

no

Arrival

Wait in queue

no

yes

Fig. 7. States diagram for a ship arrival and departure.

(11)

ver object) asking it to execute a specific operation.

We began system modeling with state-transition and activity diagrams, as well as collaboration dia- grams. In this section, we analyze interactions be- tween objects of the system.

4.5.1. Events

In Fig. 10, we presented the example of a QuayCrane object that loads a Shuttle object by sending to it a message LoadShuttle. It means that the QuayCrane object calls LoadShuttle method of

Quay Crane loaded

yes

Quay crane unloaded Quay Crane ready Quay crane idle

To move To put container on the

shuttle To move a container To load a container

from the ship Shuttle

availability no

Fig. 8. Activity diagram for aQuayCraneobject.

Shuttle unloaded by yard crane

Shuttle unloaded To wait in quay

queue

To go to quay crane

To wait for quay crane service

Shuttle loaded To wait for yard crane service

To go to yard crane

To wait in yard queue

To go to yard queue Shuttle loaded

by quay crane To go to quay

queue

Fig. 9. Activity diagram for aShuttleobject.

(12)

the Shuttle object. This message describes an ac- tion that occurs currently (crane load a shuttle).

Generally, the name structure of a message is formed by a verb that precedes a name. Thus, the message name LoadShuttle is constituted by the verb ‘‘Load’’ followed by the name ‘‘Shuttle’’.

An event is an object notification of an action occurrence. For example, a Ship sends an event ShipArrived to a ShipQueue when the Ship arrives at terminal. Listening to an event ShipArrived per- mits ShipQueue to determine actions that must be accomplished when the Ship arrives.

The name structure of an event is the inverse of the first structure. The event name is formed by a name, followed by a verb. For example, the event name ShipArrived is constituted by a name ‘‘Ship’’

followed by ‘‘Arrived’’ (see Table 2).

In our case, we create a super class called TerminalModelEvent that represents an event of our model. The TerminalModelEvent contains a reference of a Location, which represents the place where the event has been generated, and a refer- ence of an Object, which represents the source of the event (see Fig. 12). In the simulation, objects

[QuayCrane is idle]

1.b: QuayCraneIsIdle ( )

:QuayCrane

firstInQueue:Shuttle

ArrivingShuttle:Shuttle :Ship

:QuayQueue

[QuayQueue is not empty]

1.b.1: SignalToMove ( )

1.b.2 : ShuttleArrived( ) 1.b.3 : UnloadShip( )

1.b.4: LoadShuttle( ) 1.a: ShuttleArrived ( )

Fig. 10. Collaboration diagram for shuttles servicing a ship.

:Quay

firstInQueue:Ship

ArrivingShip:Ship :QuayCrane

:ShipQueue

1.a : ShipArrived ()

[Quay is idle]

1.b: QuayIsFree ( )

[ShipQueue is not empty]

1.b.1 : SignalToMove()

1.b.2 : ShipArrived ( ) 1.b.3 : StartWork()

Fig. 11. Collaboration diagram for ships arriving to terminal.

(13)

use instances of TerminalModelEvent to send events to the other objects. For example, Ship sends a TerminalModelEvent to a QuayQueue when it arrives to terminal. To describe all actions in the system, we created several subclasses of Ter- minalModelEvent, as it is presented in Fig. 12.

Thus, instead of TerminalModelEvent, Ship sends ShipEvent to ShipQueue when it arrives to termi- nal. In Table 3, we present a part of actions that create events in the system. Note that each action is constituted by a ‘‘name’’ followed by a ‘‘verb’’.

4.6. Event management in Java

In Java [12,14], the concept of event manage- ment is like collaborations described in Section 4.4. An object sends a message to other objects, which are listening to this type of message [15,19]. The difference is that objects must be reg- istered to receive the message. Therefore, these ob-

jects are qualified to beevent listeners. To send an event, the sender object calls a particular method of the receiver object and gets to it in parameter the event object wished. In our simulation, this event object is a subclass of TerminalModelEvent.

In Fig. 13, we propose a modified diagram tak- ing account of the event management. Fig. 14 presents a class diagram, which illustrates the realization between QuayQueue and ShipEvent- Listener.

4.6.1. Event listeners

We illustrated the management of events be- tween classes in the simulator with the help of modi- fied collaboration diagram presented in Fig. 13. The Ship object sends an event ShipEvent to the Ship- Queue object (message 1). Then, we must specify the event object that the Ship must transmit to the ShipQueue. According to the note presented in the Figure, the Ship passes a TerminalModelEvent

Table 2

Collaborations in container terminal system

An object of the class Sends the message. . . To an object of the class. . . When

Ship ShipArrived ShipQueue it arrives to terminal

ShipArrived Quay it arrives toQuay

Quay QuayIsFree ShipQueue it is free

StartWork QuayCrane a ship is boarding at quay

ShipQueue SignalToMove Ship a quay is free

Shuttle ShuttleArrived QuayQueue it arrives toQuayQueue

ShuttleArrived QuayCrane it arrives toQuayCrane

QuayCrane QuayCraneIsIdle QuayQueue it is idle

UnloadShip Ship a shuttle is available

LoadShuttle Shuttle it is loaded

QuayQueue SignalToMove Shuttle a quay is idle

TerminalModelEvent

Source Location

QuayCraneEvent QuayEvent

ShuttleEvent ShipEvent

1 1

Fig. 12. Class diagram for events in the system.

(14)

object to ShipArrived method, which is in fact a ShipEvent object. The ShipQueue implements an interface ShipEventListener that ‘‘listens’’ Ship- Event occurrences, what makes ShipQueue an EventListener (see Fig. 14). The interface Ship- EventListener provides, among others, a method ShipArrived that permits to the Ship to notify Ship- EventListener when it arrives to the terminal.

A ship arriving to the terminal calls only meth- ods declared in the interface ShipEventListener, but only when ShipQueue is registered to this Ship to receive ShipEvent events [11]. In Fig. 15, we illustrate the elided class diagram representing sev-

eral realizations in our simulation model. The class TerminalModel implements all methods of the interface TerminalModelListener; we touch up this diagram to take into account the fact that the class TerminalModel implements all interfaces by inher- iting TerminalModelListener from these interfaces.

Thus, the class TerminalModel can receive all events of the system.

4.7. Model-view-controller

Design patterns define efficient strategy for building reliable object oriented software systems

Table 3

Representation of actions that create events in the system

Event Sent when (action) Sent by an object of the class

ShipEvent a ship arrives to a point in the terminal Ship

a ship leaves the terminal Ship

ShuttleEvent a shuttle arrives to a point in the terminal Shuttle

QuayEvent a quay is free Quay

a quay is busy Quay

QuayCraneEvent a quay crane is idle QuayCrane

a quay crane is busy QuayCrane

:Quay

firstInQueue: Ship

ArrivingShip:Ship :QuayCrane

:ShipQueue

1.a: ShipArrived ( )

[Quay is idle]

1.b: QuayIsIdle ( )

1.b.1 : SignalToMove( )

1.b.2 : ShipArrived( ) 1.b.3 : StartWork( )

<<parameter>>

(ShipEvent)

<<parameter>>

(QuayEvent)

<<parameter>>

(ShipQueueEvent)

Fig. 13. Modified collaboration diagram for ships arriving to terminal.

(15)

[18]. Our simulator supports Model-View-Controller (MVC) architecture, which uses several design pat- terns. MVC architecture divides the system into three parts:

• the model, which contains the data and logic of our program;

• the view, which provides a visualization of our model;

• the controller, which defines the system behav- ior and integrates the inputs to the model.

The controller permits a user to modify the data of the model. Then, the model informs the view

about changes. The view changes visualization according to inputs of the model. We applied MVC architecture to our container terminal simu- lator. Fig. 16 presents a more elevated level class diagram of the simulation. The class TerminalSi- mulator, which is a subclass of Javax.swing.

JFrame, includes an object of each of classes Ter- minalModel, TerminalView, and TerminalControl- ler, to create the application TerminalSimulator.

The class TerminalView implements TerminalMod- elListener, which implements all the interfaces of our simulation. Therefore, TerminalView can re- ceive all events of the model for visualizing the simulation. The TerminalSimulator class does not contain any other attribute, its unique behavior is to start the program. Therefore, in Java, the class TerminalSimulator must contain a static method main to call the constructor, in order to create objects TerminalModel, TerminalView, and TerminalController.

5. Container terminal simulator

The simulator is used as a test bench to evaluate management policies produced by the optimiza- tion modules [2,5], and it is charged with a realistic reproduction of the activities and flows that occur inside the terminal [10,15,21]. It allows managers and engineers to experiment and compare different policies and techniques before their implementa- tion. It provides also a graphical interface in order

QuayQueue

Quay QuayCrane

ShipQueue TerminalModel

QuayCraneListener

ShuttleListener

ShipListener

QuayListener

TerminalModelListener

Fig. 15. A part of class diagram representing realizations of the simulator.

ShipQueue

+ShipArrived ( ShipEvent : shipEvent ) : void

<<interface>>

ShipEventListener

+ShipArrived (ShipEvent : shipEvent) : void

Fig. 14. Class diagram forShipQueueand its realization of the interfaceShipEventListener.

(16)

to have easy access to the current state of the sim- ulated terminal and to simulate particular events.

Performances of various management policies can be compared according to indicators [3,16,21]. These indicators must take into account the cost of cranes and operators during the various work shifts, penalty to be paid to shipping com- pany if ship departure is delayed and the income generated by each container loaded and unloaded from a ship. Besides these economical indicators, the simulator allows to assess the resource utiliza- tion and to measure congestion indicators such as the average queue length of operations on terminal cranes.

An important application of the simulator is re- lated to the problem of estimating cost functions and measures of performance not easily comput- able. The characteristics of the container terminals imply that the real cost of each container displace- ment is a complex function of several factors, whose influence has to be accurately investigated.

Therefore, a simulation tool able to represent dif- ferent scenarios is indispensable for a correct mod- eling of the problem. In our project, partially described in this paper, objectives and finalities fixed in [2,20] are also projected. The software components that we developed allow the deploy- ment of the simulator to reach such objectives. An- other important goal is the ability to generate

operational indicators of container terminal, such as

the global productivity

¼ total number of containers moved by crane total elapsed vessel service time ; the net productivity

¼ total number of containers moved by crane total time spent by crane servicing vessel ; quay crane and yard crane utilization index

¼ travel time þ working time

travel time þ working time þ waiting time ; shuttle utilization index

¼ travel time

travel time þ waiting time ; container yard occupancy rate

¼ occupied space per unit time total capacity ; average ship waiting time

¼ total waiting time of ships number of ships berthed :

Javax.swing.JFrame

TerminalSimulation

TerminalView

TerminalModel TerminalController

TerminalModelListener

Model View

Application

Controller 1

1

1

1

1 1

Fig. 16. Class diagram for container terminal simulation.

(17)

Starting from current terminal configuration in term of occupancy level, the expected plan of ship arrivals (Fig. 17), predictions from the forecasting system in term of expected import/export flows, and a storage policy based on some reservation/

allocation criteria for all the different areas inside the terminal (Fig. 18), we run the simulation in or- der to produce some possible final terminal states.

In this step we can make an evaluation of the pol- icy adopted in the experiment. Our cost function is

Fig. 17. A dialog box for terminal configuration.

Fig. 18. A dialog box for resources allocation.

(18)

based on different factors such as the ratio between import areas and export areas, the violation of the storage criteria and some performance indexes of the terminal equipments.

In Fig. 19, we report a typical screen-shot of the terminal during the simulation. A ship is moored and it is being unloaded by three quay cranes.

Containers are to be moved and positioned on a yard area. In Fig. 20, a histogram that is updated on-line is reported. This histogram shows the num- ber of shuttle-trucks that have waited in the quay queue. It is important to reduce the average of queue length under cranes: a better balance in the crane usage reduces the possibility of having lengthy queues. The application of computer gen- erated management policies could improve the ter- minal performance, making possible the allocation of fewer resources, thanks to a better usage of the

cranes. In Fig. 21, we present the quay crane utili- zation index calculated during unloading opera- tions. The queue length of shuttle trucks underneath a quay crane during loading opera- tions is reported in Fig. 22. Analogous results are produced for yard cranes. In Table 4, some opera- tional indicators, averaged over the number of cranes and worked shifts, are presented.

Clearly, the reproduction of several sample paths of the state variables of our interest to carry out a statistical analysis of the simulation output data is required, to achieve some significant in- sights upon the system behavior, or, in other words, upon the goodness of some implemented

Fig. 19. A snapshot of the simulation tool interface.

0 5 10 15 20 25 30

0 10 15 20 25 35 35 40 45 50 55 60 65 70 75 waiting time

shuttle trucks

Fig. 20. Histogram representing waiting time in quay queue for

shuttle trucks servicing the ship. 0%

20%

40%

60%

80%

100%

1 11 21 31 41 51 61 71 81 91 101 111

Service time Idle time

Quay crane operations

Fig. 21. Quay crane utilization index during unloading operations.

(19)

policies of resources dimensioning and man- agement.

6. Simulator calibration and validation

Calibration and validation play a very impor- tant role since the terminal operators must actively co-operate with the simulation specialists in order to gain confidence in the model results. Advanced graphical interfaces and virtual reality can also be useful to provide immediate insight into the model workings even to the operators with scarce techni- cal background [13].

Once the simulator is available, it must be cali- brated and validated in order to verify its capabil- ity of reproducing the real terminal behavior. In this phase, the simulation module evolves using the same inputs and policies used by the terminal management over the calibration and validation periods. In general, calibration means tuning the simulator parameters in order to match as close as possible the simulation outputs with the data measured in the real terminal over a given time interval. The validation phase ensures that the re-

sult of the calibration is such that the simulator reproduces the reality under different conditions.

In this section, we give a short example of calibra- tion and validation of our simulator. All the data used in the present paper are taken from the data- base of the Casablanca container terminal in Mor- occo. The focus is on the period of two weeks, from 5/11/2004 to 5/24/2004. The data describe the activity of Casablanca container terminal in great detail, in such a way that every container movement can be found. The database reports also the resources that move container, the time of the operation and the origin and destination of the movement, described by three coordinates: bay, row, and tier in the terminal yard. The database tracks also the activity of every transport means that enters and leaves the terminal (trucks, ships, end trains). From these data, it is considered the period that start 1 am on the 5/11/2004 and ends after 10 shifts of 6 hours each. The advantage of such a choice is that no ships are at the terminal at the selected starting time, and the system is therefore in a natural initial empty state; finding the initial empty state is often one of the major problems for the simulation practitioner. The four shifts constitute the calibration period and the remaining shifts (from 5 to 10) are used for valida- tion. The calibration parameters are

• the mean time l

qc

needed to move a container from a ship to the shuttle truck for each quay crane and vice versa,

• the mean time l

yc

needed to move a container from a yard position to the shuttle truck waiting for service for each yard crane and vice versa,

• the mean time l

st

of travel of a shuttle truck from point to point.

The arrival dates of ships, trains and trucks are deterministic (trace driven simulation) since they are read from the Casablanca container terminal database. Note that a truck carries at most two containers, while trains bring an average of 50 con- tainers and ships vary from hundreds to thousands of containers. Their identification numbers are read from the database and then simulation evolves loading and unloading these transport means.

0 1 2 3 4

1 21 41 61 81 101

operations

queue length

Fig. 22. Queue length of shuttle trucks waiting for quay crane service, during loading operations.

Table 4

Operational indicators calculated on the base of the simulation results

The average of utilization index (%) Shuttle trucks 37

Yard cranes 82.5

Quay cranes 73.2

(20)

A set of 10 experiments (simulations) was per- formed. Each experiment is identified by a different combination of the three calibration parameters.

Table 5 reports real data with the simulated results for a quay crane (QC1). Only two experiments are presented in the table.

The simulation combinations correspond to the values of the parameters reported in Table 6.

Analogous results are produced for the yard cranes. In order to establish a ranking among dif- ferent parameters combinations, we calculated the error measure (Err) that is based on the distance between the real number of containers moved by each crane and the simulated number, in each shift. This error is then normalized with respect to the maximum number of containers which can be moved by a crane, and averaged over all the quay cranes and over the number of worked shifts [16]. The best set of parameters is found at the value Err = 0.13, corresponding to experiment

‘‘simulation1’’. The interpretation of such a value is that, on average, the simulator moves a number of containers (per shift and per quay crane) that is 13% far from the real one, as compared to the maximum possible distance (i.e., 100% error).

The validation of this model returns Err = 0.20.

Table 7 reports the results for the validation of an other quay crane (QC2).

The results deserve a few words of comment, since they seem susceptible to improvements. An important remark is that our objective is to obtain a model of the terminal to test alternative schedul- ing policies. At this stage of research we want to assess the policies where the only bottlenecks can be caused by resource competitions on the yard that is by creation of lengthy queues under the yard or quay cranes.

Up to that point, the focus in on the terminal model which is a reasonable compromise between the ideal situation, where all cranes work in good conditions, and the worst case scenario, where cranes and operators show marked drops in their performances.

7. Conclusion

This paper represented a part of our research work aiming at improving management practices of a container terminal. In this paper we have pre- sented the simulator that we have developed. The proposed model is not exhaustive, other factors and other models are to be integrated in future.

In the present phase of the project, the specifica- tions of the simulator are calibrated and validated.

The deployment of the simulation on terminal site is foreseen in the project. Using the simulation model of the terminal, we evaluated policies gener- ated by optimization algorithms. Here, the simula- tion acts as a test bench to assess effectiveness and robustness of policies in such a non-deter- ministic environment. The web-based information technology has to be considered to improve inter- operability between the simulator and all the port

Table 5

Calibration of QC1 Shift Number of

containers moved by QC1

Number of containers moved in simulation1

Number of containers moved in simulation2

1 85 109 109

2 75 82 78

3 92 93 135

4 116 107 102

Table 6

The calibration parameters lqc(Min/

container)

lyc(Min/

container)

lst(Min/

container)

Simulation1 1.6 1.8 2.5

Simulation2 1.3 2.1 2.6

Table 7

Validation of QC2 Shift Number of

containers moved by QC2

Number of containers moved in simulation1

Number of containers moved in simulation2

5 95 117 86

6 86 79 123

7 79 73 104

8 93 108 72

9 84 101 98

10 95 82 73

(21)

information system components. Simulation tools, such as the one described in this paper, will surely contribute to the improvement of internal opera- tions of container terminals.

References

[1] A. Ballis, A. Strathopoulos, A paradigm of information and operational control in port management systems, In:

Proceedings of the IFAC Conference on Transportation Systems, Chania, Greece, 1997, pp. 856–860.

[2] G. Bontempi, L.M. Gambardella, A.E. Rizzoli, Simulation and optimization for management of intermodal terminals, In: Proceedings of the European Simulation Multiconfer- ence 1997, Istanbul, June 1–4, 1997, pp. 646–652.

[3] A. Boulmakoul, M. Rida, Discrete event simulation component specification for container terminals opera- tional management, In: Proceedings of the 2nd IEEE ISSPIT (International Symposium on Signal Processing and Information Technology), Marrakesh, Morocco, December, 18–21, 2002, pp. 266–271.

[4] M. Fortino, P. Legato, F. Reitano, Yard planner: Uno strumento di simulazione per lÕorganizzazione del piazzale e lÕanalisi delle movimentazioni dei contenitori presso il terminale di gioia tauro, In: G.E. Cantarella, F. Russo (Eds.), Metodi e Tecnologie dellÕIngegneria dei Trasporti, Franco Angeli, 2002.

[5] L.M. Gambardella, A.E. Rizzoli, M. Zaffalon, Simulation and planning of an intermodal containers terminals, Simulation Journal in Harbour and Maritime Simulation 21 (2) (1998) 107–116 (Special Issue).

[6] L.M. Gambardella et al., Simulation and forecasting in intermodal container terminal, In: Proceedings of the 8th European Simulation Symposium, Genoa, Italy, October 24–26, 1996.

[7] Y. Hayuth, M.A. Pollatschek, Y. Roll, Building a port simulator, Simulation 63 (3) (1994) 179–189.

[8] L. Prylli, Distributed simulation of parallel computers, Technical Report 95-12, LIP/ENS-LYON, 46 allee dÕItalie 69364 Lyon, France, 1995.

[9] P. Legato, R.M. Mazza, Berth planning and resources optimisation at a container terminal via discrete-event simulation, European Journal of Operational Research 133 (2001) 537–547.

[10] M. Mastrolilli, N. Fornara, L.M. Gambardella, A.E.

Rizzoli, M. Zaffalon, Simulation for policy evaluation,

planning and decision support in an intermodal container terminal, in: Y. Merkuryev, A. Bruzzone, L. Novitsky (Eds.), Proceedings of the International Workshop ‘‘Mod- eling and Simulation within a Maritime Environment’’, Riga, Latvia, September, 6–8, 1998, pp. 33–38.

[11] J. Misra, Distributed discrete-event simulation, Computing Surveys 18 (1) (1986) 39–65.

[12] H. Praehofer et al., Concepts and architecture of a simulation framework based on JavaBeans component model, Future Generation Computer Systems 17 (2001) 539–559.

[13] M. Rida, A. Boulmakoul, R. Laurini, Calibration and validation of container terminal simulation, In: Proceed- ings of the 3rd IEEE ISSPIT (International Symposium on Signal Processing and Information Technology), Darm- stadt, Germany, December 14–17, 2003.

[14] M. Rida, A. Boulmakoul, R. Laurini, Object oriented approach and Java based-distributed simulation for con- tainer terminal operational management. ISE/SCS, Mon- treal, Quebec, Canada, July 20–25, 2003, pp. 81–86.

[15] A.E. Rizzoli, N. Fornara, L.M. Gambardella, A simula- tion tool for combined rail-road transport in intermodal terminals, In: International Congress on Modeling and Simulation, MODSIM99, Hamilton, New Zealand, December, 6–9, 1999.

[16] A.E. Rizzoli, L.M. Gambardella, M. Zaffalon, M. Mas- trolilli, Simulation for the evaluation of optimized opera- tions policies in a container terminal, In: Maritime and Industrial Logistics Modelling and Simulation, HMS99, Genoa, Italy, September, 16–18, 1999.

[17] A. Sawhney et al., Java-based simulation of construction processes using SILK, In: Proceedings of the Winter Simulation Conference, 1999.

[18] Sun Microsystems. Available from: <http://java.sun.

com>.

[19] J.E. Taylor Simon et al., Developing interest management techniques in distributed interactive simulation using Java, in: Proceeding of the Winter Simulation Conference, 1999.

[20] Y.Y. Yun, Y.S. Choi, A simulation model for container- terminal operation analysis using an object-oriented approach, International Journal of Production Economics 59 (1999) 221–230.

[21] M. Zaffalon, A.E. Rizzoli, L.M. Gambardella, M. Mas- trolilli, Resource allocation and scheduling of operations in an intermodal terminal, In: 10th European Simula- tion Symposium and Exhibition, Simulation in Industry, ESS98, Nottingham, UK, October 26–28, 1998, pp. 520–

528.

Références

Documents relatifs

Although both frameworks address different abstraction levels, the logical design of using object oriented classes to encapsu- late individual distribution problems provides

We show in Figure 7 snapshots of heat (resp. mass concentration) for a twenty-layer di ffusion cloak. mass concentration) is clearly shown to be constant inside the invisibility

Centronuclear myopathy due to a heterozygous de novo dominant mutation in the skeletal muscle ryanodine receptor (RYR1) gene has to date been reported in only one case [82],

this paper is to represent and describe the set of the Gauss digitizations of Γ obtained using the grids generated by the action of the translation group on the standard

If developers intend to use unit test case generators to achieve fast shallow coverage of their classes, methods based on random search are as effective as evolutionary methods,

The experiment is conducted in a towing tank with a rectangular cross section (10m width and 0.4m water depth) at DST both for ship resistance and squat,

To have an uniform and transparent mechanism to store values of a field, our different structures that keep states of this field for linear, backtracking and branching

containers to AGVs. The problem of dispatching containers to AGVs consists of choosing the best way of designating a particular AGV to transport a container. This