<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>PNlib - A Modelica Library for Simulation of Biological Systems Based on Extended Hybrid Petri Nets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sabrina Proß</string-name>
          <email>sabrina.pross@fh-bielfeld.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Jan Janowski</string-name>
          <email>sebastian.janowski@uni-bielefeld.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bernhard Bachmann</string-name>
          <email>bernhard.bachmann@fh-bielfeld.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Kaltschmidt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Barbara Kaltschmidt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Bielefeld University, Faculty of Biology</institution>
          ,
          <addr-line>Bielefeld</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Bielefeld University, Faculty of Technology</institution>
          ,
          <addr-line>Bielefeld</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Applied Sciences Bielefeld, Department of Engineering and Mathematics</institution>
          ,
          <addr-line>Bielefeld</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2012</year>
      </pub-date>
      <abstract>
        <p>We present a new Petri net simulation environment to enable the processing of experimental data to gain usable new insights about biological systems. Therefore, a powerful mathematical modeling concept - xHPNbio (extended Hybrid Petri Nets for biological applications) - has been defined which is properly adapted to the demands of biological processes. This specification is used for the PNlib (Petri Net library), realized by means of the object-oriented modeling language Modelica, which can be easily integrated for simulation processing in any other network modeling tool, as described in the last part of this paper. There, we briefly describe VANESA, a user-friendly biological network-modeling tool that uses the PNlib and the xHPNbio formalism for the simulation of biological networks.</p>
      </abstract>
      <kwd-group>
        <kwd>hybrid systems</kwd>
        <kwd>Petri nets</kwd>
        <kwd>biological processes</kwd>
        <kwd>Modelica</kwd>
        <kwd>xHPN</kwd>
        <kwd>xHPNbio</kwd>
        <kwd>VANESA</kwd>
        <kwd>PNlib</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Modern computer techniques and large memory capacities make it possible to
produce an enormous amount of molecular data stored in huge databases. This data is
indispensable for the scientific progress but does not necessarily lead to insight about
the functionality of biological systems. To improve the understanding of molecular
mechanisms, modern techniques focus on network analysis. The question which is
posed here is, what model formalism is appropriate and which simulator? Numerous
model formalisms have been proposed for modeling and simulation biological
systems (see e.g. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). Generally, a distinction must be made between qualitative and
quantitative approaches. Qualitative models represent only the fundamental
compounds, their interaction mechanisms, and the relationships between them while
quantitative models describe, in addition, the time-related changes of the components.
Furthermore, quantitative model formalisms can be divided into discrete and
continuous approaches as well as deterministic and stochastic techniques.
      </p>
      <p>
        In the recent years, Petri nets with their various extensions are becoming
increasingly popular. They have been proven to be as universal graphical modeling concept
for representing biological systems in nearly all degrees of abstraction. They support
the qualitative modeling approach as well as the quantitative one. Furthermore, the
biological processes can be modeled discretely as well as continuously and, in
addition, discrete and continuous processes can also be combined within a Petri net model
to so-called hybrid Petri nets first introduced by David and Alla (e.g. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]). The Petri
net formalism with all its extensions is so powerful that all other formalisms are
included. Hence, only one formalism is needed regardless of the approach (qualitative
vs. quantitative, discrete vs. continuous vs. hybrid, deterministic vs. stochastic) which
is appropriate for the respective system. The Petri net formalism is easy to understand
for researchers from different disciplines. It is such an ideal way for intuitive
representing and communicating experimental data and new knowledge of molecular
mechanisms. Besides, Petri nets allow hierarchical structuring of models and
therefore offer the possibility of different detailed views for every observer of the model.
      </p>
      <p>Despite several works and publications with Petri net approaches, there is a serious
problem relating to the lacking unity of concepts, notations, and terminologies.
Therefore, to show the research community the power of Petri nets, we have analyzed the
demands for carefully modeling biological systems and specially developed a Petri
net formalism which is called xHPNbio (extended Hybrid Petri Net for biological
applications).</p>
      <p>
        This Petri net concept is the specification of the new simulator based on the
