# Tutorial Exercise 5

## Exercise Information

Products need to be transported from City A to City B by rail and stopping at stations. At the station in City A there are 100 units of the products, maximum weight within the station of 100000(10 tonnes) and start weight 10000 and the station in City B is initially empty and maximum weight 10000. The locomotive has a maximum speed of 10 m/s when uncoupled and a maximum speed of 8 m/s when coupled. After the first departure, the train returns only after one hour. The locomotive has only one wagon with maximum weigth 2500(2.5 tonnes). Create a model that represents this problem.

Use Map to enter the Points of the cities:

• Coordinates of city A: latitude -23.9506371176703 and longitude -46.317120438522
• City B coordinates: latitude -23.6554281754109 and longitude -46.5253099640223

## Creating objects

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

• Create one Source Train.
• Create seven Rails, then resize every Rail xvalue to 30. Connect the Source Train to the Rail2 (using the A key) and then connect Rail1 to Rail2, Rail2 to Rail3, Rail4 to Rail5, Rail5 to Rail6 and Rail6 to Rail7 via proximity, Rail3 and rail4 will not be connected .
• Create a RailControlPoint and place it on Rail1, Rail3, Rail6 and Rail7. The RailControlPoint should change color if it is connected correctly to the Rail. We recommend the creation of the RailControlPoint in a empty space and, after that, you can place it on the Rail.
• Create two Stations, then connect its center port (using the S key) to the RailControlPoint on Rail3 and the other station to RailControlPoint on Rail6.
• On the initial Station, set the Start Weight and Max Weight to 10000 (10 tonnes) and, on the other one, set Max Weight to 10000 (10 tonnes).
• Create the Map and two Points. Inside the map the points have the coordinates:
• Point A: latitude -23.9506371176703 and longitude -46.317120438522.
• Point B: latitude -23.6554281754109 and longitude -46.5253099640223.
• Connect the Points with the A key, click on the path line and change the "Type" to Freight RailWays.
• Create Two GISPortal, connect with the A key GISPortal1 to GISPortal2 and Point A on the map and GISPortal2 to Rail5 and Point B.
• Create Two Sink, connect with the A key Silo2 to Sink1 and sink2 next to rail7(no connection).

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 a Schedule Source.
• Create a CreateTrain and a CreateWagon.
• Create a MoveTrain.
• Create a CoupleWagon.
• Create a MoveTrain.
• Create a LoadWagon.
• Create a SendToPortal.
• Create a MoveTrain.
• Create a UnloadWagon.
• Create a MoveTrain.
• Create a DestroyTrain.
• Create a Sink.

Your processflow should be looking like this:

To configure your processflow tasks follow the steps:

• In Schedule Source increase the number of arrivals to 4 and in the "Time" column enter:
• line 1: 0,
• line 2: 3600,
• line 3: 7200,
• line 4: 10800.
• On CreateTrain points the SourceTrain reference to your SourceTrain, set the Locomotive Uncoupled to 10 and set the Locomotive Coupled to 8.
• On CreateWagon points the RailControlPoint reference to the RailControlPoint on Rail1, set wagons quantity to 1 and set Max Weight 2500(2.5 tonnes).
• On first MoveTrain set train reference to token.train and destiny to the RailControlPoint on Rail1.
• On CoupleWagon set train reference to token.train and wagon reference to token.wagon.
• On second MoveTrain set train reference to token.train and destiny to the RailControlPoint on Rail3.
• On LoadWagon set train reference to token.train and ControlPoint reference to the RailControlPoint on Rail3. Leave the Load Type on Full Loaded Release Only.
• On SendToPortal
• 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 RailControlPoint1 on Rail6.
• On fourth MoveTrain set train reference to token.train and destiny to the RailControlPoint on Rail7.
• On DestroyTrain set train reference to token.train and Sink reference to the Sink next to Rail7

Part 1

Part 201

Part 3

With this configuration your model is ready.