You are on page 1of 34

INTRODUCTION

We design a system on Hospital Emergency Management System by using Petri


net modeling method .It is basically based on emergency events such as Preparing
for emergency , Responding to Emergency and Restoring Emergency system.
Petri nets were developed in the early 1960s by Carl Adam Petri [1]. Later on, it
was widely generalized and investigated for further improvement in modeling.
From [5], [6], [7] it can be found that how achievements in modeling method of
Petri Net has been used in various fields such as computer science, automation and
computer integration manufacture.. The formalized definition can be found in
[2], [3].
Petri nets are a graphical and mathematical modeling tool applicable to many
systems. They are a promising tool for describing and studying information
processing systems that are characterized as being concurrent, asynchronous,
distributed, parallel, nondeterministic, and/or stochastic. As a graphical tool, Petri
nets can be used as a visual-com mutilation aid similar to flow charts, block
diagrams, and networks. In addition, tokens are used in these nets to simulate the
dynamic and concurrent activities of systems. As a mathematical tool, it is possible
to set up state equations, algebraic equations, and other mathematical models gov-
erning the behavior of systems. Petri nets can be used by both practitioners and
theoreticians. Thus, they provide a powerful medium of communication between
them: practitioners can learn from theoreticians how to make their models more
methodical, and theoreticians can learn from practitioners how to make their
models more realistic.
To model web service-based systems needs to consider the following aspects:
It is necessary to classify the modeling process into two stages. One is the stage of
modeling logically and the other modeling physically. The method for modeling
logically web service-based systems should be easy to be understood by managers
or business designers. In the stage of the modeling logically, the modeling method
must be intuitionist,
Visualized and convenient to be used by users, especially by managers or
other business analyzers.
There must be vigorous analysis techniques to assess the correctness of the logical
model. The logical model must be convenient to be transformed to a physical
model. We classify modeling web service-based information systems into two
categories, one is software engineering and the other is knowledge engineering.
The former mainly concerns about algorithm analysis and data analysis based on
computer software and hardware, whereas the latter concerns about the syntax,
semantic and pragmatic analysis of web service-based application systems. We also
classify the knowledge engineering into two categories. One is modeling web
service-based application systems logically to identify the services which an
application system needs and the logical relationships between these services and
the other is modeling it physically to analyze the physical relationships between
the services, that is, to use related techniques to represent the logical model to
ensure that the system designed can be executed, mainly concerning about how to
register, to seek and to invoke web services distributed in different web nodes. In
this paper, we propose a method of logically modeling web service-based systems
which is easy to be understood and convenient to be used to develop web service-
based application systems. We also put the modeling method into use to analyze
the web service-based airport emergency management information system.
Formal Definition of a Petri Net

A Petri Net is a 5-tuple, PN = {P , T , F , W , M0 } where:

P = { p1, p2 , . . . , pm } is a finite set of places,

T = {t1, t2, ….. , tn } is a finite set of transitions,

F is subset equals (P × T ) union (T × P ) is a set of arcs flow relation ,

W: F— { 1 , 2 , 3 , …. } is a weight function,

M0: P — {0 , 1 , 2 , 3 , ….} is the initial marking,

P intersection T = Ø and P union T ≠ Ø

A Petri Net structure N = ( P , T , F , W ) without any specific initial marking is

denoted by N.

A Petri Net with the given initial marking is denoted by (N , M0 ) .

The Firing rules


The behavior of many systems can be described in terms of system states and their

changes. In order to simulate the dynamic behavior of a system, a state or marking

in a Petri Nets is changed according to the following transition (firing rules):

A transition t is said to be enabled if each input place p of t is marked with at least

w (p,t) is the arc from p to t.


An enabled transition may or not fire (depending on whether or not the event

actually takes place).

A firing of an enabled tractions t removes w (p,t) tokens from each input place p of

t, and adds w (t,p) tokens to each output place p of t, where w (t,p) is the weight of

