Main Page/Resources/E-motions/Airport

From Atenea

Jump to: navigation, search



The Airport example models the airport check-in system. Once passengers arrive to the airport, they join to queue and finally obtain the boarding card in a check-in desk. The example approach enables to get information about check-in system waiting time and cost. The simulation results allow to analyze the queueing system performance.

System Modeling


The metamodel of this system is shown here:


The Check-in system (Airport) is composed of Check-in Desks and Dispatchers. Dispatchers deal with the boarding queue management and Check-in Desks provide the passengers with the boarding card. Dispatchers and Check-in Desks both of them have two attributes, thresholdMin and thresholdMax to manage the boarding queue. Each desk spends some time, serviceTime, to attend to a passanger and will have a maximun number of passengers queueing up, maxSize. Passengers have two attributes, arrival and departure, to register the arrival and departure instant to the boarding system respectively. In addition the atributte arrivalCheckIn will contain the arrival instant to a Check-In Desk. The problematic passengers will set true the troublemaker attribute.

We describe a graphical concrete syntax for this language by defining a gcs model. In a gcs model, we associate every class of the metamodel with a picture. This concrete syntax will be used in the definition of the behavioral rules.


We are interested on monitoring some parameters for analyzing the boarding system performance. For that purpose we make use of observers. An observer is an object whose purpose is to monitor the state of the system: the state of the objects, of the actions, or both. Observers, as any other objects, have a state and a well-defined behavior. The attributes of the observers capture their state and are used to store the variables that we want to monitor. We have defined an Observers metamodel:


GeneralOb is a general observer for counting on passengers, waiting average time and total cost. DispatcherOb registers the number of passengers who have been attended and the time which passengers have been queueing up. The DeskOb objects register the number of passengers attended by their associated CheckInDesk object.

The observers allow us to get some parameters:

  • Service Average Time
  • Total Cost
  • Maximum Waiting Time

This is the graphical concrete syntax defined for the Observers metamodel:



We have designed the following set of rules and helpers to model the behavior of Airport system:


The InitialModel rule creates the initial configuration of the system. The NotExecutedBefore NAC pattern forbids the triggering of the rule if was already performed before (note the realized status label in the action execution’s header), independently of its participants. No other condition is required: the LHS pattern is empty, and therefore it is always fulfilled. This rule creates all the model objects specified in the figure:


The NewPassenger rule simulates the arrival of passangers to the airport. The passengers arrival time is estimated by a variable, ArrivalRate, using a Gauss distribution. At the moment of their arrival to the airport, passengers join the dispatcher queue and the current time elapse is given to their arrival attribute. We use here the GeneralOb observer to count the number of passengers arrived at the airport.


The AssignCheckInDesk rule assigns the first passenger of the queue to any Check-In Desk which queue size is smaller than maxSize attribute value. The NAC pattern forbids the triggering of the rule if it is already being executed in that instant. The Dispatcher has an DispatcherOb observer associated. It calculates the average queue length and the average waiting time.


The CheckInPassenger rule simulates the registration of passengers in the Check-In Desks. Once a passenger obtains his boarding card, he leaves the desk's queue. A DeskOb observer is linked to each Check-In Desk. These observers calculate the average queue length and the average waiting time. In addition a GeneralOb observer register the average delay time of the system and the maximum waiting time. The rule duration is specified by a variable, checkInDuration, using a exponential distribution.


If the OpenCheckInDesk rule is triggered, a Check-In Desk starts to serve passegers. A new desk is opened if the desk queue size is larger than the product between the number of opened desk and the thresholdMax attribute value. The opened attribute of the desk is set true. On the other hand the CloseCheckInDesk rule allow us to close a Check-In Desk. A desk is closed if the dispatcher queue size is smaller or equal than the product between the number of opened desk and the thresholdMin attribute value. The opened attribute of the desk is set false. We have included a condition to keep opened at least one desk.



Finally the WorkingTimeCalculation rule calculates the opening total time for each Check-In Desk and the boarding process total cost.



We can configure eMotions launcher to run the simulation as shown in the figure:


We do not need to specify an initial model since we have a rule that creates it. Of course, we can simulate the system with different initial configurations by modifying the InitialRule.


The file contains the project with all files required to try this example: the metamodel definition, the graphical concrete syntax for the metamodel and its corresponding behavioral specifications. To import this project, right click on the navigation view Import...-> General -> Existing Projects into Workspace -> Select archive file and then select the file.

Personal tools