1 Modeling Systems Biology

Modeling of biological systems is evolving into the description, simulation and analysis of the behavior and interdependent relationship of biological phenomena. Since experimental research can be costly, time-consuming, or ethically infeasible, the result of theoretical and computational modeling is a great advantage and an important aspect of systems biology [1, 2].

In the core of systems biology relies the use of mathematical and computational methods to represent biological behavior, and modeling plays a crucial role in order to provide a system-level understanding of biological system. The aim is to represent life science at different levels of abstraction and description, i.e., molecules, cells, organs, or entire species, and their complex interactions, in order to understand the processes and emergent properties that happen with such systems. In this context, models can serve as:

  • Explanatory or pedagogical tools, using mathematical and computational methods to represent more explicitly the state of knowledge of biological behavior

  • Analysis using models to test hypothesis about the system that best fit the data and, eventually, to predict outcomes of the model to different stimuli

  • Instrumentation, designing alternative systems to circumvent experiments that are too costly, time-consuming, or ethically undesirable.

Models are typically conceptual, existing as an idea, a computer program, or a set of mathematical axioms which are valid in the considered model. For systems biology, the theory of concurrency is at the basis of most approaches that have been applied. Many different formal methods, languages, and modeling paradigms exist that depend on the information, the data, and the model properties that guide the modeling process. Mathematical models are traditionally used in biology to represent quantitative biological phenomena. Usually, they are equation-based models that formulate hypotheses about relations, variables, and magnitudes and how they change over time. Computational models formulate hypotheses about the biological mechanism process to understand the interactions between the system components. They are based on algorithmic process models that are executable and progress from state to state, not necessarily time dependent. They use computational formalisms/paradigms to specify an abstract execution that illustrates a biological phenomenon. Extended review about the distinction between computational and mathematical models is presented in [3, 4]. They debate about the dichotomies, applicability, and benefits of both approaches and how they are used to model biological phenomena.

Although the description of mathematical formalism is based on equations, in systems biology, the computer power is used to describe and analyze such models. Stochastic differential equations, ordinary differential equations, partial differential equations, and delay differential equations are examples of mathematical formalism that use process algebra, term rewriting systems, or different mathematical structure to model in systems biology. Moreover, there are mathematical formalisms that include methods inspired by biological phenomena, such as brane calculi [5], P systems [6], Biocham [7], and calculus of looping sequence [8].

Computational frameworks have provided means to describe and visualize biological networks: Cytoscape [9] is an open-source software platform for visualizing molecular interaction networks and biological pathways. It integrates these networks with annotations, gene expression profiles, and other state data. Another computational platform for visualization and manipulation of complex interaction networks is Osprey [10]. Moreover, there are computational initiatives to represent biological process like the systems biology markup language (SBML) [11], a free and open interchange format for representing computational models in systems biology [12]. Furthermore, there is the Biological Simulation Program for Intra- and Inter-Cellular Evaluation (Bio-SPICE) [13], an open-source framework and software toolset for systems biology that assists biological researchers in the analysis, modeling, and simulation of biological phenomena. It provides different tools across a distributed, heterogeneous community network.

The area of systems biology has benefited greatly from computational formalism based on concurrent systems to model, simulate, and visualize biological phenomena. Important computational formalisms have been successfully used in systems biology, i.e., calculus of communicating systems [14)], π calculus [15], process algebra for the modeling and the analysis of biochemical networks (Bio-PEPA) [16, 17], agent-based model [18, 19], Petri nets [20, 21], as well as variant of this method [22, 23]. The modeling formalism of Petri nets (PNs) has been used quite successfully in systems biology due its flexibility and strong emphasis on concurrency and local dependency. It comprises an abstract model of information flow, providing graphical representation and formal mathematical definition.

In the following, we will provide an overview about the Petri net formalism, its classes, definitions, and the key features of the formalism in systems biology.

2 Petri Nets

Petri nets were defined by Carl Adam Petri in his dissertation thesis in 1962 [24]. It was originally designed to represent discrete, concurrent processes of technical system. The aim was to define a mathematical formalism to represent and analyze causal systems with concurrent processes. The Petri net formalism combines an intuitive, unambiguous, qualitative bipartite graphical representation of arbitrary processes with a formal semantics. Petri nets were conceived as an abstract model of information flow. They are built from basically four different building blocks:

  • Places represent passive nodes that refer to conditions, local states, or resources.

  • Transitions represent active nodes that describe local state shifts, events, and activities in the system.

  • Tokens are variable elements that represent current information on a condition or local state.

  • Directed arcs are connectors that specify relationships between local state and local action by depicting the relation between transitions and places. It is along the arcs which tokens can traverse the model.