the arc from t to p.

A transition without any input place is called a source transition, and one without

any place is called a sink transition. Note that a source transition is unconditionally,

and that firing of a sink transition consumes tokens, but does not produce any.

A pair of place p and transition t is called self loop if p is both an input and output

place of t. A Petri net is said to be pure if it has no self loop. A Petri Net is said to

be ordinary if all of its arc weight are 1’s.

For the above rule of transition enabling, it is assumed that each place can

accommodated an unlimited number of tokens. Such a Petri Net is referred to as an

infinite capacity net. For modeling any physical systems, it is natural to consider an

upper limit to the number of tokens than each place can hold. Such a Petri Net is

referred to as a finite capacity net.

For a finite capacity K(p), the maximum number of tokens that p at hold at any

time. For finite capacity nets, for a transition t to be enabled, there is an additional

condition that the number of tokens in each output place p of t cant exceed its

capacity k(p) after firing t.


This rule with the capacity constraint is called the strict transition rules, where as

the rule without the capacity constraint is called the (weak) transition rule. Given a

finite capacity net (N,M0) , it is possible to apply either the strict transition rule to

the given net (N,M0), or equivalent to net (N1,M1),the net oriented from (N,M0) y

the following complementary-place transformation, where it is assumed that N is

pure.

Step 1: Add a complementary place p1 for p, where the initial marking of p 1 is

given by M1(P1)= k(p) – M0(p)

Step 2: between each transition t and some complementary places p1 draw new

arcs (t,p1) of (p1,t) where w(t, p1) = w(p) and w(p1,t) =w (t,p),

So that the sum of token in place p and its complementary place p1 equals its

capacity k(p) for each place p, before and after firing the transition t.

BEHAVIORAL PROPERTIES

After modeling systems with Petri nets, an obvious question is “what can we do
with the models?” A major strength of Petri nets is their support for analysis of
many properties and problems associated with concurrent systems. Two types of
properties can be studied with a Petri-net model: those which depend on the initial
marketing. The former type of properties is referred to as marketing-dependent
properties, whereas the latter type of properties is called structural properties.
A. Reachability

Reachability is a fundamental basis for studying the dynamic properties of


any system. The firing of an enabled transition will change the token
distribution(marketing) in a net according to the transition rule described in
section II.A sequence of firings will result in a sequence of markings. A
marking Mn is said to be reachable from a marketing M0 to Mn. A firing or
occurrence sequence is denoted by σ = M0 t1 M1 t2 M2 ……tn
Mn or simply σ =t1 t2 … tn.In this case,Mn is rechable from Mo by σ and
we write[ ]. The set of all possible marketing’s reachable from Mo in a
net(N,Mo) is denoted by R(N,Mo).The set of all possible firing sequences
from Mo in a net(N,Mo) is denoted by L(N,Mo) or simply L(Mo).

Now, the reachability problem for Petri nets is the problem of finding if [ ]
for a given Marketing Mn in a net (N,Mo).In some applications, one may be
interested in the marketing’s of a subset of places and not care about the rest
of places in a net. This leads to a sum marketing reachability problem which
is the problem of finding if[ ] where[ ] is any marketing whose restriction
to a given subset of places agrees with that of a given marketing Mn.

B. Bounded ness

A Petri net(N,Mo) is said to be bounded if the number


of tokens in each place does not exceed a finite number k for any marketing
reachable from Mo,i.e, M9p0[ ]k for every place p and every marketing
M[ ] .A Petri net (N,Mo) is said to be safe if it is 1-bounded.
C. Live ness

The concept of live ness is closely related to the complete absence of


deadlocks in OS.A Petri net is said to be live if, no matter what marketing
has been reached from Mo,it is possible to ultimately fire any transition of
the net by progressing through some further firing sequence. This means that
a live Petri net guarantees deadlock-free operation, no matter what firing
sequence is chosen. Examples of live Petri nets are shown in figs 4,6 and
9.On the other hand, the Petri nets shown in figs.15 and 16 are not live.