objectoriented modeling language Modelica. A user-friendly graphical model reconstruction
in addition to a well-prepared visualization of simulation results is achieved by
connection the new Petri net simulator to VANESA, a powerful and easy-to-use
biological modeling tool [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This new approach is already in use in the area of dynamic
system modeling for hypothesis generation and testing of reconstructed database
and lab-validated biological networks.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related Works</title>
      <p>
        Reddy et al. proposed the application of Petri net formalism (introduced by Carl
Adam Petri in 1962) for biological network modeling in order to represent and analyze
metabolic pathways in a qualitative manner [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Thereby, places represent biological
compounds such as metabolites, enzymes, and cofactors which are part of
biochemical reactions. These biochemical reactions are modeled by transitions and their
stoichiometry is represented by the arc weights. Besides, the tokens indicate the presence
of compounds.
      </p>
      <p>
        Moreover, Hofestädt and Thelen expanded the approach of Reddy by introducing
functional Petri nets to enable quantitative modeling of biochemical networks [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Thereby, the arc weights are functions, which depend on concrete markings of places
in order to model kinetic effects.
      </p>
      <p>
        Due to the fact that a random behavior of molecular reactions at low concentrations
has been observed in many experiments, Goss and Peccoud introduced stochastic
Petri nets [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. A stochastic transition does not fire instantaneously but rather with a
time delay following an exponential distribution which may depend on the token
numbers of the places.
      </p>
      <p>
        A reasonable way for modeling concentrations of biological compounds is by
places containing real token numbers instead of integers and transitions which fire as a
continuous flow specified by an assigned speed. The transformation from the discrete
to the continuous Petri net concept was first introduced by David and Alla in 1987
and they replaced the term token by mark because tokens relate mostly to integer
quantities [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        Furthermore, Alla and David and proposed combing the discrete and the
continuous Petri net concept to so-called hybrid Petri nets [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. A hybrid Petri net contains
discrete places with integer tokens and discrete transitions with time delays as well as
continuous places with non-negative real marks and continuous transitions with firing
speeds .Matsuno et al. used this approach for modeling gene regulatory networks by
discrete and continuous processes [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. They improved this approach further by adding
the properties of functional Petri nets to it so that the arcs as well as the speeds of the
transitions are functions depending on the marks of the places [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In addition, they
extended the hybrid functional Petri nets by two specific arcs, called test and inhibitor
arcs [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], to accomplish the modeling of inhibition and activation mechanisms of
biological reactions. Chen and Hofestädt as well as Doi et al. demonstrated the
applicability of this approach by modeling molecular networks [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ]. Moreover,
Nagasaki et al. extended the hybrid functional Petri nets further by types with which
various data types can be regarded in order to model more complex biological
processes which involve various kinds of biological information and data [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. They
called this approach hybrid functional Petri nets with extensions (HFPNe).
      </p>
      <p>Despite these mentioned works and publications, there is a serious problem
regarding the lacking unity of concepts, notations, and terminologies. The definition of Petri
nets is not standardized; every author has his/her own definitions which are partly not
precise enough, not common, or contradictory. Hence, to show the research
community the power of Petri nets, they have to be defined precisely together with the
corresponding processes, which are essential for the simulation. This has been done in this
paper; based on the mentioned Petri net concepts, formalism has been developed
which is able to represent nearly all kinds of biological processes. It is called
xHPNbio (extended Hybrid Petri Nets for biological applications).</p>
      <p>Two common tools are already available for modeling biological processes with
the Petri net formalism. The first one is the commercial tool Cell Illustrator and the
second one is the freely available tool Snoopy.</p>
      <p>
        The Cell Illustrator is a commercial, widely-used tool available as a Java Web Start
application that enables to draw, model, elucidate, and simulate complex biological
processes and systems based on extended hybrid functional Petri nets [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Discrete
and continuous processes can be connected to perform hybrid simulations. The
drawback of the Cell Illustrator is that the simulation is like a “black box”. There is no
information about how the Petri nets and the corresponding processes are defined
which are necessary for modeling and simulation, e.g. how conflicts in Petri nets are
resolved, how the hybrid simulation is performed, and which integrators are used. In
addition, there is no possibility to adapt solver settings in order to achieve reliable
simulation results.
      </p>
      <p>
        Snoopy is a freely available unifying Petri net framework to investigate
biomolecular networks [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. A Petri net can be modeled time-free (qualitative model) or its
behavior can be associated with time (quantitative model) such as stochastic,
continuous, and hybrid Petri nets; thereby, different models are convertible into each other. It
is also possible to structure the models hierarchically in order to manage complex
networks. The drawback of Snoopy is that a continuous Petri net is interpreted as a
graphical representation of a system of ordinary differential equations. Hence, the
general Petri net property of non-negative marks cannot be held during simulation.
Additionally, conflict situations of hybrid Petri nets are trapped not completely and,
thus, negative markings can occur. Furthermore, places cannot be provided with
capacities and no functions can be assigned to arcs in hybrid Petri nets.
      </p>
      <p>Hence, these problems led to the development of a new Petri net simulation
environment specified by the established xHPNbio formalism. The xHPNbio elements are
modeled object-oriented which allows an easy way to maintain, extend, and modify
them. Furthermore, the hybrid simulation is performed by an appropriate
Modelicatool. With this several solver settings can be adapted in order to achieve reliable
simulation results. Moreover, the xHPNbio formalism is already integrated in VANESA,
an easy-to-use biological modeling tool. Using VANESA scientists are able to
reconstruct and simulate biological pathways either by drag-and-drop or by loading
networks from databases and transforming in the appropriate xHPNbio formalism in one
software application.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Extended Hybrid Petri Nets for Biological Applications (xHPNbio)</title>
      <p>The xHPNbio formalism comprises three different processes, called transitions:
discrete, stochastic, and continuous, two different states, called places: discrete and
continuous, and four different arcs: normal, inhibition, test, and read arc.</p>
      <p>Discrete places contain a non-negative integer quantity, called tokens or marks
while continuous places contain a non-negative real quantity, called marks. These
marks initiate transitions to fire according to specific conditions. These firings lead
mostly to changes of the marks in the connected places.</p>
      <p>
        Discrete transitions are provided with delays and firing conditions and fire first
when the associated delay is passed and the conditions are fulfilled. These fixed
delays can be replaced by exponentially distributed random values, then, the
corresponding transition is called stochastic transition. Thereby, the characteristic
parameter  of the exponential distribution can depend functionally on the markings of
several places (cp. [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]) and is recalculated at each point in time when the respective
transition becomes active or when one or more markings of involved places change1.
Based on the characteristic parameter, the next putative firing time
 =  + Exp( ) of the transition can be evaluated and it fires when this point in
time is reached.
      </p>
      <p>Both – discrete and stochastic transitions - fire by removing the arc weight from all
input places and adding the arc weight to all output places. On the contrary, the firing
of continuous transitions takes places as a continuous flow determined by the firing
speed which can depend functionally on markings and/or time. Places and transitions
are connected by “normal” arcs which are weighted by non-negative integer and real
numbers, respectively. But also functions can be written at the arcs depending on the
current markings of the places and/or time.</p>
      <p>Places can also be connected to transitions by test, inhibition, and read arcs. Then
their markings do not change during the firing process. In the case of test and
inhibitor arcs, the markings are only read to influence the time of firing while read arcs only
indicate the usage of the marking in the transition, e.g. for firing conditions or speed
functions. If a place is connected to a transition by a test arc, the marking of the place
must be greater than the arc weight to enable firing. If a place is connected to a
transition by an inhibitor arc, the marking of the place must be less than the arc weight to
enable firing. In both cases the markings of the places are not changed by firing. The
same place can be connected to the same transition by a test and, in addition, by a
normal arc as well as by an inhibitor and normal arc. These arcs are called double
arcs.</p>
      <p>It is important to mention that a discrete transition always fires in a discrete manner
by removing and adding marks after a delay is passed regardless of whether a discrete
or a continuous place is connected to it. However, a continuous transition always fires
in a continuous flow so that a discrete place can only be connected to continuous
transitions if it is input as well as output of the transition with arcs of the same weight. In
this way, the continuous transition can only be influenced by the discrete place but the
discrete marking cannot be changed by continuous firing. Hence, the conversion from
discrete to continuous markings and vice versa is always performed by discrete
transitions connected to continuous places.</p>
      <p>A formal definition of an xHPNbio is given below. Therefore, at first the
xHPNformalism is introduced which is then expanded to xHPNbio by providing the Petri
net elements with a biological meaning.</p>
      <p>,  , 
Definition 1. The tuple (
is a xHPN if
─  = 
─ 
─ 
─</p>
      <p>1,  2, … ,   is a finite set of discrete places,
=  1,  2, … ,   is a finite set of continuous places,
= { 1,  2, … ,   } is a finite set of discrete transitions,
= { 1,  2, … ,   } is a finite set of stochastic transitions,
, 
,</p>
      <p>
        The involved places may change their markings only in a discrete manner. Continuous
changes of involved places are not allowed because then the putative firing times have to be
recalculated the whole time as the continuous change takes place.
─  = { 1,  2, … ,   } is a finite set of continuous transitions,
─  ,  ,  , TS, and  are pairwise disjoint,
─  ⊆ ( ×  ∪  ×  ∪  ×  ∪  ×  ∪  × 
set of normal arcs from places to transitions, where   →  
place   to transition   ,
─  ⊆ ( ×  ∪  ×  ∪  ×  ∪  ×  ∪  × 
of normal arcs from transitions to places, where   →  
transition   to place   ,
∪  ×  ) is a
denotes the arc from
∪  ×  ) is set
denotes the arc from
,   ∈ 
then   →   ∈  if and
only if   →   ∈ 
and
   →   =    →   ,
─   : { → ℕ0,  → ℝ≥0} are the minimum capacities of the places,
─   : { → ℕ0,  → ℝ≥0} are the maximum capacities of the places,
─ ℯ: ( ∪  ) → { ,  } are the resolution types of the places for
type-1conflicts either priority or probability resolution,
─  : ( ∪  ) → ℕ: ℯ(  ) =  ∧   ∈  , ( ∪  ) → [
        <xref ref-type="bibr" rid="ref1">0,1</xref>
        ]: ℯ(  ) =  ∧   ∈
 is an enabling function which assigns every arc connected to a discrete
transition   either a priority or a probability according to the resolution type of the place
  ,
─ if ℯ(  ) =  then  (  →   ) ≠  (  →   ) ∀  ,   ∈    (  ) and
 (  →   ) ≠  (  →   ) ∀  ,   ∈    (  ), if ℯ(  ) =  then
∑  ∈   (  )  (  →   ) = 1 and ∑  ∈   (  )  (  →   ) = 1,
─  :  → ℝ≥0 is a delay function which assigns every discrete transition a positive,
real-valued delay,
─ ℎ: ( ,  ) → ℝ≥0 is a hazard function which assigns every stochastic transition a
positive, real-valued random delay depending on a concrete marking  ,
─  : ( ,  ) → ℝ≥0 is a maximum speed function which assigns every continuous
transition a positive, real-valued maximum speed depending on a concrete marking
 ,
─  : ( ∪  ∪  ,  ) → { ,  } is a condition function which assigns
every transition a condition depending on all possible model variables ( ) e.g.
time,
─  0: { → ℕ0,  → ℝ≥0} is the initial marking which must satisfy the condition
  (  ) ≤  0(  ) ≤   (  ) ∀   ∈ ( ∪  ).
Definition 2. An xHPNbio is an xHPN (see Definition 1) with a concrete
transformation of xHPN elements to biological ones. This transformation is summarized in
the following table by mentioning also some examples of the biological meaning.
xHPN
      </p>
      <sec id="sec-3-1">
        <title>Places</title>
      </sec>
      <sec id="sec-3-2">
        <title>Transitions</title>
      </sec>
      <sec id="sec-3-3">
        <title>Marks</title>
      </sec>
      <sec id="sec-3-4">
        <title>Inhibitor arcs</title>
      </sec>
      <sec id="sec-3-5">
        <title>Read arcs</title>
      </sec>
      <sec id="sec-3-6">
        <title>Arc weights Min/max. capacities Delays</title>
        <p>Hazard
functions
Maximum</p>
        <p>speeds
xHPNbio
Biological meaning</p>
        <sec id="sec-3-6-1">
          <title>Biological compounds</title>
        </sec>
        <sec id="sec-3-6-2">
          <title>Biological processes</title>
          <p>metabolites, enzymes, substances, substrates, products, signals, genes,
proteins, cells, complexes, activators, inhibitors, repressors, RNA
biochemical reactions, metabolic reactions, interactions, regulatory
reactions, signal transduction reactions, chemical reactions, binding,
phosphorylation</p>
        </sec>
        <sec id="sec-3-6-3">
          <title>Quantities of biological compounds</title>
          <p>molecules, concentrations, cells</p>
        </sec>
        <sec id="sec-3-6-4">
          <title>Activation of biological processes</title>
          <p>activation mechanisms</p>
        </sec>
        <sec id="sec-3-6-5">
          <title>Inhibition of biological processes</title>
        </sec>
        <sec id="sec-3-6-6">
          <title>Normal Arcs Connections of biological compounds and processes</title>
        </sec>
      </sec>
      <sec id="sec-3-7">
        <title>Test arcs transcription process, activation in gene regulation, enzyme activity, repression of gene regulation, inhibition mechanisms</title>
        <sec id="sec-3-7-1">
          <title>Needs for biological processes</title>
          <p>catalysis</p>
        </sec>
        <sec id="sec-3-7-2">
          <title>Biological coefficients</title>
          <p>stoichiometric coefficients, yield coefficients</p>
        </sec>
        <sec id="sec-3-7-3">
          <title>Reasonable biological capacities</title>
          <p>biological knowledge</p>
        </sec>
        <sec id="sec-3-7-4">
          <title>Duration of biological processes</title>
        </sec>
        <sec id="sec-3-7-5">
          <title>Random duration of biological processes</title>
          <p>stochastic kinetics</p>
        </sec>
        <sec id="sec-3-7-6">
          <title>Rate of biological processes</title>
          <p>kinetics effects/laws</p>
        </sec>
        <sec id="sec-3-7-7">
          <title>Biological systems</title>
          <p>metabolic networks, signal transduction networks, regulatory networks,
chemical networks, cell cycle, cell communication, diseases,
population dynamics, flux networks, cultivation processes</p>
          <p>This xHPN formalism has been transformed to the modeling language Modelica
(see section 4) to enable graphical modeling, hybrid simulation, and animation. The
execution of a hybrid simulation requires the definition for activating and firing
transitions as well as the resolution of possible conflicts.</p>
          <p>A discrete/stochastic transition   in an xHPN is active if the markings of all input
places   

do not fall below the minimum capacities when the arc weights are
removed, and the maximum capacities of all output places  
(  ) may not be
exceeded when the arc weights are added. Additionally, the input places connected by
test arcs must have more marks than the arc weights and the places connected by
inhibitor arcs must have less marks than the arc weights; read arcs do not influence the
activation of a transition.</p>
          <p>However, the activation process of continuous transitions requires a differentiation
between connected continuous and discrete places. A continuous transition   is active
if all continuous input places</p>
          <p>have either a marking greater than their
minimum capacities or they are fed by at least one input transition, i.e. the input speed  
is not zero. Additionally, all continuous output places   


have either a
marking less than their maximum capacities or they are emptied by at least one output
transition, i.e. the output speed   is not zero. The connected discrete places have to
fulfill the same conditions as mentioned above for activating a discrete transition. In
addition, the markings of input places connected by test arcs have to be greater than
the arc weights and markings of places connected by inhibitor arcs have to be less
than the arc weights.</p>
          <p>Definition 3. The tuple (
is an xHPN. A discrete/stochastic transition   ∈ (
∪</p>
          <p>) is active if and only if
, 
, 
, 
, 
and
⎧
⎪
and
and
and the condition   must be fulfilled.</p>
          <p>A continuous transition   ∈ 
∀   ∈     :</p>
          <p>(  ) &gt;   (  ) ∨ ( (  ) =   (  ) ∧   &gt; 0)
⎪ (  ) &gt; 
⎩ (  ) &lt;    →   ℐ
(  ) ∶  (  ) +    →   ≤   (  )</p>
          <p>is active if and only if
 ∶  (  ) &lt;   (  ) ∨ ( (  ) =   (  ) ∧   &gt; 0).
  →   ∈ 
  →    ∈ 
∀   ∈   
 ∶  (  ) &gt; 
and
∀   ∈ 
and the condition   must be fulfilled.</p>
          <p>An active transition has to be enabled by all input and output places to become
firable. Thereby, enabled discrete transitions wait until the assigned delay is elapsed
and stochastic transitions fire first when the putative firing time is reached. However,
continuous transitions fire immediately when they are enabled.</p>
          <p>Several conflicts can occur when the places have to enable their connected active
transitions. Possibly, a discrete place or a continuous place connected to discrete
transitions has not enough marks to enable all output transitions simultaneously or cannot
receive marks from all active input transitions due to the maximum capacity. Then a
conflict arises that has to be resolved (type-1-conflict). This can be either done by
providing the transitions with priorities or probabilities. In the first case, a
deterministic process decides which place enables which transitions and in the second case the
enabling is performed at random; thereby transitions assigned with a high probability
are chosen preferentially.</p>
          <p>
            Another conflict can occur between a continuous place and two or more continuous
transitions when the input speed is not sufficient to fire all output transitions with the
instantaneous speed   (see equation (1)) (type-2-output-conflict) or when the output
speed is not sufficient to fire all input transitions with the speed of equation (1)
(type2-input-conflict). This conflict is solved by sharing the speeds proportional to the
assigned maximum speeds (see [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ]).
          </p>
          <p>If a conflict occurs between a place and continuous as well as discrete/stochastic
transitions, the discrete/stochastic transitions take always priority over the continuous
transitions (type-3-conflict).</p>
          <p>A last conflict can occur when a discrete place has not enough marks to enable all
connected continuous transitions (type-4-conflict). This is solved by prioritization of
the involved transitions.</p>
          <p>The firing is then performed in the following way. Discrete transitions fire by
removing as much marks as the arc weights from all input places and by adding as
many marks as the arc weights to all output places. However, the firing process of
continuous transitions take place as a continuous flow with a maximum speed
assigned to every transition. The recalculation of a discrete marking is described by an
algebraic equation while a continuous marking is recalculated by a differential
equation describing the flow of the continuous firing and an algebraic equation
representing the firings of discrete transitions.
Definition 4. The tuple (
, 
, 
, 
, 
,  ,  ,  , ℐ, ℛ,  ,   ,   , ℯ,  ,  , ℎ,  ,  , 
is an xHPN. The firing process of an active continuous transition   ∈ 
by a negative mark change of all continuous input places which is expressed by the
is described
differential equation
and a positive mark change of all continuous output places which is expressed by the
differential equation
(  )
where   is the instantaneous speed of transition   and calculated by the following
  = min</p>
          <p>min
  ∈    
 (  →   ) ⋅</p>
          <p>,
1
   →     ∈   (  )
1
(1)
min
  ∈ 
(  )
input places
  
 
where</p>
          <p>
            is the set of continuous input places of   with  (  ) =   (  ) ,


is the set of continuous output places of  
with  (  ) =   (  ) ,
is the set of all continuous firing input transitions, 
is the set of all continuous firing output transitions. If the transition is involved in a
type-2-conflict, this speed has to be adapted appropriately (see [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ]).
          </p>
          <p>An active discrete transition   ∈</p>
          <p>waits   time units before it fires and a
stochastic transition   ∈</p>
          <p>fires when the putative firing time   is reached which is
calculated based on the hazard function ℎ. Both fire by removing the arc weight from all
 ′(  ) =  (  ) −    →  
and by adding the arc weight to all output places
 ′(  ) =  (  ) +    →  
The marking of a discrete place   ∈</p>
          <p>can be recalculated by the following
algebra ′(  ) =  (  ) +
−</p>
          <p>→   ,
  ∈
 (  )
  ∈  (  )
whereby 
sitions and 
transitions.</p>
          <p>(  ) ⊆ (
∪  ) is the set of all discrete/stochastic firing input
tran∪  ) is the set of all discrete/stochastic firing output</p>
          <p>The continuous mark change of a continuous place   ∈ 
aid of the following differential
is performed with the
(  )
and, in addition, by the following algebraic equation for the discrete mark change
caused by firing connected discrete transitions
 
(  ) =</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>The Petri Net Library in Modelica (PNlib)</title>
      <p>
        The xHPN definition and the corresponding definitions for activation, enabling, and
firing mentioned above have been implemented by means of the object-oriented
modeling language Modelica to enable graphical hierarchical modeling, hybrid simulation,
and animation [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. Modelica is developed and promoted by the Modelica
Association since 1996 for modeling, simulation, and programming primarily of physical and
technical systems and processes. Additionally, the Modelica standard library is
available from the Modelica Association to model mechanical (1D/3D), electrical (analog,
digital, machines), thermal, fluid, control systems, and hierarchical state machines.
Furthermore, several libraries have been developed in the last decade for specific
applications. An overview can be found on the Modelica homepage
(www.modelica.org). The development of the language and libraries is ongoing and
driven by several European projects (EUROSYSLIB, MODELISAR, OPENPROD,
and MODRIO). Since the year 2000, Modelica is used successfully in the industry
which is documented in the proceedings of many Modelica conferences and journals.
      </p>
      <p>The Modelica models are described on the textual level by discrete, algebraic, and
differential equations and by schematics on the graphical level. A schematic consists
of connected components which are defined by other components or on the lowest
level by equations in the Modelica syntax. The components have connectors which
describe the interaction between them. By drawing a line from one component to
another, a connection is established to enable interactions. In this manner a model is
constructed. Several components can be structured in libraries, called packages,
which provides hierarchical modeling. Moreover, the wrapping technique enables the
representation of sub-models consisting of several connected components by a
specific adapted icon in order to simplify the modeling process. Then, the sub-models can
be used several times in the same or in different models and, in addition, it offers an
easy-to-use-model at the top level with an intuitive and familiar adapted view.</p>
      <p>For graphical modeling, simulation, and animation an appropriated environment is
needed. Several commercial and open- source tools are available. A full list can be
found on the Modelica homepage (www.modelica.org).</p>
      <p>
        Each of the xHPN components - transitions, places, and arcs - is modeled by an
own Modelica model which are organized and structured in a Modelica package,
called PNlib (Petri Net library). All components are defined by discrete
(eventbased), algebraic, and differential equations (cp. [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]).
      </p>
      <p>The main process in the place model is the recalculation of the marking after firing
a connected transition. In the case of the discrete place model, this is realized by the
discrete equation
when fire pre(reStart) then
t = if fire then pre(t)+firingSumIn–firingSumOut
else reStartTokens;
end when;
whereby pre(t) accesses the marking t immediately before the transitions fire. To
this amount, the arc weight sum of all firing input transitions is added and the arc
weight sum of all firing output transitions is subtracted from it. Additionally, the
tokens are reset to reStartTokens when the user-defined condition reStart
becomes true; this could be a global condition.</p>
      <p>The marking of continuous places can change continuously as well as discretely.
This is implemented by the following construct
der(t) = conMarkChange;
when discreteFire then</p>
      <p>reinit(t, t+discreteMarkChange);
end when;
when reStart then</p>
      <p>reinit(t,reStartMarks);
end when;
whereby the der-operator access the derivative of the marking t according to
time. The continuous mark change is performed by a differential equation while the
discrete mark change is performed by the reinit-operator within a discrete
equation. This operator causes a re-initialization of the continuous marking every time
when a connected discrete transition fires. Additionally, the marking is re-initialized
by reStartMarks when the condition reStart becomes true.</p>
      <p>
        The main process of the transition is to check if it can fire. When it is possible,
discrete and stochastic transitions wait as long as the (random) delay is passed while the
continuous transitions fires continuously with a speed calculated in the transition
model. Via connector variables, the places report the transitions their markings and
the transitions report when they fire. The conflicts which could arise in xHPN models
have to be resolved by the mentioned methods to have successful and reliable
simulation (see [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]).
      </p>
    </sec>
    <sec id="sec-5">
      <title>Application</title>
      <p>In this section we briefly demonstrate the PNlib possibilities in the software
application VANESA (www.vanesa.sf.net). VANESA is a powerful and easy-to-use
network modeling tool to members of the laboratory, which combines different fields of
studies such as life science, database consulting, modeling and visualization for a
semi-automatic and lab-validated reconstruction of biological networks. The
application helps to model experimental results that can be expanded with database
information to perform modern biological network analysis. Based on project experimental
data and the integrated databases in VANESA, users are able to explore and
reconstruct any biological system, which can be further transformed, simulated, and
analyzed in the language of Petri nets.</p>
      <p>Therefore, VANESA uses the PNlib and xHPNbio formalism for simulation
processing. One feature of VANESA is the possibility to automatically transform any
kind of network into the language of an xHPNbio. Thus, users are able to model and
simulate dynamic systems within one tool. Petri net simulations are performed in the
background, not visible to users. Simulation results are visualized in plots and
animated within the active window (see Fig. 1).
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>A powerful Petri net simulation environment has been developed to enable the
processing of experimental data to usable new insights about biological systems. The
mathematical modeling concept xHPNbio serves as specification for the presented
simulation environment. The xHPNbio elements are modeled object-oriented by
discrete, algebraic, and differential equations in the Modelica language. This allows an
easy way to maintain, extend, and modify them. The hybrid simulation is performed
by an appropriate Modelica tool which usually comprises several possibilities to adapt
the solver settings in order to achieve reliable simulation results.</p>
      <p>The mathematical modeling concept xHPNbio, was specially developed based on
the demands of biological processes, and is so powerful but also so universal and
generic that it is an ideal all-round-tool for modeling and simulation of nearly all
kinds of processes such as business processes, production processes, logistic
processes, work flows, traffic flows, data flows, multi-processor systems, communication
protocols, and functional principals.</p>
      <p>The PNlib will be freely available on the Modelica homepage (www.modelica.org)
soon. However, in this paper we have already presented a software application, called
VANESA, which uses the PNlib for simulation processes of biological networks.</p>
      <p>
        In addition, a future goal is to provide an open source Petri net simulation tool for
up till now the PNlib works only with the commercial Modelica tool Dymola. This
demands a further development of the open source Modelica tool OpenModelica to
get the PNlib to work with it because some Modelica features are not yet supported.
The University of Applied Sciences Bielefeld is already closely involved in the
further development of the OpenModelica tool [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Wiechert</surname>
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Modeling and simulation: tools for metabolic engineering</article-title>
          .
          <source>Journal of biotechnology 94(1)</source>
          ,
          <fpage>37</fpage>
          -
          <lpage>63</lpage>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>David</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alla</surname>
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>On Hybrid Petri Nets</article-title>
          .
          <source>Discrete Event Dynamic Systems: Theory and Applications</source>
          (
          <volume>11</volume>
          ),
          <fpage>9</fpage>
          -
          <lpage>40</lpage>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Janowski</surname>
            ,
            <given-names>S.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kormeier</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Töpel</surname>
            <given-names>T.</given-names>
          </string-name>
          , and Hofestädt R.:.
          <article-title>Modeling of Cell-to-Cell communication processes with Petri Nets using the example of Quorum Sensing</article-title>
          , in: E. Wingender (Ed.),
          <source>Biological Petri Nets</source>
          ,
          <volume>162</volume>
          . Amsterdam: IOS Press,
          <fpage>182</fpage>
          -
          <lpage>203</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Reddy</surname>
            <given-names>V.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mavrovouniotis</surname>
            <given-names>M.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liebman</surname>
            <given-names>M.N.</given-names>
          </string-name>
          :
          <article-title>Petri net representations in metabolic pathways</article-title>
          .
          <source>Proceedings of 1st International Conference on Intelligent Systems for Molecular Biology</source>
          ,
          <fpage>328</fpage>
          -
          <lpage>336</lpage>
          (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hofestädt</surname>
            <given-names>R.</given-names>
          </string-name>
          , Thelen S.:
          <article-title>Quantitative modeling of biochemical networks</article-title>
          .
          <source>In Silico Biology</source>
          <volume>1</volume>
          (
          <issue>1</issue>
          ),
          <fpage>39</fpage>
          -
          <lpage>53</lpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Goss</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peccoud</surname>
            <given-names>J</given-names>
          </string-name>
          .:
          <article-title>Quantitative modeling of stochastic systems in molecular biology by using stochastic Petri nets</article-title>
          .
          <source>Proceedings of the National Academy of Sciences of the United States of America</source>
          <volume>95</volume>
          (
          <issue>12</issue>
          ),
          <fpage>6750</fpage>
          -
          <lpage>6755</lpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>David</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alla</surname>
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>Continuous Petri nets</article-title>
          .
          <source>Proceedings of 8th European Workshop on Application and Theory of Petri nets</source>
          ,
          <fpage>275</fpage>
          -
          <lpage>294</lpage>
          (
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Alla</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>David</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <article-title>Continuous and hybrid Petri nets</article-title>
          ,
          <source>Journal of Circuits, Systems, and Computers</source>
          ,
          <volume>8</volume>
          :
          <fpage>159</fpage>
          -
          <lpage>188</lpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Matsuno</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doi</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nagasaki</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miyano</surname>
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Hybrid Petri net representation of gene regulatory network</article-title>
          .
          <source>Pacific Symposium on Biocomputing 5</source>
          ,
          <fpage>341</fpage>
          -
          <lpage>352</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Matsuno</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tanaka</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aoshima</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doi</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Matsui</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miyano</surname>
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Biopathways representation and simulation on hybrid functional Petri net</article-title>
          .
          <source>In Silico Biology</source>
          <volume>3</volume>
          (
          <issue>3</issue>
          ),
          <fpage>389</fpage>
          -
          <lpage>404</lpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Chen</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hofestädt</surname>
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Quantitative Petri net model of gene regulated metabolic networks in the cell</article-title>
          .
          <source>In Silico Biology</source>
          <volume>3</volume>
          (
          <issue>3</issue>
          ),
          <fpage>347</fpage>
          -
          <lpage>365</lpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Doi</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fujita</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Matsuno</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nagasaki</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miyano</surname>
            <given-names>S.:</given-names>
          </string-name>
          <article-title>Constructing biological pathway models with hybrid functional Petri nets</article-title>
          .
          <source>In Silico Biology</source>
          <volume>4</volume>
          (
          <issue>3</issue>
          ),
          <fpage>271</fpage>
          -
          <lpage>291</lpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Nagasaki</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doi</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Matsuno</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miyano</surname>
            <given-names>S.:</given-names>
          </string-name>
          <article-title>A Versatile Petri Net Based Architecture for Modeling and Simulation of Complex Biological Processes</article-title>
          .
          <source>Genome Informatics</source>
          <volume>15</volume>
          (
          <issue>1</issue>
          ),
          <fpage>180</fpage>
          -
          <lpage>197</lpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Nagasaki</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saito</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jeong</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kojima</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ikeda</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miyano</surname>
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Cell Illustrator 4.0: A computational platform for systems biology</article-title>
          .
          <source>In Silico Biology</source>
          <volume>10</volume>
          (
          <issue>1</issue>
          ),
          <fpage>5</fpage>
          -
          <lpage>26</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Rohr</surname>
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marwan</surname>
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heiner</surname>
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Snoopy-a unifying Petri net framework to investigate biomolecular networks</article-title>
          .
          <source>Bioinformatics</source>
          <volume>26</volume>
          (
          <issue>7</issue>
          ),
          <volume>974</volume>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Heiner</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gilbert</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Donaldson</surname>
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Petri nets for systems and synthetic biology</article-title>
          .
          <source>Proceedings 8th International Conference on Formal Methods for Computational Systems Biology</source>
          ,
          <fpage>215</fpage>
          -
          <lpage>264</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Proß</surname>
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Hybrid Modeling and Optimization of Biological Processes</article-title>
          .
          <source>PhD thesis</source>
          (in preparation) (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Modelica Association: Modelica - A Unified</surname>
          </string-name>
          Object-Oriented
          <source>Language for Physical Systems Modeling Language Specification Version</source>
          <volume>3</volume>
          .2 (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Proß</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bachmann</surname>
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>An Advanced Environment for Hybrid Modeling of Biological Systems Based on Modelica</article-title>
          .
          <source>Journal of Integrative Bioinformatics(8)</source>
          ,
          <fpage>1</fpage>
          -
          <lpage>34</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Braun</surname>
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bachmann</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Proß</surname>
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Synchronous Events in the OpenModelica Compiler with a Petri Net Library Application</article-title>
          .
          <source>Proceedings of 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools</source>
          ,
          <volume>63</volume>
          -
          <fpage>70</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>