Phase 3. Defining Transport
We will create the initial
agent type configuration.
is the most advanced construct to describe event- and time-driven
behavior. For some objects, this event- and time-ordering of operations
is so pervasive that you can best characterize the behavior of such
objects in terms of a state transition diagram – a statechart.
has states and transitions. Transitions may be triggered by
user-defined conditions (timeouts or rates, messages received by the statechart,
and Boolean conditions). Transition execution may lead to a state
change where a new set of transitions becomes active. States in the statechart
may be hierarchical, i.e. contain other states and transitions.
is used to show the state space of a given algorithm, the events that
cause a transition from one state to another, and the actions that
result from state change.
Add the transport variables
- Go to the Projects
and double-click Transport to open it.
- Add a Variable from the Agent
- Name the variable request
and set its type to ServiceRequest:
Draw transport statechart
- We will use the Statechart
palette elements to define the transport agent type behavior. Drag the
element into the graphical editor of Transport. It
defines the beginning of the whole diagram. Add a State by
dragging it from the Statechart palette
and dropping the
state under the statechart entry point. To add a transition,
double-click Transition in
the palette. Its icon
will turn into ,
it means the tool is in the
Now you can draw transitions by clicking in the graphical editor. Since
the transitions must be connected to the states, you can click in the
state when drawing to ensure proper connection. When the elements are
successfully connected, AnyLogic diaplays a cyan-colored point in the
place of connection.
- At this phase we will only
create an "empty" statechart
that consists of four
states and four transitions of three different
- The states are called AtCenter, MovingToMC, Servicing, MovingToTurbine.
basically all actions and routes of trucks and helicopters in the
model. Make sure you
follow the structure that is shown in the figure below.
- The "internals" of some of
these states and transitions refer to
the model elements we have not yet defined. On the other hand, we need
this statechart now because some of those model elements that we are
going to define in further phases refer to this statechart and states
in it. That is why we will finish configuring Transport
in the very end of model development process.
Let us next define the transport type choice according to
type and the availability of trucks and helicopters at the maintenance
Setting up the transport base
Defining Maintenance Center behavior