Tutorial Exercise 6
Exercise Information
A passenger train with the capacity to transport 40 people, travels through a simple railway. In the map, the train goes from point A, where it collects passengers, through point B for a quick stop, all the way to point C, where the passengers are left. Passengers wait at the Station in point A, and leave in a line after the Station in point C. Four trains go through the path each day, in intervals of 3 hours. They start their schedule at 6 a.m. and finish it at 6 p.m.
Creating objects
In order to achieve the solution for the problem, you should create the following objects:
- Create one Source Train.
- Create two Rails.
- Connect Source Train to the Rail1 (using the A key) and then connect Rail1 to Rail2 via proximity.
- Create one Rail Control Point and put it on Rail2. The RailControlPoints should change color if they are connected correctly to the Rails. We recommend the creation of the RailControlPoints in a empty space and, after that, you can place it on the Rails.
- Create a Station using the Passenger Station model and connect the central port to the Control Point (using the S key).
- On the Station, set Max Weight to 40, Units Per FlowItem to 1 and FlowItem Class to Man.
- Create one Queue and connect it to the Station(using the A key).
- Create one Source and connect it to the Queue (using the A key), set its to Inter-Arrivaltime and create 40 items at time 0, set the FlowItem Class to Man. At an interval of 10800 seconds between arrivals.
- Create the GisMap, and create three points in it using the GisMap library. Connect the three points to form the path, select the type of road to Railways.
- Create a Gisportal and connect it to the initial point in GisMap (using the A key).
- Create another Gisportal and connect it to point B in GisMap (using the A key). Connect the Gisportal 1 to Gisportal 2 as well.
- Create two more Rails.
- Connect the Gisportal2 to the frist rail of the second path (using the A key) and then connect Rail3 to Rail4 via proximity.
- Create one more Rail Control Point and put one on Rail4. Create another Station using the Passenger Station model and connect the central port to the Control Point (using the S key).
- Repeat the steps of creating the Gisportal3 and Gisportal4, connecting them to points B and C, then creating another two rails and connecting Gisportal4 to it. It is important to connect the Gisportal3 and Gisportal4 amongst each other as well.
- Repeat the steps of creating a PassegengerStation and a ControlPoint to Rail6 and connecting them through a central port.
- Create a Sink and position it at the end of Rail6.
- Finally, create a Queue and connect the Station to it, set it to stack flowitems in a horizontal line.
- Create a Processor and a Sink, set the process time to 5 seconds. Lastly, connect the Queue to the Processor, and the Processor to the sink.
Your model should be looking like this.
Processflow Configuration
In order to achieve the solution for the problem, you should create the following processflow tasks:
- Create an Inter-Arrival Source.
- Create a CreateTrain.
- Create a MoveTrain.
- Create a LoadWagon.
- Create a Send to Portal.
- Create a MoveTrain.
- Create a Send to Portal.
- Create a MoveTrain.
- Create an UnloadWagon.
- Create a DestroyTrain
- Create a Sink.
Your processflow should be looking like this.
To configure your processflow tasks follow the steps:
- On source, set the Inter-Arrivaltime to 10800.
- On CreateTrain, point 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, ControlPoint reference to the RailControlPoint on Rail3 and Load Type to a "Load Time Constraint" of 60 seconds.
- On Send to Portal set the portal reference to the Gisportal1.
- On second MoveTrain, set train reference to token.train and destiny to the RailControlPoint on Rail4.
- On the second Send to Portal set the portal reference to the Gisportal3.
- On third MoveTrain, set train reference to token.train and destiny to the RailControlPoint on Rail6.
- On UnloadWagon set train reference to token.train and ControlPoint reference to the RailControlPoint on Rail6.
- On DestroyTrain set train reference to token.train and Sink reference to the Sink next to Rail6.
With this configuration your model is ready.