Phase 6. Finishing the Transport logic

In this phase we will add the final details of  Transport statechart elements. We will finish defining the transport movement between the maintenance center and turbines.

Define the transport statechart 

  1. Double-click  Transport in the model tree to open its diagram. There you can find the statechart we have added before. Now we can configure its settings. 
  2. Select the state AtCenter. We need to specify its Entry action:

  3. Three other states (MovingToMC, Servicing, MovingToTurbine) do not have any specific properties. We will define the logic of transport movement using different kinds of transitions. 
  4. The transition from AtCenter to MovingToTurbine is triggered by Message  of type ServiceRequest. Since the transition is fired Unconditionally, you need to specify Action that the transport should take: move to the turbine coordinates.

  5. The transition from MovingToTurbine to Servicing is triggered by Agent arrival . A lorry or helicopter that reached the broken turbine will start their tasks immediately after arrival. When the repair is finished and so the turbine signals, the transport can go home.

  6. The next transition goes from Servicing to MovingToMC. The action to go back to the maintenance center is triggered by Timeout

  7. In the figure above you see that the last transition, from MovingToMC to AtCenter, is triggered by Agent arrival . When this happens, the transport is back at the maintenance center and remains available until another turbine needs service.

If you open now  Truck or Helicopter you will see that there is  Transport elements projection. These elements are visible here and you can select them to see their properties for your convenience, but they are not editable here:

Run the model. Initially all turbines are operating (indicated with green). Then we can see how a truck moves to the turbine that needs scheduled maintenance (yellow turbines) and the helicopters are moving to the turbines which are out of service (red turbines) to perform urgent repair works.

Reference model: Maintenance - Phase 6

We have finished defining logic of the model, let us now add some animation elements, configure 3D animation view and explore the model during run-time.

          Phase 5. Defining Turbine behaviour

          Phase 7. Running and exploring the model