The static structure of the Petri net is described by these elements and how they are connected. The places (graphically represented by circles) are connected by arcs (graphically represented by arrows) with transition (graphically represented by a rectangle). The static structure is composed by transitions connected by a number of input places by directed arcs. The static structure also provides output places to which it is connected by a direct arc from transition. Direct connections between two places or two transitions are not allowed. The tokens (graphically represented by dots) can be distributed in the places in order to define a state of Petri net, referred to as a marking. The state space of a Petri net is the set of all possible markings in the model.

The dynamic properties of the system are governed by firing rule. It relates the transitions that can occur when enabled and then moves tokens around the places in a Petri net. A transition is considered enabled when its input places are sufficiently marked, and it fires by consuming and producing tokens. When they occur, tokens are consumed from input places and produced (fired) to output places. A transition can fire only if all the input places have at least one token present. The four main components of a general Petri net are shown in Fig. 1a. Figure 1b depicted a Petri net example, composed by three transitions (T1, T2, T3), three places (P1, P2, P3), and an initial mark (token in P1). Following the dynamic of the system, the transition T1 fires because its input place P1 is sufficiently marked by a token, producing one token on its output place P2; this event is depicted in Fig. 1c. Considering another step in the execution of this model, transition T2 is enabled and fires, consuming the token from its input place P2 and producing tokens on its output places P1 and P2. This event is depicted in Fig. 1d. In the example of Fig. 1, the fire sequence can run whenever one transition in the model is enabled (there is a token on its input place that satisfies the condition to the transition to fire). The fire sequence will stop only if there is no transition enabled to fire (end state).

Fig. 1
figure 1

An example of a Petri net model and its components. (a) Petri net consists of places, transitions, arcs, and tokens. (b) Simple example of a Petri net model where the place P1 contain one token. (c) The transition T1 is enabled by the input place P1 and can fire, consuming the token from P1 and producing tokens on its output place P2. (d) Transition T2 is now enabled and can fire consuming the token from P2 and producing tokens on its output places P1 and P3

Petri nets offer a number of attractive advantages to investigate biological system; we can state that the formalism:

  • Has an intuitive graphical representation and directly executable model

  • Has a strong mathematical foundation, providing a variety of analysis techniques

  • Addresses structural and behavioral properties and also their relationship

  • Integrates qualitative and quantitative methods as well as analysis techniques and simulation/animation

  • Covers discrete and continuous, deterministic and stochastic, sequential and concurrent methods including hybrid techniques for quantitative and qualitative model and analysis

  • Has a range of tools to support the implementation, simulation, and analysis of the models

The intuitive and graphical characteristics of Petri net became popular among computational systems biologists to describe biochemical reaction systems, where tokens are interpreted as single molecules of the species involved [25,26,27]. Koch et al. presented an extended study on the application of Petri nets in systems biology [28]. Moreover, the Petri net formalism provides a natural framework that integrates qualitative (given by the static structural topology) and quantitative (given by the time evolution of the token distribution) aspects tightly integrating different methods for model, simulation, and analysis as shown in [29].

Reddy et al. [21] and Hofestädt [30] were the pioneers in applying Petri net to biochemical systems. Reddy et al. presented a model of fructose metabolism using Petri net to represent the metabolic pathways, analyzing structural properties of the model. Hofestädt described the metabolic process based on expressed genes. He provided models from biosynthesis, protein biosynthesis, and cell communication processes considering the isoleucine biosynthesis in E. coli. There are numerous successful applications illustrating the versatility of Petri nets and their use for metabolic networks [31,32,33,34,35,36] and gene regulatory networks [37, 38]. Approaches that are based on signaling network [39,40,41,42,43], the human spliceosomal subunit U1 [44], and the mycobacterium infection dynamic process [45] have been modeled as Petri nets. Moreover, the Petri net formalism can provide an integration of models that represents biological behavior at different levels (i.e., molecular, cellular, organism, and process level) in a multi-scale hierarchical structure as described in [46, 47].

The basic standard class of the formalism consists of place/transition Petri nets or qualitative Petri nets (QPNs). These nets are discrete and have no association with time or probability. Possible behaviors of the system are analyzed in terms of causalities and dependencies, without any quantification. A Petri net model can be enhanced with special read and inhibitor arcs as a means of modeling activation or inhibition of activities, respectively. In addition, features can be added to allow one to connect sub-models in a hierarchical structure.

