Information Technology Reference
In-Depth Information
3.3.1 Main Aspects of an AMF-Based PIM
Some main aspects have to be considered in the definition of an AMF-based PIM; in
this section, the focus is on those which are relevant since they affect the simulation
execution of the derived PSMs and which, in particular, concern the proper definition
of the Execution Setting of an AAct, and the exploitation of SAttributes to enable
communication among SAgents (see Figure 3).
An AMF-based PIM is defined according to a time-stepped driven simulation ap-
proach (the simulation time is incremented in fixed steps) [30], in which, at each si-
mulation step t , a set of AAct instances which can be executed and their execution
order are defined. Specifically, in a step t: (i) for each AAct, belonging to the AGroup
of an SAgent SA, the number of its instances depends on the number of SA instances;
(ii) the AAct Execution Settings determine the AAct instances to be executed and
their execution order.
The Execution Setting of an AAct is characterized by the tuple <startingTime, pe-
riod, priority> where:
startingTime is the first simulation step at which the instances of the AAct are to
be executed;
for each instance of the AAct, period is the number of simulation steps which
must elapse between two subsequent executions;
in a simulation step the priority value affects the execution order of the enabled
AActs instances (an AAct is enabled at the simulation step t if t is equal to the
AAct startingTime which is incremented by a multiple of its period ).
In a simulation step t all enabled AAct instances (regardless of whether they belong to
a specific SAgent instance) belong to the same set, Enabled(t) , from which the AActs
are scheduled for execution on the basis of their priority (see Figure 4). As a conse-
quence, the AAct Execution Settings have to be properly defined to guarantee right
execution order between AAct instances of both the same SAgent instance (intra-agent
AAct interleaving) and different SAgent instances (inter-agent AAct interleaving).
Moreover, in defining the AAct Execution Settings, the different AAct types
should be also considered (see Figure 3). In particular, AActs of type AInitialize are
executed once and before any other AAct of the SAgent ( starting Time and period are
both fixed to 0), AActs of type ARule are executed once at each iteration ( starting
Time and period are both fixed to 1), no fixed settings are associated to AActs of the
ASchedule and APerform types as ASchedule supports periodicity greater than that of
ActScheduling (t) {
AAI = Enabled(t); /* Enabled(t) returns the set of enabled AAct instances at t */
while (not empty AAI) {
MPE = maxPriorityEnabled(AAI) ; /* maxPriorityEnabled(AAI) returns a set
consisting of the AAct instances with maximum priority in AAI */
AAI = AAI - MPE;
while (not empty MPE) {
aa = randomGet(MPE); /* randomGet(MPE) returns an AAct instance randomly
chosen in (and removed from) MPE */
execute (aa);
}
}
}
Fig. 4. Execution of an AMF-based simulation step
Search WWH ::




Custom Search