Likeness is an ideal property for many systems. Thus we relax the likeness
condition
And define different levels of live ness as follows in[8],[178].A transition t
in a Petri net(N,Mo) is said to be:

0) Dead(L0-live) if t can never be firing in any firing sequence in L(Mo).


1) L1 -live(potentially fire able) if t can be fired at least once in some
firing sequence in L(Mo).
2) L2 -live if. given any positive integer k,t can be firing at least k times
in some firing sequence in L(Mo).
3) L3 -live if t appears infinitely, often in some firing sequence in L(Mo).
4) L4 -live or live if t is L1-live for every marketing M in R(Mo)

A Petri net(N,Mo) is said to be LK-live if every transition in the net is LK-


live=0,1,2,34.L4-liveness is the strongest and corresponds to the live ness defined
earlier. It is easy to see the following implications:L4-liveness[ ] L3-liveness [ ]
L2-liveness[ ]L1-liveness,where [ ] means implies.” WE say that a transition is
strictly Lk-live if it is LK-live but not L(K+1)-live=1,2,3.

D. Reversibility and Home state

A Petri net is said to be reversible if, for each marking M in R(Mo),Mo is


reachable from M.Thus in a reversible net one can always get back to the
initial marketing or state. In many applications, it is not necessary to get
back to the initial state as long as one can get back to some state. Therefore,
we relax the reversibility condition and define a home state. A marketing M
is said to be a home state, if, each marking M in R(Mo),M[ ] is reachable
from M.

E. Cover ability
A marketing M in Petri net is said to be coverable if there exists a marking
M in R(Mo) is said to be coverable if there exists a marking M[ ] in R(Mo)
such that [ ] for each Pi in the net. Cover ability is closely rek-lated to
liveness . Lwt M be the minimum marking needed to enable a transition t.
Then t is dead if and only if M is not cover able. That is t is L1-live if and
only if Mm is coverable.

F. Persistence

A Petri net(N,Mo) is said to be persistent if, for any two enabled transitions,
the firing of one transition will not disable the other. A transition in a
persistent net, once it is enabled, will stay enabled until it fires. All marked
graphs are persistent, but not all persistent nets are marked graphs.

G. Synchronic Distance

It is a metric closely which mutual dependence between two events in a


condition/event system. We define the synchronic distance between two
transitions t1 and t2 in a Petri where σ is a firing sequence starting at any
marketing M in R(Mo) and [ ] is the no of times that transition [ ] fires in σ.
For example in the net shown in Fig. 17(d) d12 =1,d34=1,d13 =[ ] etc.

H. Fairness

Many different notions of fairness have been proposed in the literature on


Petri nets. We present here two basic fairness concepts. bounded-fairness
and unconditional fairness. Two transitions t1 and t2 are said to be in
abounded fair relation if the maximum no of times that either one can fire
while the other is not firing is bounded. A Petri net is said to be a B-fair if
every pair of transitions in the net are in aB-fair relation. A firing sequence σ
is said to be unconditionally fair if it is finite.
aB-fair net as well as unconditionally fair net. The net shown in fig 17(d)
neither a B-fair net nor an unconditionally fair net. The unbounded net
shown in fig.17(c) is an unconditionally fair net but not a B-fair net.

METHODOLOGY

A. Basic concepts

 Web service: Web services are defined as the accessible programs and
devices distributed on the web. It can be invoked and employed by agents
or other application programs.
 Web service-based system: A web service-based system is defined as the
system of which web services are served as components.
 Information flow: An information flow expresses the relationship
between a web service and a resource. if a service has the right to use a
resource, there exists information flow between them. Note that there is
no information flow between services or resources A resource expresses
the input/output state or pre-condition/post-condition of web services.
 Information flow: An information flow expresses the relationship
between a web service and a resource. if a service has the right to use a
resource, there exists information flow between them. Note that there is
no information flow between services or resources