There are several ways to add values to a net for quantitative modeling. In continuous Petri nets (CPN), the discrete values of the net are replaced by continuous (real) values to represent concentrations over time [48]. In stochastic Petri nets (SPN), an exponentially distributed firing rate (waiting time) – typically state dependent and specified by a rate function – is associated with each transition [49]. Hybrid Petri nets (HPN) [50] allow one to combine continuous and stochastic features of the process to be modeled. Moreover, there are the colored Petri nets, proposed by Jensen [51, 52]. It is an extension to the Petri net formalism in which information is added in the form of “colors” (data types) assigned to tokens, allowing further operation and structure abstraction. The functional programming language Standard Meta Language (Standard ML) is used to manipulate and test data, providing a flexible way to create compact and parameterizable models. In a colored Petri nets, to regulate the occurrence of transitions, there are arc expressions that specify which tokens can flow over the arcs and guards that are in fact Boolean expressions used to decide which transitions instances exist.

The Petri net and its colored extension permit to organize the formalism in a set of modules as a family of related Petri net classes, sharing structure but being specialized by their kinetic information, dividing it in colored and uncolored: QPN–QPNC (colored), SPN–SPNC (colored), CPN–CPNC (colored), HPN–HPNC (colored). The conversion of these classes can be realized by a folding process. This process groups similar model components in one colored model by defining color set and the set of arc expression. The unfolding process dismembers a colored Petri net in one or more similar nets without colors. Moving between the colored and uncolored level changes the style of representation, but not necessary the net structure, though there may be loss of information in some direction. Heiner et al. [50] produced a classification of the different nets, and Fig. 2 depicts their structure paradigm of the Petri nets formalism.

Fig. 2
figure 2

Paradigm structure of the Petri nets formalism (According to [53])

In the following, we will provide a formal definition of the underlying Petri net classes and its colored extension.

2.1 Qualitative Petri Net (QPN)

A Petri net is represented by a directed, finite, bipartite graph, typically without isolated nodes. The three main components are places, transitions, and arcs. Places represent the discrete resources of the model, i.e., biochemical species. Transitions represent the events (activities) in the system i.e., biochemical reactions. Arcs carry stoichiometric information, called weight or multiplicity. Basically, places and transitions alternate on a path connected by consecutive arcs. Tokens on places represent the (discrete) number of elements or condition which may be understood as quantities of species (or level of concentration), number of molecules, or the simple presence of a gene. A particular arrangement of tokens over all places specifies the current markings of the system describing global states. In QPN, the firing of a transition is atomic and does not consume time. Therefore, they provide a purely qualitative modeling in systems biology.

Adapted from [10] a qualitative Petri net is defined as a tuple N = (P, T, A, I) where:

  • P is a finite nonempty set of places.

  • T is a finite nonempty set of transitions such that

    $$ P\cap T=\varnothing $$
    (1)
  • A is a finite set of arcs, weighted by nonnegative integer values such that

    $$ A\subseteq \left(P\times T\right)\cup \left(T\times P\right)\to \mathbb{N} $$
    (2)
  • I is an initialization function (the initial marking) such that

    $$ I:P\to \mathbb{N} $$
    (3)

An example that illustrates an enzymatic reaction modeled using QPN is depicted in Fig. 3a. The model represents a reaction: S + E ↔ ES → P + E, where a substrate (S) reacts (associate) with an enzyme (E), producing an enzyme-substrate complex (ES), illustrated in Fig. 3b. This complex can dissociate into substrate and enzyme, depicted in Fig. 3c, or synthesize into a product (P) and enzyme (E), depicted in Fig. 3d.

Fig. 3
figure 3

Qualitative Petri net model of an enzymatic reaction. (a) The QPN model representation with an enzyme and a substrate. (b) The enzyme and substrate associate producing an enzyme-substrate complex. (c) The complex can disassociate into enzyme and substrate; or (d) the complex can synthesize into a product and an enzyme

The qualitative Petri nets have been extensively studied in Heiner et al. [22, 48] to model biological systems, and their detailed analysis is exercised step by step. In Blätke et al. [54], IL-6 signaling in the JAK/STAT signal transduction pathway serves as case study to illustrate a modular protein-centered modeling approach. Carvalho et al. [46] presents a hierarchical model using QPN to represent how the bacteria explore regulatory pathways, to evade host immune responses and enhance the infection inside the immune cell.

