Phase 6. Finishing the
In this phase we will add the final details of
elements. We will finish
defining the transport movement
between the maintenance center and turbines.
Define the transport type
- Double-click Truck
in the model tree to open its diagram.
- Go to the Properties
section Agent actions and
agent's type in the On startup
field: type = AUTO;
- In the Helicopter
specify the type accordingly: type = AVIA;
Define the transport
- 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
- Select the transition from the branch to MovingToTurbine.
We need to specify its Condition
and Action: [the
condition code checks out whether at this moment there are any requests
from a turbine for scheduled maintenance or failure repair; if there
are, the action code checks what kind of request is it and sends the
corresponding type of transport to the turbine]
- The states (AtCenter, MovingToTurbine, Servicing, MovingToMC)
do not have
any specific properties. We will define the logic of
transport movement using different kinds of transitions.
- The transition from AtCenter
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.
- The transition from MovingToTurbine
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.
- The next transition goes
The action to
go back to the maintenance center is
triggered by Timeout .
- In the figure above
that the last transition, from MovingToMC
to the branch,
is triggered by Agent
When this happens,
the transport decides whether it has to move to another turbine to
fullfull a new maintenance request, or it can go back to the
maintenance center where it will remain available
until another turbine needs service.
If you open now Truck
Helicopter you will
that there is Transport
projection. These elements are visible here and you can
select them to see their properties for your convenience, but they are
Run the model. Initially all turbines are operating (indicated
Then we can
see how a truck moves to the turbine that
needs scheduled maintenance (yellow
and the helicopters are moving to the turbines which are out of service
to perform urgent repair works.
We have finished defining logic of the model, let us
some animation elements, configure 3D animation view and explore the
model during run-time.
Defining Turbine behaviour
Running and exploring the model