B. Notation
In the process of modeling, we use a rectangle, a circle and an arrow to indicate a

web service, a resource and an information flow respectively. We also use a black

dot put in the circle to represent the resource is ready to be processed. If there is

no black dot in the circle, the resource is not ready to be utilized. In addition, if

there are other preconditions of executing a web service, these preconditions are

expressed besides the arrow linking the web service and the resource.

C. Composition operations
 The invoking operation: The invoking operation can be used to

construct the basic service flow of the web service. An arrow from a

resource to a web service indicates the resource is necessary for the

service to be executed. An arrow from a web service to a resource

indicates the new resource will be produced or output when the web

service is executed as in Fig 1.

 The sequence operation: The sequence operation can compose basic

service flows to form a sequential service flow. For example, as shown

in Fig. below the resource produced by executing service t1 serves as the


resource which can be utilized by the service t2, that is, the output of

service t1 serves as the input of service t2.

 The concurrent operation: The concurrent operation can make two or

more services executed parallelly . For example, as shown in Fig. below,

t31, t32 and t33 t34 are composed through the concurrent operation. It

may take long or short time to execute them, but all of them must

complete before t3q2 is executed.

 The choice operation: The choice operation can select one service to be

executed from among a bag of services. The cardinality of the services

can be specified through a restriction to get chosen. For example, as in

Fig.below t31, t32 and t33 are composed together via the choice

operation.

 The repeating operation: The repeating operation enables a

service to be executed repeatedly. For example, as shown in Fig. below,

the services t11 and t12 are executed repeatedly under certain condition.

Figure 1. Example of the invoking operation


Figure 2. Example of the sequence operation

Figure 3. Example of the concurrent operation

Figure 2. Example of the choice operation


Figure 5. Example of repeating operation

Figure 6. The upper to lower model


Figure 7. The lower to upper model

D: Two Modeling Modes:


Based on the analysis of the business process, those operations discussed above

can be used to compose basic service flows, partial service flows and the service

flow of overall application system recursively. There are two modes for modeling

web service-based systems. One is the upper to lower mode and the other is the

lower to upper mode. Usually, both of them are used simultaneously in the process

of modeling web service-based application systems.

 The upper to lower mode: This mode shown in Fig. 6 needs to analyze
the business process firstly, then to map the top business process to the

service flow of the top level. The next step is to decompose the top

service flow to identify the partial service flows of the lower levels

according to the business process. Recursively, it won’t be put to an end

until the basic service flows needed are identified.

 The lower to upper mode: This mode shown in Fig. 7 also needs to

analyze the business process firstly. After that, it needs to identify the

basic service flows according to the basic business modules, then to

identify the larger scale service flows by composing the basic service

flows. Recursively, it will be put to an end until the service flow of the

overall application system is constructed.

THE RELATED PETRI NET THEORY SUPPORTING THE


MODELING METHOD

There have been numerous research achievements about the modeling method

based on Petri net. These achievements have been applied to a wide fields such as

computer science, automation and computer integration manufacture.

The Mapping relationship between model and Petri Net System


The sequence operation in the model maps the sharing compositions operations.

The choice operation in the model maps the sharing composition operation under
the restriction the number of the sharing resource should not be larger than one. In

fact, the repeating operation in the model maps a composite operation by the

sharing composition operation by the sharing composition and synchronous

composition operation of the Petri Net. Due to the mapping relationship between

the model and the Petri Net system defined above. Therefore we can use many

powerful analysis technique of Petri Net to analyze the model constructed by the

method we propose.
Application
Identification of a business process of Hospital emergency management
System

The business process of Hospital emergency management consists of some sum

processes. They are Preparing for emergency (T1), Responding to Emergency (T2),

Restoring the Emergency (T3). The business process of Preparing for emergency

consists of some sub processes, they are Monitoring the Emergency

events(T11),Analyzing the monitoring info(T12), preparing for the emergency