To be precise on the definition of a quantitative Petri nets (CPN and SPN), it is necessary to define:

  • The preset of a node x ∈ P ∪ T is defined as

    $$ {}^{{}^{\circ}}x:= \left\{y\mathrm{y}\in P\cup T|f\left(y,x\right)\ne 0\right\} $$
    (4)
  • The postset of a node x ∈ P ∪ T is defined as

    $$ {x}^{{}^{\circ}}:= \left\{\mathrm{y}y\in P\cup T|f\left(x,y\right)\ne 0\right\} $$
    (5)

2.2 Continuous Petri Net (CPN)

The distinguishing feature of continuous Petri nets is that the marking of a place is a real (positive) number and no longer an integer. The mark is called token value and can be considered as concentration, where one token value is assigned for each place. The instantaneous firing of a transition takes place like a continuous flow, and the firing event is determined by continuous deterministic rate functions, which are assigned to each transition.

In CPN, a transition is enabled if the token value of all pre-places is positive and greater than zero. Arbitrary firing rates can be defined by mathematical functions, e.g., mass-action kinetic and Michaelis-Menten kinetics to model a deterministic reaction. A reversible reaction can be modeled by using the negative firing rate. The semantic of continuous Petri net is given by the corresponding set of ordinary differential equations (ODEs), describing the continuous change over time on the token value of a given place. Therefore, the pre-transition flow results in a continuous increase, and the post-transition flow results in a continuous decrease. A CPN is the structured description of an ODE system.

Adapted from [55] a continuous Petri net is defined as a tuple N = (P cont, T cont, A cont, V, I cont), where:

  • P cont is a finite nonempty set of continuous places.

  • T cont is a finite nonempty set of continuous transitions which fire continuously over time.

  • A cont is a finite set of arcs, weighted by nonnegative real values:

    $$ A\subseteq \left({P}_{\mathrm{cont}}\times {T}_{\mathrm{cont}}\right)\cup \left({T}_{\mathrm{cont}}\times {P}_{\mathrm{cont}}\right)\to {\mathbb{R}}^{+} $$
    (6)
  • V is a function, which assigns a firing rate function V t to each transition T cont, such that

    $$ V:{T}_{\mathrm{cont}}\to {H}_c $$
    (7)

which assigns a continuous rate function h t to each transition t, whereby

$$ {H}_c={\bigcup}_{t\in {T}_{\mathrm{cont}}}\left\{{h}_t|{h}_t:{\mathbb{N}}^{\mid {}^{\circ}t\mid}\to {\mathbb{R}}^{+}\right\} $$
(8)

is the set of all continuous firing rate functions and

$$ V(t)={h}_t\forall t\in {T}_{\mathrm{cont}}\vspace*{-12pt} $$
(9)
  • I cont is an initialization function (the initial marking) such that

    $$ {I}_{\mathrm{cont}}:P\to {\mathbb{R}}^{+} $$
    (10)

The classical problem to be modeled using CPN is the Lotka-Volterra model (predator-prey model) [56, 57]. A continuous Petri net model that represents this problem is illustrated in Fig. 4a. This example describes the oscillation in the levels of the predator and prey population cycle defined by the reaction equation presented in Fig. 4b. The ODEs used to solve this problem are defined in Fig. 4c. To simulate the model, we consider the initial parameters of 10 tokens of predator, 4 tokens of prey, a predator death rate of 0.1 tokens, a prey birth rate of 1.0 token, and a predator feed rate of 0.1 tokens. For the simulation, it is used a mass-action kinetic function [56] to solve the ODEs. The resulted oscillation of the population cycle is depicted in Fig. 4d, where a high number of predators lead to a low number of prey and vice versa. The Lotka-Volterra model is a famous problem, which describes the time-dependent oscillating behavior of biological and ecological systems [58].

Fig. 4
figure 4

Continuous Petri net model of Lotka-Volterra (predator-prey) problem. (a) The CPN model representation. (b) Reaction equations that represent the oscillation in the levels of the predator and prey population according to a specific rate for each function. (c) The set of ODEs equations describing the continuous change over time. (d) The continuous simulation of the reactions using mass-action kinetic function

2.3 Stochastic Petri Net (SPN)

