![](bg6.png)
{ActivatedPlans,EnabledPlans,AreasPlan1},
transitions {ActivatePlan1,DisablePlan} and the
arcs that interconnect them.
• Each token of {ActivatedPlans,EnabledPlans}
is a couple of lists. The first list contains a couple
of values: the crisis area and the activated plan.
The second list contains areas concerned by the
activated plan.
• The behavior of the use/release of permit-
ted resources is represented by the places
{IdleResources, ActiveResources} and their rela-
ted arcs.
• Transitions ChangePlan1toPlan2 and
MergingCrisesAreas are switching transitions
(i.e. Next_plan(Change Plan1toPlan2) = Plan2
and
Next_plan(MergingCrisesAreas) =
MergedPlans). Moreover, the transition
MergingCrisesAreas is a high-priority tran-
sition and it implies the merging plans in the
situation of overlapping areas.
Idle Resources
ResourceXArea
1`(Police,A1)++
1`(Police,A3)++
1`(Police,A4)++
1`(Police,A6)++
1`(Police,A15)++
1`(Hospital,A1)++
1`(Hospital,A2)++
1`(Hospital,A6)++
1`(Hospital,A7)++
1`(Hospital,A15)++
1`(Hospital,A16)++
1`(Firefighter,A2)++
1`(Firefighter,A3)++
1`(Firefighter,A5)++
1`(Firefighter,A7)
Active Resources
ResourceXArea
Activated Plans
ListCriseXAreaXPlanXConcernedAreas
Areas Plan 2
Neighbors
1`(A1,[A2,A3,A4,A5,A6,A7,A8])++
1`(A2,[A1,A3,A4,A8,A21])++
1`(A3,[A1,A2,A4,A23])++
1`(A4,[A1,A3,A5,A14,A23])++
1`(A5,[A1,A4,A6,A9,A13,A14])++
1`(A6,[A1,A5,A7,A9])++
1`(A7,[A5,A9,A10,A11,A12,A13])++
1`(A8,[A1,A2,A20,A21,A22])++
1`(A9,[A5,A6,A7,A10])++
1`(A10,[A7,A9,A11,A19])++
1`(A11,[A7,A10,A12,A18,A19])++
1`(A12,[A7,A11,A13,A15,A16,A18])++
1`(A13,[A5,A7,A12,A14,A15,A16])++
1`(A14,[A4,A5,A13,A15,A23,A24])++
1`(A15,[A13,A14,A16,A24,A25])++
1`(A16,[A12,A13,A15,A25,A26])++
1`(A17,[A12,A16,A18])++
1`(A18,[A11,A12,A17,A19])++
1`(A19,[A11,A18])++
1`(A20,[A8,A21,A22])++
1`(A21,[A2,A8,A20,A22])++
1`(A22,[A7,A8,A20])++
1`(A23,[A3,A4,A14,A24])++
1`(A24,[A14,A15,A23,A25])++
1`(A25,[A15,A16,A24,A26])++
1`(A26,[A16,A25])
Enabled Plans
ListCriseXAreaXPlanXConcernedAreas
Areas Plan3
Neighbors
1`(A1,[A1,A10,A11,A12,A13,A14,A20,A21,A22,A23,A9,A2,A3,A4,A5,A6,A7,A8])++
1`(A2,[A2,A20,A22,A6,A7,A5,A14,A23,A1,A3,A4,A8,A21])++
1`(A3,[A3,A24,A6,A7,A8,A21,A5,A14,A1,A2,A4,A23])++
1`(A4,[A4,A9,A2,A6,A7,A8,A13,A15,A24,A1,A3,A5,A14,A23])++
1`(A5,[A5,A2,A8,A3,A10,A12,A16,A15,A23,A24,A7,A1,A4,A6,A9,A13,A14])++
1`(A6,[A6,A14,A10,A11,A12,A13,A2,A3,A4,A8,A1,A5,A7,A9])++
1`(A7,[A7,A1,A4,A6,A14,A19,A15,A16,A18,A5,A9,A10,A11,A12,A13])++
1`(A8,[A8,A5,A6,A7,A3,A4,A1,A2,A20,A21,A22])++
1`(A9,[A9,A4,A14,A12,A13,A1,A11,A19,A5,A6,A7,A10])++
1`(A10,[A10,A13,A12,A5,A6,A18,A7,A9,A11,A19])++
1`(A11,[A11,A15,A16,A5,A9,A13,A17,A7,A10,A12,A18,A19])++
1`(A12,[A12,A24,A14,A25,A26,A17,A19,A5,A9,A10,A7,A11,A13,A15,A16,A18])++
1`(A13,[A13,A23,A1,A4,A6,A24,A25,A26,A9,A10,A11,A18,A5,A7,A12,A14,A15,A16])++
1`(A14,[A7,A12,A16,A25,A6,A9,A1,A3,A14,A4,A5,A13,A15,A23,A24])++
1`(A15,[A26,A4,A5,A7,A12,A15,A23,A13,A14,A16,A24,A25])++
1`(A16,[A5,A7,A11,A18,A14,A16,A24,A12,A13,A15,A25,A26])++
1`(A17,[A17,A19,A25,A26,A7,A11,A13,A15,A12,A16,A18])++
1`(A18,[A10,A7,A13,A15,A16,A18,A11,A12,A17,A19])++
1`(A19,[A7,A10,A12,A17,A19,A11,A18])++
1`(A20,[A7,A1,A2,A20,A8,A21,A22])++
1`(A21,[A7,A1,A3,A4,A21,A2,A8,A20,A22])++
1`(A22,[A5,A9,A10,A11,A12,A13,A1,A2,A21,A22,A7,A8,A20])++
1`(A23,[A13,A5,A15,A25,A1,A2,A23,A3,A4,A14,A24])++
1`(A24,[A5,A13,A3,A4,A16,A24,A26,A14,A15,A23,A25])++
1`(A25,[A12,A13,A14,A23,A25,A15,A16,A24,A26])++
1`(A26,[A12,A13,A15,A24,A26,A16,A25])
Activate Resource
[mem ln a ]
Disable Resource
[mem ln a]
P_HIGH
Disable Plan
Activate Plan2
Merging Crises Areas
[(intersect ln1 ln2)<>[]]
P_HIGH
Change Plan 2 to Plan 3
[ mem lcap (c,a,Plan2)]
(r,a)
(r,a)
1`(lcap,ln)
(r,a)
(r,a)
([(c,a,Plan2)],a::ln) (a,ln)
1`(lcap1,ln1)++1`(lcap2,ln2)
1`(lcap,ln)
1`(lcap,ln)
1`(lcap,ln)
1`(lcap,ln)
(a,ln1)
Figure 5: Plan2 model.
Idle Resources
ResourceXArea
1`(Police,A1)++
1`(Police,A3)++
1`(Police,A4)++
1`(Police,A6)++
1`(Police,A15)++
1`(Hospital,A1)++
1`(Hospital,A2)++
1`(Hospital,A6)++
1`(Hospital,A7)++
1`(Hospital,A15)++
1`(Hospital,A16)++
1`(Firefighter,A2)++
1`(Firefighter,A3)++
1`(Firefighter,A5)++
1`(Firefighter,A7)
Active Resources
ResourceXArea
Activated Plans
ListCriseXAreaXPlanXConcernedAreas
Enabled Plans
ListCriseXAreaXPlanXConcernedAreas
Areas Plan3
Neighbors
1`(A1,[A1,A10,A11,A12,A13,A14,A20,A21,A22,
A23,A9,A2,A3,A4,A5,A6,A7,A8])++
1`(A2,[A2,A20,A22,A6,A7,A5,A14,A23,A1,A3,
A4,A8,A21])++
1`(A3,[A3,A24,A6,A7,A8,A21,A5,A14,A1,A2,
A4,A23])++
1`(A4,[A4,A9,A2,A6,A7,A8,A13,A15,A24,A1,A3
,A5,A14,A23])++
1`(A5,[A5,A2,A8,A3,A10,A12,A16,A15,A23,A24
,A7,A1,A4,A6,A9,A13,A14])++
1`(A6,[A6,A14,A10,A11,A12,A13,A2,A3,A4,A8,
A1,A5,A7,A9])++
1`(A7,[A7,A1,A4,A6,A14,A19,A15,A16,A18,A5,
A9,A10,A11,A12,A13])++
1`(A8,[A8,A5,A6,A7,A3,A4,A1,A2,A20,A21,A22])++
1`(A9,[A9,A4,A14,A12,A13,A1,A11,A19,A5,A6,
A7,A10])++
1`(A10,[A10,A13,A12,A5,A6,A18,A7,A9,A11,
A19])++
1`(A11,[A11,A15,A16,A5,A9,A13,A17,A7,A10,
A12,A18,A19])++
1`(A12,[A12,A24,A14,A25,A26,A17,A19,A5,A9,
A10,A7,A11,A13,A15,A16,A18])++
1`(A13,[A13,A23,A1,A4,A6,A24,A25,A26,A9,A10,
A11,A18,A5,A7,A12,A14,A15,A16])++
1`(A14,[A7,A12,A16,A25,A6,A9,A1,A3,A14,A4,
A5,A13,A15,A23,A24])++
1`(A15,[A26,A4,A5,A7,A12,A15,A23,A13,A14,
A16,A24,A25])++
1`(A16,[A5,A7,A11,A18,A14,A16,A24,A12,A13,
A15,A25,A26])++
1`(A17,[A17,A19,A25,A26,A7,A11,A13,A15,
A12,A16,A18])++
1`(A18,[A10,A7,A13,A15,A16,A18,A11,A12,
A17,A19])++
1`(A19,[A7,A10,A12,A17,A19,A11,A18])++
1`(A20,[A7,A1,A2,A20,A8,A21,A22])++
1`(A21,[A7,A1,A3,A4,A21,A2,A8,A20,A22])++
1`(A22,[A5,A9,A10,A11,A12,A13,A1,A2,A21,
A22,A7,A8,A20])++
1`(A23,[A13,A5,A15,A25,A1,A2,A23,A3,A4,
A14,A24])++
1`(A24,[A5,A13,A3,A4,A16,A24,A26,A14,A15,
A23,A25])++
1`(A25,[A12,A13,A14,A23,A25,A15,A16,A24,
A26])++
1`(A26,[A12,A13,A15,A24,A26,A16,A25])
Activate Resource
[mem ln a ]
Disable Resource
[mem ln a]
P_HIGH
Disable Plan
Merging Crises Areas
[(intersect ln1 ln2)<>[]]
P_HIGH
Activate Plan3
(r,a)
(r,a)
1`(lcap,ln)
(r,a)
(r,a)
1`(lcap1,ln1)++1`(lcap2,ln2)
1`(lcap,ln)
1`(lcap,ln)
1`(lcap,ln)
1`(a,ln)([(c,a,Plan3)],a::ln)
Figure 6: Plan3 model.
Figure 5 (resp. Figure 6) describes the behavior of the
functioning in the Plan2 (resp. Plan3 ). We can note
the following points:
• The activation of a crisis in the Plan2 (resp.
Plan3) is represented by the transition
ActivatePlan2 (resp. ActivatePlan3). The
place AreasPlan2 (resp.
AreasPlan3) represents the area of crisis, its
neighbors areas concerned by the crisis when
Plan2 (resp.Plan3) is applied.
• A common sub-behavior between the
models appears through the places
{IdleResources, ActiveResources, Activated
Plans,EnabledPlans} and transitions
{Activate Resource, DisableResource,
DisablePlan, MergingCrisesAreas}. In fact,
they keep the same name. Their internal arcs are
the same also.
• Transition ChangePlan2toPlan3 is a swit-
ching transition that allows the system to
change Plan2 to Plan3 of a current crisis (i.e.
Next_plan(Change− Plan2toPlan3) = Plan3 ).
Idle Resources
ResourceXArea
1`(Police,A1)++
1`(Police,A3)++
1`(Police,A4)++
1`(Police,A6)++
1`(Police,A15)++
1`(Hospital,A1)++
1`(Hospital,A2)++
1`(Hospital,A5)++
1`(Hospital,A6)++
1`(Hospital,A7)++
1`(Hospital,A12)++
1`(Hospital,A16)++
1`(Hospital,A25)++
1`(Firefighter,A2)++
1`(Firefighter,A3)++
1`(Firefighter,A5)++
1`(Firefighter,A7)++
1`(Firefighter,A14)++
1`(Firefighter,A19)++
1`(Firefighter,A20)++
1`(Firefighter,A24)
Active Resources
ResourceXArea
Activated Plans
ListCriseXAreaXPlanXConcernedAreas
Areas Plan 2
Neighbors
1`(A1,[A2,A3,A4,A5,A6,A7,A8])++
1`(A2,[A1,A3,A4,A8,A21])++
1`(A3,[A1,A2,A4,A23])++
1`(A4,[A1,A3,A5,A14,A23])++
1`(A5,[A1,A4,A6,A9,A13,A14])++
1`(A6,[A1,A5,A7,A9])++
1`(A7,[A5,A9,A10,A11,A12,A13])++
1`(A8,[A1,A2,A20,A21,A22])++
1`(A9,[A5,A6,A7,A10])++
1`(A10,[A7,A9,A11,A19])++
1`(A11,[A7,A10,A12,A18,A19])++
1`(A12,[A7,A11,A13,A15,A16,A18])++
1`(A13,[A5,A7,A12,A14,A15,A16])++
1`(A14,[A4,A5,A13,A15,A23,A24])++
1`(A15,[A13,A14,A16,A24,A25])++
1`(A16,[A12,A13,A15,A25,A26])++
1`(A17,[A12,A16,A18])++
1`(A18,[A11,A12,A17,A19])++
1`(A19,[A11,A18])++
1`(A20,[A8,A21,A22])++
1`(A21,[A2,A8,A20,A22])++
1`(A22,[A7,A8,A20])++
1`(A23,[A3,A4,A14,A24])++
1`(A24,[A14,A15,A23,A25])++
1`(A25,[A15,A16,A24,A26])++
1`(A26,[A16,A25])
Enabled Plans
ListCriseXAreaXPlanXConcernedAreas
Areas Plan3
Neighbors
1`(A1,[A1,A10,A11,A12,A13,A14,A20,A21,A22,
A23,A9,A2,A3,A4,A5,A6,A7,A8])++
1`(A2,[A2,A20,A22,A6,A7,A5,A14,A23,A1,A3,
A4,A8,A21])++
1`(A3,[A3,A24,A6,A7,A8,A21,A5,A14,A1,A2,
A4,A23])++
1`(A4,[A4,A9,A2,A6,A7,A8,A13,A15,A24,A1,A3
,A5,A14,A23])++
1`(A5,[A5,A2,A8,A3,A10,A12,A16,A15,A23,A24
,A7,A1,A4,A6,A9,A13,A14])++
1`(A6,[A6,A14,A10,A11,A12,A13,A2,A3,A4,A8,
A1,A5,A7,A9])++
1`(A7,[A7,A1,A4,A6,A14,A19,A15,A16,A18,A5,
A9,A10,A11,A12,A13])++
1`(A8,[A8,A5,A6,A7,A3,A4,A1,A2,A20,A21,A22])++
1`(A9,[A9,A4,A14,A12,A13,A1,A11,A19,A5,A6,
A7,A10])++
1`(A10,[A10,A13,A12,A5,A6,A18,A7,A9,A11,
A19])++
1`(A11,[A11,A15,A16,A5,A9,A13,A17,A7,A10,
A12,A18,A19])++
1`(A12,[A12,A24,A14,A25,A26,A17,A19,A5,A9,
A10,A7,A11,A13,A15,A16,A18])++
1`(A13,[A13,A23,A1,A4,A6,A24,A25,A26,A9,A10,
A11,A18,A5,A7,A12,A14,A15,A16])++
1`(A14,[A7,A12,A16,A25,A6,A9,A1,A3,A14,A4,
A5,A13,A15,A23,A24])++
1`(A15,[A26,A4,A5,A7,A12,A15,A23,A13,A14,
A16,A24,A25])++
1`(A16,[A5,A7,A11,A18,A14,A16,A24,A12,A13,
A15,A25,A26])++
1`(A17,[A17,A19,A25,A26,A7,A11,A13,A15,
A12,A16,A18])++
1`(A18,[A10,A7,A13,A15,A16,A18,A11,A12,
A17,A19])++
1`(A19,[A7,A10,A12,A17,A19,A11,A18])++
1`(A20,[A7,A1,A2,A20,A8,A21,A22])++
1`(A21,[A7,A1,A3,A4,A21,A2,A8,A20,A22])++
1`(A22,[A5,A9,A10,A11,A12,A13,A1,A2,A21,
A22,A7,A8,A20])++
1`(A23,[A13,A5,A15,A25,A1,A2,A23,A3,A4,
A14,A24])++
1`(A24,[A5,A13,A3,A4,A16,A24,A26,A14,A15,
A23,A25])++
1`(A25,[A12,A13,A14,A23,A25,A15,A16,A24,
A26])++
1`(A26,[A12,A13,A15,A24,A26,A16,A25])
Activate Resource
[mem ln a ]
Disable Resource
[mem ln a]
P_HIGH
Disable Plan
Merging Crises Areas
[(intersect ln1 ln2)<>[]]
P_HIGH
Change Plan 1 to Plan 2 test
[ mem lcap (c,a,Plan1)]
Change Plan 2 to Plan 3
[ mem lcap (c,a,Plan2)]
(r,a)
(r,a)
1`(lcap,ln)
(r,a)
(r,a)
1`(lcap1^^lcap2,remdupl (ln1^^ln2))
1`(lcap,ln)
1`(lcap,ln)
1`(lcap,ln)
1`(lcap,ln)
(a,ln1)
1`(lcap,ln)
(a,ln1)
Figure 7: Models of merged plans.
The functioning of the mode Merged plans, mo-
deled in Figure 7, is similar to the other plans with the
ability to switch the plans for each crisis that compose
the merged crisis to another coverage plan of larger
areas.
Figure 8 presents the global PCPN describing the
operating modes management for the crisis manage-
ment. In this model, all places, transitions, arcs and
tokens of the four common operating modes are pre-
sented without duplicating the common sub-behavior.
Moreover, new arcs are added in order to express the
mode management:
• The place AreasPlan2 (resp. AreasPlan3) is
connected to the transition ChangePlan1toPlan2
(resp. ChangePlan2toPlan3) by a bidirectional
arc labeled by (a,ln1).
• The transition ChangePlan1toPlan2 (resp.
ChangePlan2toPlan3) is connected
to the place ActivatedPlans by
an arc labeled by 1‘((a,Plan2) ::
(rm(a, Plan1)lcap), remdupl(ln1dln))(resp.
1‘((a,Plan3)::(rm (a,Plan2) lcap),
remdupl (ln1dln))) allowing the replacement of
the plan by a new one and updating the list of the
concerned areas crisis.
• The transition MergingCrisesAreas is connected
ICSOFT 2018 - 13th International Conference on Software Technologies
612