scheme(T13), Create any emergency events and prepare for that(T14), Train maintainer

for any emergency events (T15), Involve good emergency event analyzer to prevent the

events (T16). The business process of Responding to Emergency consists of some

processes, they are Deciding on the emergency Action (T21), Dispatching the

Resources(T22), Succoring the Spot(T23), Reduce the emergency events as soon as

possible (T24).The business process of Restoring the Emergency consists of some

processes, they are Compensating the victim(T31),Releasing the information(T32),

Evaluating the events(T33), Performing feedback(T34).The business process of

Monitoring the Emergency events consists of some processes, they are There can be an

exhaustive fire in the hospital(T111), A terrorist attack can happen in the Hospital(T112),

There can be flood in the area of the hospital(T113), There can be storage in the

medicines equipment and the emergency medicines(T114), There can be an interrupting

power supply in the hospital(T115). The business process of dispatching the resource

consists of some processes, they are Dispatching the patients in a safe place(T221),
Dispatching the Medical equipments in a safe place(T222).The business process of

preparing for the emergency scheme also consists of some processes, they are

Keep uninterrupted emergency electric supply (T131), Keep back up of emergency

medicine (T132). The business process of compensating the victim is divided into some

processes, they are Compensating the victim by medical checkup (T311), Compensating

the poor victims by financial support (T312).The business process of Evaluating the

events is divided into some processes, they are Evaluating the events which is the main

cause of creating the events (T331), It has to be analyzed that whether any event put not

into action (T332).

Constructing the logical model of the Hospital–based


Emergency Management system

According to the logical relationship, we can place the upper services by the corresponding
lower service flow respectively. Recursively, the logical model of the hospital based emergency
management system is constructed, as order to the model provided the original logical
relationship must be maintained correctly. The simplified model is shows in the fig.

T115 Check whether an interrupting power supply in the


hospital
T221 Dispatching the patients in a safe place
T222 Dispatching the Medical equipment s in a safe place
T311 Compensating the victim by medical checkup
T312 Compensating the poor victims by financial support
T331 Evaluating the events which is the main cause of
creating the events
T332 It has to be analyzed that whether any event put not
into action
T131 Keep uninterrupted emergency electric supply
T132 Keep back up of emergency medicine.

Service Flow:
The RMG of the Model
REFERENCES

[1] Tadao Murata ― Petri Nets: Properties, Analysis and Application‖, Proceedings

of the IEEE, Vol.77, No.4, April 1989

[2] Carlo Ghezzi, Mehdi Jazayeri, and Dino Mandrioli ― Fundamentals of

Software Engineering‖, Second Edition, Pearson Education, Inc., 2003

[3] Yuan Chongzhi - Principle and Application of Petrinet [M]. Beijing: Publishing

House of Electronic Industry, 2005:40-66

[4] Petri Net Model of Session Initiation Protocol and Its Verification‖ - Yang Peng;

Yuan Zhanting; Wang Jizeng; Wireless Communications, Networking and Mobile

Computing, 2007. WiCom 2007. International Conference on Digital Object

Identifier: 10.1109/WICOM.2007.466 Publication Year: 2007; Page(s): 1861-1864.

[5] Jiacun Wang, “Charging Information Collection Modeling and Analysis of

GPRS Networks”, IEEE Transactions on Systems, Man, and Cybernetics-Part C:

Applications and reviews, vol.37, No.4, July 2007

[6] Alessandro Giua, Carla Seatzu, “Modeling and Supervisory Control of Railway

Networks Using Petri Nets”, IEEE Transactions on automation science and

engineering, Vol.5, NO.3, July 2008


[7] K. Jensen, L.M. Kristensen, L. Wells, “Coloured Petri Nets and CPN Tools for

Modelling and Validation of Concurrent Systems”. International Journal on

Software Tools for Technology Transfer, (2007), Springer Verlag, 213-254.

You might also like