Initially studied in [59,60,61,62] and summarized by Marsan [63], Stochastic Petri nets can be considered as a timed Petri net in which the timings have stochastic values, where a firing delay (rate functions) is associated with each transition. It specifies the amount of time that must elapse before the transition can fire. This firing delay is a random variable following an exponential probability distribution. The semantics of a SPN with exponentially distributed firing delays for all transitions are described by a continuous time Markov chain (CTMC). Their firing transition follows the standard firing rule of QPNs and does not consume time. The stochastic Petri nets can also be enhanced with modifier arcs, which allow pre-places to modify the firing rate of a transition without influence on its enabled state. There are also special transitions: (1) time is the set of deterministic transitions, whose firing delay is specified by an integer constant; (2) immediate transitions which have zero delay and are always of high priority; and (3) scheduled transitions, a special case of deterministic transition which is specified at an absolute point in the simulation time at which it might occur (it will always depend if it is enabled).

Adapted from [64], we define a stochastic Petri net as tuple N = (P disc, T U , A disc, V, I stoch), where:

  • P disc is a finite nonempty set of discrete places.

  • T U is the union of disjunctive transition sets

    $$ {T}_U={T}_{\mathrm{stoch}}\bigcup {\mathrm{T}}_{\mathrm{im}}\bigcup {T}_{\mathrm{timed}}\bigcup {T}_{\mathrm{scheduled}} $$
    (11)

where:

  1. 1.

    T stoch is the set of stochastic transitions with exponentially distributed waiting time.

  2. 2.

    T im is the set of immediate transitions with waiting time zero.

  3. 3.

    T timed is the set of deterministic transitions, which fire with a deterministic time delay.

  4. 4.

    T scheduled is the set of scheduled transitions, which fire at predefined firing time points.

  • A disc is a finite set of arcs, weighted by nonnegative integer values [cf. 2].

  • V is a function such that

$$ {T}_{\mathrm{stoch}}\to {H}_s $$
(12)

which assigns a stochastic hazard function h t to each transition t, whereby

$$ {H}_s={\bigcup}_{t\in {T}_{\mathrm{stoch}}}\left\{{h}_t|{h}_t:{\mathbb{N}}^{\mid {}^{\circ}t\mid}\to {\mathbb{R}}^{+}\right\} $$
(13)

is the set of all stochastic hazard functions and

$$ V(t)={h}_t\forall t\in {T}_{\mathrm{stoch}}\vspace*{-12pt} $$
(14)
  • I stoch is an initialization function (the initial marking) such that

$$ {I}_{\mathrm{stoch}}:P\to {\mathbb{R}}^{+} $$
(15)

The stochastic hazard function h t defines the marking-dependent transition rate ω t (m) for the transition t, i.e., h t  = ω t (m). The domain of h t is restricted to the set of input places of t, denoted by ° t with ° t = {p ∈ P disc| A disc(p, t) ≠ 0}, to enforce a close relation between network structure and hazard functions. Therefore, ω t (m) actually depends on a sub-marking only.

To illustrate a stochastic Petri net model, we can use the same example of the enzymatic reaction presented in Fig. 3. However, for the SPN, it is necessary to associate rate functions with each transition. For this example, we assume that all transitions in the model have the same rate function (equal to 0.1). Figure 5a presents the SPN model and the reaction equations defined for the enzymatic reaction. To show the stochastic time-dependent dynamic behavior of the model, we simulate the model using the Gillespie stochastic simulation algorithm [65]. Figure 5b depicts the averaged results of 10,000 simulation runs for this example.

Fig. 5
figure 5

Stochastic Petri net model of the enzymatic reactions. (a) The SPN model representation and the set of equations where the rate functions (probability distribution) of a reaction to occur are 0.1. (b) The stochastic simulation of the reactions using mass-action kinetic function for a 10,000 simulation runs

2.4 Hybrid Petri Net (HPN)

The hybrid Petri nets combine both discrete and continuous components in one model. It permits to represent, e.g., a biological switch in which continuous elements are turned on/off by discrete elements [66]. The HPN captures the randomness and fluctuation of the discrete stochastic model and allows at the same time a reasonable computation time. This goal is achieved by simulating fast reactions deterministically using ODE solvers, while simulating slow reaction stochastically.

Hybrid Petri nets have been successfully applied in systems biology [67,68,69,70], and different extensions of HPN were proposed for different purposes [71]. Herajy et al. [72] introduced a more complete extension of hybrid Petri nets (generalized hybrid Petri nets) combining features of CPNs and SPNs, including three types of deterministic transitions.

