Five tonnes of material must be transported from one station to another, a locomotive must travel from the empty station to the loaded one, going through a 300 meters rail. The locomotive can carry 500 kilograms on each trip, going at a velocity of 10 m/s, both coupled and uncoupled.
In order to achieve the solution for the problem, you should create the following objects:
- Create one Source Train.
- Create three Rails, then resize Rail2 xvalue to 300. Connect Source Train to the Rail1 (using the A key) and then connect Rail1 to Rail2 and Rail2 to Rail3 via proximity.
- Create two RailControlPoint and place one on Rail1 and the other one on Rail3. 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 two Stations, then connect its center port (using the S key) to the RailControlPoint on Rail1 and the other station to RailControlPoint on Rail3.
- On the initial Station, set the Max Weight to 5000 (5 tonnes) and, on the other one, set Start Weight and Max Weight to 5000 (5 tonnes).
Your model should be looking like this:
In order to achieve the solution for the problem, you should create the following processflow tasks:
- Create a Schedule Source.
- Create a CreateTrain.
- Create a MoveTrain.
- Create a LoadWagon.
- Create a MoveTrain.
- Create a UnloadWagon.
- Create a Decide.
- Create a Sink.
Your processflow should be looking like this.
To configure your processflow tasks follow the steps:
- On CreateTrain points the SourceTrain reference to your SourceTrain, set both the Locomotive Uncoupled and the Locomotive Coupled to the value 10 e and the MaxWeight to 500.
- On first MoveTrain of the block, 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 second MoveTrain of the block, set train reference to token.train and destiny to the RailControlPoint on Rail1.
- On UnloadWagon set train reference to token.train and ControlPoint reference to the RailControlPoint1 on Rail1.
- On the Decide, set a conditional decide with the value "getvarnode(Model.find("Silo2"), "currentWeight").value == 0", where "Silo2" is the name of the loaded station and can be different depending on the order of creation of the objects. The connector 1 should be the Sink and the connector 2, the block that loads and unloads the train.
With this configuration your model is ready.