Table of Contents

Table of Contents

Tutorial Exercise 4

Tutorial Exercise 4

Exercise Information

A station receives a passenger every 10 seconds. This passenger checks in for 10 seconds and waits in line to get on the next subway. The subway arrives every 1000 seconds and has a capacity of 40 passengers per trip. The destination is 1 kilometer away and, when passengers arrive, they have to check out, which lasts 10 seconds. The Stations have a capacity of 40 passengers and is interesting to know the number of passengers waiting outside de initial station, as well as the number of passengers that arrived at the destination.

Creating objects

In order to achieve the solution for the problem, you should create the following objects:

  • Create one Source Train.
  • Create four Rails.
  • Connect Source Train to the Rail1 ConnectPoint and then connect Rail1 to Rail2, Rail2 to Rail3 and Rail3 to Rail4 via proximity.
  • Create two Rail Control Points and put one on Rail2 and one on Rail4.
  • Create two Stations and connect the central port of each one to a Control Point.
  • Create one Queue and connect it to the Station on Rail2. On Statistics, in the properties menu, pin the "Content vs Time" on a New Dashboard to know the number of passengers waiting outside the initial station.
  • Create one Processor and connect it to the Queue.
  • Create one Source and connect it to the Processor, set its Inter-Arrivaltime to 10.
  • Create one Processor and connect the Station on Rail4 to it.
  • Create a Sink and connect the final Processor to it. On Statistics, in the properties menu, pin the "Throughput" on the Dashboard already created to know the total number of passengers that arrived.
  • Create a Sink and put it next to Rail4, no need to connect it.
Exercise4Objs

Your model should be looking like this.

Exercise4Objs

Objects Configuration

Configure your Stations as shown in the image below.

Exercise4Station

Configure your Rail3 as shown in the image below.

Exercise4Rail

Processflow Configuration

In order to achieve the solution for the problem, you should create the following processflow tasks:

  • Create a Source.
  • Create a CreateTrain.
  • Create a MoveTrain.
  • Create a LoadWagon.
  • Create a MoveTrain.
  • Create a UnloadWagon.
  • Create a DestroyTrain
  • Create a Sink.

Your processflow should be looking like this.

Exercise4PF

To configure your processflow tasks follow the steps:

  • On source, set the Inter-Arrivaltime to 1000.
  • On CreateTrain, points the SourceTrain reference to your SourceTrain. Set MaxWeight to 40 and the LocomotiveType to Passenger.
  • On MoveTrain, set train reference to token.train and destiny to the RailControlPoint on Rail2.
  • On LoadWagon set train reference to token.train and ControlPoint reference to the RailControlPoint on Rail2.
  • On second MoveTrain, set train reference to token.train and destiny to the RailControlPoint on Rail4.
  • On UnloadWagon set train reference to token.train and ControlPoint reference to the RailControlPoint on Rail4.
  • On DestroyTrain set train reference to token.train and Sink reference to the Sink next to Rail4.
Exercise4PF

With this configuration your model is ready.