Adapted from [72], hybrid Petri nets can be defined as a tuple N = (P h , T h , A h , V, I h ) where:

  • P h is a finite nonempty set of (discrete and continuous) places, whereby

    $$ {P}_h={P}_{\mathrm{cont}}\bigcup {P}_{\mathrm{disc}} $$
    (16)
  • T h is the union of two disjunctive transition sets, continuous and stochastic [cf. 11], whereby

    $$ {T}_h={T}_{\mathrm{cont}}\bigcup {T}_U $$
    (17)
  • A h is a finite set of directed arcs

    $$ {A}_h={A}_{\mathrm{disc}}\bigcup {\mathrm{A}}_{\mathrm{cont}}\bigcup {\mathrm{A}}_{\mathrm{inhibit}}\bigcup {\mathrm{A}}_{\mathrm{read}}\bigcup {\mathrm{A}}_{\mathrm{equal}} $$
    (18)

where:

  1. 1.

    Ainhibit defines the set of inhibition arcs, such as (P × T) →  + if P ∈ Pcont or (P × T) →  + if P ∈ Pdisc.

  2. 2.

    A read defines the set of read arcs, such as (P × T) →  + if P ∈ Pcont or (P × T) →  + if P ∈ Pdisc.

  3. 3.

    A equal defines the set of equal arcs, such as (Pdisc × T) →  +.

  • V is a set of functions V = {f, g, d} where:

  1. 1.

    f : T cont → H c is a function which assigns a rate function to each continuous transition [cf. 8].

  2. 2.

    g : T stoch → H s is a function which assigns a rate function to each stochastic transition [cf. 13].

  3. 3.

    d : T timed ⋃ Tscheduled →  + is a function which assigns a constant time to each deterministic and scheduled transition representing the waiting time.

  • I h is the initial marking for both the continuous and discrete places, whereby

    $$ {I}_h={I}_{\mathrm{cont}}\bigcup {\mathrm{I}}_{\mathrm{stoch}} $$
    (19)

The different HPN elements are connected with each other, such that they obey certain rules, e.g., it is not possible to connect a discrete place with a continuous transition using standard arcs. The semantics of continuous transitions are represented by a set of ordinary differential equations that require the existence of real values in the input and output places. Hence this is not allowed to take place for discrete places. Since one of the HPN objectives is to bring discrete and continuous parts together, there are some arcs, which allow the connections between discrete places and continuous transitions. Read, inhibitor, and equal arcs are some examples of these arcs.

To illustrate a hybrid Petri net model, Fig. 6 depicts a HPN of T7 phage, a simple biological network adapted from [72]. Table 1 lists the set of reactions that describe the interaction network. The HPN representation of the model is depicted in Fig. 6. The net is partitioned into discrete and continuous parts based on the reaction kinetic in Table 1. The reactions R5 and R6 are considered to be fast compared to the other four reactions. Therefore, they have been represented by two continuous transitions.

Fig. 6
figure 6

T7 Phage – an example of a simple biological network modeled using HPN (Adapted from [72])

Table 1 List of the set of reactions that describe the interaction network of T7 phage biological network (Adapted from [72])

2.5 Colored Petri Net

Colored Petri net is a Petri net modeling concept, which extends quantitative and qualitative Petri nets by combining the capabilities of programing languages to describe data types and operations. It adds the concept of “color” to distinguish tokens and arc expressions that specify which token can flow over the arcs. Moreover, Boolean expressions (guards) can be defined in the transitions defining additional constrains to enable it.

Adapted from [73], we use Type (Vars) to denote the set of types {Type(v)| v ∈ Vars} of a typed set Vars. To denote the Boolean type, we use the set B consisting of the elements {false, true}.

A multi-set m over a nonempty set S is a function m : S → . An element s ∈ S is said to belong to the multi-set m if m(s) ≠ 0, and then we write s ∈ m. The integer m(s) is the number of appearances of the element s in m.

We represent a multi-set m over S by the formal sum:

$$ \sum_{s\in S}m{(s)}^{\prime }s $$
(20)

By S MS we denote the set of all multi-sets over S.

A colored qualitative Petri net (QPNC) is a tuple (Σ, P, T, A, C, G, E, I),where:

  • Σ is a finite nonempty set of types, called color sets.

  • P is a finite nonempty set of places.

  • T is a finite nonempty set of transitions.

  • A is a finite set of arcs.

  • C is a color function; it is defined from P to Σ.

  • G is a guard function; it is defined from T to Boolean expressions such that

    $$ \forall t\in T:\left[\mathrm{Type}\left(G(t)\right)=B\wedge \mathrm{Type}\left(\mathrm{Var}\left(G(t)\right)\right)\subseteq \Sigma \right] $$
    (21)
  • E is an arc expression function; it is defined from A to expressions such that

    $$ \forall a\in A:\left[\mathrm{Type}\left(E(a)\right)=C\left(p(a)\right)\wedge \mathrm{Type}\left(\mathrm{Var}\left(E(a)\right)\right)\subseteq \Sigma \right] $$
    (22)

where p(a) is the place component of a.

  • I is an initialization function (the initial marking); it is defined from P to multi-sets of colors such that

    $$ \forall p\in P:\left[\mathrm{Type}\ \left(I(p)\right)\subseteq C(p)\right] $$
    (23)

In general, a marking associates with each place P a multi-set over C(p), that is, a marking assigns to each place a multi-set of “colored tokens.”

In the formal definition of the colored extension of the previous Petri net classes (CPN, SPN, HPN), we replace the set of transitions T and add the set of functions according to each class, such as:

  • CPNC : CPN ∪ QPNC = (Σ, P cont, T cont, A cont, V, C, G, E, I cont)

  • SPNC : SPN ∪ QPNC = (Σ, P disc, T U , A disc, V, C, G, E, I stoch)

  • HPNC : SPN ∪ QPNC = (Σ, P h , T h , A h , V, C, G, E, I h )

In the colored Petri net, a transition is enabled (allowed to fire) if it has no input place or if each of its input places is sufficiently marked by tokens: i.e., the arc expressions evaluate to a multi-set of token colors that should be available in the corresponding preceding place. In addition, the guard of the transition – if present – should evaluate to be true for the given binding. When a transition fires, a multi-set of colored tokens is consumed (taken) from each of the preceding places, according to the evaluation of the expression on the arc. A multi-set of colored tokens is produced (added), in correspondence with the arc expression, to each successor place. The overall state space of the Petri net is determined by the firing sequences consisting of iterated occurrences of transitions [74].

A typical example of a colored Petri net and its components is depicted in Fig. 7. Here both the graphical representation and the values that make of the QPNC are given. Figure 7a shows the declaration of the data values assigned to the net defining two color sets: count with integer values and individual with a string mm; a constant Max with an integer value; the two variables, k and x, used in arc expressions; and the guard of the transition. The color sets are assigned to places, and the tokens on each place will have a color from a color set assigned to the place. In Fig. 7b the net is defined with place P1 (with color set individual) containing one token with the color mm, place P2 (with color set count) containing one token with the integer value “1,” and place P3 (with color set individual) without token. The transition T1 is connected to the place P1 by a read arc that works as a test arc: if there is a token in P1, as described by the binding of x and that satisfies the firing rule, then the transition can occur, producing a token on the output places, but not consuming the token read in P1. Transition T1 is connected to place P2 by two arcs indicating that it will consume and produce tokens according to the arc expressions. Figure 7c shows the new marking obtained when T1 has read P1 and consumed the token in P2, adding a new token in P2 and P3 according to the firing rule. Repeating this process, the firing sequence will stop in the end state as shown in Fig. 7d. In this case, the guard condition turns false since the value of the token in P2 does not fulfill the condition.

Fig. 7
figure 7

Colored Petri net example. (a) Declarations of the data types and variables. (b) Colored Petri net components. (c) State of the net after firing the transition. (d) End state of the net; the transition is not able to fire since the condition of the guard is not satisfied

3 Model Analysis

A reliable model is responsible in reproducing a biological process bringing evidences in reproducing a specific behavior and confidence on its predictive capability. Once a model has been constructed, it should serve as a clear description of the system and can be unequivocally communicated. Therefore, an analysis of the model is required in order to verify and validate its structure and behavior.

For the analysis of a model, it is necessary to refer to the model objective, the information, and data used in the modeling process. In the process of analysis, we can test the model: does the model represent the hypothesis at hand? Is the data concisely represented? Does the model reproduce the problem? Moreover, the analysis of the model must consider the characteristics of the biological system that have been used to define the model properties. Therefore, we can classify the models according to some properties:

  • Reversibility: Checks if the initial condition of a model can be reached again. Therefore, the model has the capability of self-reinitialization, e.g., a chemical reaction can be classified as irreversible if nearly all of its reactants are used to form a product and there are no reactants to restart the reaction.

  • Periodicity: Checks if it will be possible to reach a state in the model where a process is periodically active. In nature, we know calcium oscillation as an important periodic process that controls a wide variety of cellular mechanisms and is often organized into intracellular and intercellular calcium waves.

  • Stability: Biological systems have to be stable in performing a certain function in a specific changeable environment.

  • Robustness: Checks if the model can flexibly respond to environmental perturbations or other changes. It is implemented in biological systems by redundancy, feedback loops, and structural stability.

  • Activity: Checks if part of the model can be active or inactive, depending on other activated/nonactivated components of the model. Proteins are an example where it can be activated or deactivated by phosphorylation or dephosphorylation process, respectively.

  • Determinism: Deterministic models produce the same output for the same starting condition; there is no randomness in the development of subsequent state. Deterministic models can be distinguished between discrete and continuous models.

  • Stochasticity: In stochastic models, the development of subsequent processes is additionally determined by a random element. This random element acknowledges that a subsequent state in the model is resulted of unknown causes (a phenomena that appear to vary in a random manner).

  • Discreteness: Consider the countable amount (e.g., proteins, genes, etc.), where processes take place according to discrete rules. In contrast, continuous models do not consider countable entities; it works with concentration and reaction rates that depend on substance concentration.

Structural analysis of a model refers to the analysis of the structural properties, which only depend on the net topology. The structural properties of a Petri net model are directly dependent on the arrangement of places, transitions, and arcs. They are independent of the initial marking; they hold for any initial marking or are concerned with the existence of certain firing sequences from some initial marking. The structural analysis can be considered as an initial consistency check to prove that the model adheres to the assumptions and the modeling decision. The most important structural properties of a Petri net model are described in [22, 75].

One important (experimental) strategy to verify and validate the model is using simulation. The analysis of the results of a simulation can demonstrate the proper behavior of the model, and also it can contribute to possibly further refine the model, so the results approximate reality as close as possible. Although model simulations will never replace laboratory experiments, a model allows one to probe system behavior in ways that would not be possible in the lab. Simulations can be carried out quickly (often in seconds) and incur no real cost. Model behavior can be explored in conditions that are otherwise difficult to achieve in laboratory settings. Every aspect of model behavior can be observed at all time points. Furthermore, model analysis yields insights into why a system behaves the way it does, thus providing links between network structure modeled and observed in real experiments.

4 Tools

There are many tools available on the Internet as well as web platforms that can be used for the implementation of Petri net models [17, 32, 76,77,78,79,80,81,82,83,84]. Most of the tools are confined to specific classes and/or not support extensions, portability, or analysis. However, few tools can provide an extensible experience with Petri net methods [85,86,87]. We assessed that Snoopy software [53] is the most complete tool available to design and evaluate models in Petri nets. It supports a set of related important Petri net classes, i.e., QPN, SPN, CPN, and HBPN, and their colored extensions. Snoopy provides analysis techniques, e.g., animation and simulation, and also exports properties between classes and to external analysis tools, i.e., Charlie [88] and Marcie [89]. Recently, the Snoopy Steering and Simulation Server tool (S4) [34, 90] was released as an extension of the Snoopy simulation to perform stochastic simulations in multi-core servers. This extension provides a better performance for simulations of big models as well as to change stochastic properties of the model while it is running. The Snoopy is platform independent and freely available for all relevant platforms, i.e., Linux, Windows, and Mac OS platforms.

5 Conclusion and Discussion

Experimental and computational approaches can be combined to systematically investigate biological systems. The integration of modeling and experimentation is essential in the creation of a computational system that can simulate events and predict outcomes of biological behavior. Since experimental research can be costly, time-consuming, or ethically infeasible, the results of in silico experiments are a great advantage and an important aspect of systems biology.

In order to understand the structural and dynamic properties of complex biological systems, models are needed that can describe the entities involved and their interaction. In this chapter, we introduced computational methods that can be used to model a biological system, emphasizing the Petri net formalism. This method combines an intuitive graphical representation with a strong mathematical foundation, integrating qualitative and quantitative aspects in a range of tools that support implementation, simulation, and analysis. We also presented the structured family of Petri net classes, given a brief introduction and formal definition of each class. Our objective is to give a general idea of how to use Petri nets for modeling and analyze biological system with different Petri net modeling paradigms.

Research in bio-modeling and Petri nets reflects an approach to systems biology research, in which the integration of modeling and visualization aspects is essential. The characteristics discussed in this chapter suggest that Petri net is an important method to model, simulate, and analyze biological behavior. We provided plenty of pointers to related literature where the interested reader may find the inspiration to apply this formalism in systems biology. The collaboration between biology and computer science researchers both with an experimental and a formal background is crucial to develop systems that can contribute to our understanding of biological phenomena.