=Paper= {{Paper |id=Vol-1373/paper2 |storemode=property |title=Petri nets for modelling and analysing trophic networks |pdfUrl=https://ceur-ws.org/Vol-1373/paper2.pdf |volume=Vol-1373 |dblpUrl=https://dblp.org/rec/conf/apn/BaldanBBCS15 }} ==Petri nets for modelling and analysing trophic networks== https://ceur-ws.org/Vol-1373/paper2.pdf
          Petri nets for modelling and analysing
                     trophic networks

    Paolo Baldan1 , Martina Bocci2 , Daniele Brigolin2 , Nicoletta Cocco2 , and
                               Marta Simeoni2
              1
                Dipartimento di Matematica, Università di Padova, Italy
                               baldan@math.unipd.it
            2
              Dipartimento di Scienze Ambientali, Informatica e Statistica,
                       Università Ca’ Foscari di Venezia, Italy
                 {martina.bocci,brigo,cocco,simeoni}@unive.it



       Abstract. We consider trophic networks, a kind of networks used in
       ecology to represent feeding interactions (what-eats-what) in an ecosys-
       tem. We observe that trophic networks can be naturally modelled as
       Petri nets and this suggests the possibility of exploiting Petri nets for
       the analysis and simulation of trophic networks. Some preliminary steps
       in this directions and some ideas for future development are presented.


1    Introduction

Ecosystems are very complex systems constituted by biotic communities (popu-
lations of different species), abiotic components of the environment (like air, wa-
ter, soil) and interactions among these (living and non-living) elements. A branch
of ecology deals with the study of feeding relationships within ecosystems and
represents them as networks of interacting compartments called trophic networks
or food webs. Due to the common limited availability of experimental informa-
tion, a static approach (the mass balance steady state approach) to the study of
such networks has been developed as alternative to the dynamic description.
    Complex networks of interacting entities are widely studied in computer sci-
ence: computer networks, agent systems, and, in general, all concurrent and
distributed systems fall into this category. Uncountably many formalisms and
practical tools have been developed for the representation and analysis of inter-
acting systems. This suggests the possibility of reusing models and techniques
from computer science for the study of trophic networks.
    This idea is pursued in [17], where the authors advocate the use of process
calculi for ecological modelling. Their claim is that the compositionality prop-
erties of process calculi can be fruitfully exploited for a modular representation
of complex ecosystems. Moreover, process calculi provide an individual based
modelling and stochastic extensions.
    In this paper we explore the use of another widely used model of concur-
rency, namely Petri nets [19, 11]. Petri nets permit individual based modelling,
they explicitly represent parallelism and dependencies among entities, they offer




M Heiner, AK Wagler (Eds.): BioPPN 2015, a satellite event of PETRI NETS 2015,
CEUR Workshop Proceedings Vol. 1373, 2015.
22     P Baldan et al.

stochastic and continuous extensions and, as a major advantage, they enable
a qualitative analysis of systems when dynamic information are not available.
Many tools for systems visualisation, analysis and simulation are also available
(see The Petri net World site [21]). In this paper we consider the representation
and analysis techniques generally adopted for trophic networks and discuss the
pros and cons of the application of Petri nets to this field.
    The structure of the paper is as follows. In Section 2 trophic networks are
introduced with a small case study related to the Venice lagoon. In Section 3 the
main concepts in Petri nets used to model trophic networks are briefly recalled. In
Section 4 we propose a simple application of Petri nets to the representation and
analysis of trophic networks when dynamic information are not available. This
is exemplified in the case study. Some conclusions and suggestions for further
work are given in Section 5.


2    Tropic Networks

An ecosystem is a community of living organisms, such as plants, animals and
microbes, in conjunction with the nonliving components of their environment,
such as air, water and bioavailable organic matter (detritus), which interact as
a system. A trophic network (or food web) is a representation of feeding inter-
actions in an ecosystem, where the components are connected by binary links
(what-eats-what). Food webs permit to represent and analyse the trophic struc-
ture and functioning of an ecosystem. This knowledge can be used to identify
key species and to detect anthropogenic impacts, such as the effects of pollution,
of physical disturbance, of resources exploitation, etc. Real trophic networks are
very complex, hence models provide partial and abstract representations where,
for instance, similar species are aggregated into groups with similar feeding be-
haviour. Model representation of a trophic network generally focuses on the
fluxes of energy or biomass between nodes. Such fluxes are directional and gener-
ally encompass some very relevant organism-level processes, such as production,
consumption, assimilation, predation, non-predatory mortality and respiration.
An ecosystem is generally an open system, i.e. there are flows of material or
energy between the system and the rest of the world. For this reason, when rep-
resenting and analysing trophic networks, generally also the input and output
flows are taken into account. Inputs can be primary production, immigration or
incoming of detrital matter into the system, while outputs can be emigration,
harvesting by humans and exit of detrital matter from the system. Some energy
may be dissipated into heat (respiration) or some material may be degraded into
its lowest energy form (detritus).
    Knowledge on the species present in the studied ecosystem and on their feed-
ing behaviour is a needed prerequisite for representing the trophic network. First
of all it is necessary to single out the n living and non-living compartments to be
represented. A compartment can represent a population of a given species or of
some aggregation of species with comparable feeding habits. For each compart-
ment it is necessary to determine which other taxa are included in its diet, thus




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                   Petri nets for trophic networks       23

                                                                     Nocost. Flux
                                                                     1       CO2 →PHP
                                                                     2       input→DET
                                                                     3       PHP→MIZ
                                                                     4       PHP→MEZ
                                                                     5       PHP→DET
                                                                     6       PHP→TAP
                                                                     7       DET→BPL
                                                                     8       BPL→CO2
                                                                     9       BPL→MEZ
                                                                     10      BPL→MIZ
                                                                     11      BPL→TAP
                                                                     12      MIZ→MIZ
                                                                     13      MIZ→DET
                                                                     14      MIZ→CO2
                                                                     15      MIZ→MEZ
                                                                     16      MIZ→TAP
                                                                     17      MEZ→MEZ
                                                                     18      MEZ→DET
                                                                     19      MEZ→CO2
                                                                     20      TAP→DET
                                                                     21      TAP→CO2
                                                                     22      TAP→Harvesting
                                                                     23      DET→TAP
                                                                     24      DET→Export

 Fig. 1. A trophic network TV of the Venice Lagoon [4] (left) and its fluxes (right).



specifying the interactions among species or groups of species. These information
determine the network topology, which already provides some relevant insights
on the features of the ecosystem. It is normally represented as a directed graph
where each node represents a compartment and each arc denotes an interaction
between the source and target nodes. More precisely, an arc from node A to node
B represents a flow of energy or biomass from A to B. A common convention
is to depict dissipation for some node with an arc outgoing from the node and
ending in the ground symbol of electrical circuits [20]. A quantity may be asso-
ciated with each arc, representing the magnitude of biomass or energy flow or
the relative occurrence of such a flow. The resulting graph is a directed weighted
graph.
    The graph of a simple planktonic trophic network of the Venice Lagoon,
taken from [4], is shown in Figure 1 (left). Numbers on arrows indicate the
fluxes, which are listed in Figure 1 (right). The compartments considered are
phytoplankton (PHP), bacterioplankton (BPL), microzooplankton (MIZ), meso-
zooplankton (MEZ), R. philippinarum (TAP) and organic detritus (DET). The
network provides a representation of the food items digested and assimilated by
R. philippinarum (a marine bivalve mollusk), namely, green algae, cyanobacte-
ria, diatoms, bacterioplankton, microzooplankton, and dead, dissolved, and/or
particulate organic matter.
    This trophic network has some peculiarities:

 – dissipation (respiration) of PHP is not considered because the flow from CO2
   to PHP models the net photosynthetic production, known from experimental
   data, i.e. the CO2 needed for respiration has been already subtracted;




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
24     P Baldan et al.

 – flow from BPL to DET (mortality of BPL) is not considered because it is
   known to be negligible by experimental data;
 – flows from TAP, MEZ and MIZ to DET include both natural mortality and
   production of faeces;
 – flow from PHP to DET indicates only mortality, because PHP does not
   produce faeces;
 – in the case of MIZ and MEZ cannibalism is represented by arrows exiting
   and entering in the same compartment (flows 12 and 17).

From the topology of the graph, or the corresponding adjacency matrix, some in-
formation about system behaviour can be derived. Clearly the adjacency matrix
does not represent the information on weights of the interactions. For this reason
various other matrices have been defined and used for analysis purposes, such as
the matrix of dietary coefficients, the Leontief structure matrix, the total depen-
dency matrix and many others which express different views of the network in
relation to structural and quantitative dependencies among compartments [28].
The main advantage of a matrix representation of a trophic network is that lin-
ear algebra techniques can be applied and in fact matrix methods are the most
used for static analysis of trophic networks (e.g. I-O modelling techniques for
economics modified for ecosystems [28]).
    To move from purely topological analysis of a trophic network to quantitative
analysis, ecologists need quantitative data. Estimation of biomass and knowledge
of several rates (e.g. production rate, consumption rate, respiration rate, etc.)
are needed to quantify flows among compartments, together with quantitative
knowledge about diet composition of each living compartment. Some informa-
tion on primary production, specific consumption rates and diet compositions
can be gained from field and laboratory studies but it is unfeasible to deter-
mine the magnitudes of all flows in the system directly. It becomes necessary,
therefore, to estimate the magnitudes of some of them by indirect means. A
helpful approach for estimating unknown flows consists in assuming the bal-
ance of inputs and outputs for each compartment. If a sufficiently long time
period is considered, mass balance in each node of the network is a reasonable
assumption because of the conservation of mass principle. Under the mass bal-
ance assumption, the system is represented as a steady state snapshot of energy
flows, averaged over time. Different techniques are used for the trophic network
reconstruction, that is to infer unspecified flows by solving the balance equa-
tions and satisfying the constraints among the flows in the system. The problem
is generally underdetermined and an infinite number of solutions comply with
the data set and the mass balance assumption. One technique is the Inverse
Model (IM), which has been firstly applied to trophic network in [31] and it has
become quite common among ecologists. IM combines mass balance equations,
data equations and constraints on the flows expressed as inequalities. It finds a
unique solution based on some optimisation criteria, for example by minimising
the sum of squared flows, which corresponds to the most parsimonious solution.
The package LIM implements linear inverse models in R [29]. Another freely
available popular automated balancing routine that supports representation of




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                    Petri nets for trophic networks        25

trophic networks, estimation of unknown flows and ecological network analysis
is Ecopath [6] and its evolutions Ecopath-Ecosym-Ecospace [7, 8].
    Several analyses on ecological networks have been defined in the last decades.
Some of them are based only on the topology of the model, for instance deter-
mining food chain length, connectance and the presence of cycles. In a balanced
model it is possible to study both qualitative and quantitative properties mea-
sured by global system status indexes such as degree of recycling [2], stability [16,
30], development [27], ascendency [28] and maturity [20]. Analysis of recycling
is intended to characterise how the biomass or energy is reused in a trophic net-
work. Such analysis requires the topology of pathways over which the medium
is recycled, as well as the amounts of material cycling in each loop. In [28] the
author proposes to do this into two steps: first all simple cycles in the network
are identified, then cycled flows are separated from straight-through flows and a
technique is proposed to identify and subtract them from the original network.

3    Petri Nets
Petri nets are a well known formalism originally introduced in computer science
for modelling discrete concurrent systems. Petri nets have a sound theory and
many applications which are not limited to computer science (see, e.g., [19]
and [11] for surveys). A large number of tools have been developed for analysing
Petri nets (see a list at the Petri Nets World site [21]).
    We denote a basic Petri net by N = (P, T, W, M0 ), where P = {p1 , . . . , pn }
         of places, T = {t1 , . . . , tm } is the set of transitions, W : (P × T ) ∪
is the set
(T × P ) → N is the weight function and M0 is the initial marking of the net, an
n-dimensional integer vector assigning to each place its initial number of tokens.
    We write t− for the pre-condition of a transitions t, namely the n-dimensional
vector t− = (i1 , . . . , in ), where ij = W (pj , t) for j ∈ {1, . . . , n}. Sometimes it
will be confused with its support, i.e., the set of places {pj | ij > 0}. The
post-condition t+ = (o1 , . . . , on ) is defined dually.
    The incidence matrix of a Petri net N , denoted by AN , is the n × m matrix
which has a row for each place and a column for each transition. The column
associated with transition t is the vector (t+ − t− )T , which represents the marking
change due to the firing of t.
    Depending on the available information, Petri nets may permit to represent
and study a system qualitatively, based only on the graph structure, as much as
quantitatively or dynamically. An interesting structural analysis is based on the
incidence matrix and it aims to determine the so-called invariants of the net.
We focus here on T-invariants. Let N be a Petri net, with m transitions and
n places, a T-invariant (transition invariant) of N is a multiset of transitions
whose execution starting from a state will bring the system back to the same
state, namely it is an m-dimensional vector in which each component represents
the number of times that a transition should fire to take the net from a state M
back to M itself. It can be obtained as a solution of the equation
    AN · X = 0, where X = (x1 , . . . , xm )T        and xi ∈ N, for i ∈ {1, . . . , m}.




                 Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
26      P Baldan et al.

A T-invariant X 6= 0 indicates that the system can cycle on a state M enabling
the cycle. As discussed in [13, 18], T-invariants admit two possible interpreta-
tions. On the one hand, the components of a T-invariant represent a multiset of
interactions (transitions) whose partially ordered execution reproduces a given
initial state of the system (marking). On the other hand, the components of
a T-invariant may be interpreted as the relative rates of interactions (transi-
tions) which occur permanently and concurrently in a steady state. Minimal
T-invariants of a finite Petri net, N , form a basis, B(N ), for the set of semi-
positive T-invariant (Hilbert basis [24]). Any T-invariant can be obtained as a
linear combination, with positive integer coefficients, of elements of the basis.
Uniqueness of the basis B(N ) makes it a characteristic feature of the net N .
    Two subclasses of Petri nets will be of interest in the modelling of trophic
networks [10]. A state machine Petri net is a Petri net where every arc has weight
one and every transition has exactly one place in its pre- and post-condition.
State machine Petri nets are conservative, namely the total number of tokens of
the system remains invariant under the occurrence of transitions. A free choice
Petri net is characterised by the fact that for any place p, either p has at most
one post-transition (i.e. no conflict) or it is the only pre-place of all its post-
transitions. The class of state machine Petri nets is strictly included in the class
of free choice Petri nets.
    Petri nets supply an executable specification: in the case of basic Petri nets,
we can play the token game, i. e. the non-deterministic firing of all the en-
abled transitions. More sophisticated and realistic models and simulations can
be obtained through extended Petri net models. The most interesting in our
context are Continuous Petri nets. In Continuous Petri nets [13] the state is no
longer discrete. Places contain non-negative real numbers, called marks, usually
interpreted as the concentration of the species represented by the place. The in-
stantaneous firing of a transition is carried out like a continuous flow. The firing
rate expresses the “speed” of the transformation from input to output places.
The rate functions associated with transitions may follow, under simplifying
assumptions, known kinetic equations such as the mass action equation.



4    Petri Nets for Analysing Trophic Networks


We start discussing how Petri nets can be used to model and analyse a trophic
network. We assume to know only the species (or compartments) and their rela-
tions, which is the minimal knowledge generally available on a trophic network.
As a running example, we consider the trophic network TV of the Venice lagoon
in Figure 1. We illustrate how to build corresponding Petri net models and dis-
cuss what we can obtain by applying some Petri net analysis techniques. We
use the tools Snoopy [14], Charlie [15] and 4ti2 [1] for editing and analysing the
Petri net models.




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                   Petri nets for trophic networks   27

4.1   Modelling trophic networks with Petri nets
Given a trophic network T , a simple Petri net model can be immediately derived
by replicating the topological structure of T in the Petri net. Recall that in
the graph representation of T each species (or compartment) is a node and a
relation between two species is a directed arc representing the flux between the
two species.
    A structural Petri net model of a trophic network T is the net Ns (T ) where
 – any species (or compartment) becomes a place;
 – any flow (relation) between two species S1 and S2 in T , becomes a transition
   having S1 as a pre-condition and S2 as a post-condition.
 – any outgoing flow from a species S1 to the external environment (e.g., dis-
   sipation) in T , becomes a transition with pre-condition S1 and empty post-
   condition; similarly, any incoming flow from the environment to a species
   S2 , becomes a transition with empty pre-condition and post-condition S2 .
In absence of any information regarding the fluxes, all weights are set to one.
Transitions corresponding to interactions among species are referred to as inter-
nal transitions, while those corresponding to interactions with the environment
are referred to as interface transitions. Note that the structural Petri net model
of a trophic network is a free choice Petri net and, when restricted to internal
transitions, it is a state machine Petri net.
    By applying the described construction to the running example TV in Fig-
ure 1, we obtain a structural Petri net model which is depicted in Figure 2
(for the moment, please ignore the rates associated with transitions). The net
includes six places (in yellow) representing the six compartments (DET, PHP,
BPL, MIZ, MEZ, TAP) of the trophic network, and by as many transitions as
the flows of biomass, to which we associate different colors to improve readabil-
ity. More specifically, respiration flows (producing CO2 ) are represented by light
blue transitions; defecation flows are represented by brown transitions; mortality
flows are represented by purple transitions; input and export flows for DET, as
well as the harvesting flow for TAP are represented by red transitions; predation-
prey flows are represented by white transitions.
    Note that transitions PHP CO2, representing respiration of PHP, and BPL DET,
representing BPL mortality in the Petri net model of Figure 2, do not have a
direct match in the trophic network TV of Figure 1. This is due to the fact
that, as already mentioned, TV was simplified by taking into account also some
experimental data. More precisely, the flow corresponding to PHP CO2 was inte-
grated in CO2 PHP (modelling CO2 needed for photosynthesis) and BPL DET
was considered irrelevant and thus omitted.

4.2   Structural analysis of trophic networks modelled as Petri nets
Since the structural Petri net model strictly adheres to the graph representation
used by ecologists, it obviously enables the usual structural analyses for trophic
networks, for example to determine food chains lengths and connectance.




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
28      P Baldan et al.

    In addition, standard structural analyses for Petri nets can be used, like those
based on T-invariants. The presence of T-invariants in a Petri net model of a
trophic network is ecologically of interest as it can reveal the presence of steady
states. The set of transitions involved in a T-invariant can be seen as a subsystem
of the original system, whose equilibrium is autonomously maintained.
    Given a trophic network T , consider the set of semi-positive T-invariants
of the structural Petri net model Ns (T ) and the corresponding Hilbert basis
B(Ns (T )), consisting of the minimal T-invariants. According to the terminology
in [13], we classify T-invariants into two groups:

 – internal T-invariants, consisting of internal transitions only;
 – I/O T-invariants, which include also interface transitions.

    If we consider the elements of the basis, then for any such T-invariant I =
(x1 , . . . , xm ) we have xi ≤ 1 for all i ∈ {1, . . . , m}, namely each transition occurs
at most once and the invariant is a set rather than a proper multiset. Moreover,
since Ns (T ), when restricted to the internal transitions, is a state machine, for
any pair of transitions ti , tj in the same invariant, whenever they share a place
in the pre-condition or in the post-condition, they coincide. Therefore:

 – Minimal internal invariants are simple cycles, involving only internal tran-
   sitions.
 – Minimal I/O invariants are acyclic paths, connecting two interface transi-
   tions.

In both cases we recover well-known concepts in trophic networks as presented,
e.g., in [28]. The internal minimal T-invariants are Ulanowicz simple cycles,
which are associated with the internal recycling of matter. The minimal I/O
T-invariants are the Ulanowicz straight-through flows, which represent the way
energy and matter are provided by the environment, used by the network and
then (partially) released back to the environment. The correspondence is at the
structural level and the quantities of fluxes are needed for Ulanowicz analyses.
    In our case study, the structural Petri net model has an Hilbert basis consist-
ing of 69 minimal T-invariants, nine are internal and sixty are I/O invariants. The
internal T-invariants are shown in Table 1. The first two invariants describe the
self-predation (cannibalism) of MEZ and MIZ. All the other T-invariants “tra-
verse” the DET place, pointing out that Detritus is the way for recycling matter
in this network. The I/O invariants start from source transitions CO2 PHP
and input DET and end in sink transitions PHP CO2, BPL CO2, MIZ CO2,
MEZ CO2, TAP CO2 and TAP harvesting. They model trophic chains allowing
for respiration of the various compartments and for input and output of matter.


4.3   T-invariant based steady state

In this section we refine the structural Petri net model of a trophic network,
turning it into a continuous Petri net model. What we obtain closely resembles
the representation of the trophic network usually adopted by ecologists, where




                 Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                   Petri nets for trophic networks   29

                  Inv no. Transitions
                   1      MEZ MEZ
                   2      MIZ MIZ
                   3      DET TAP; TAP DET
                   4      DET BPL; BPL DET
                   5      DET BPL; BPL MEZ; MEZ DET
                   6      DET BPL; BPL MIZ; MIZ DET
                   7      DET BPL; BPL TAP; TAP DET
                   8      DET BPL; BPL MIZ; MIZ MEZ; MEZ DET
                   9      DET BPL; BPL MIZ; MIZ TAP; TAP DET

  Table 1. Internal minimal T-invariants of the structural Petri net model of TV .



the system is at a steady state and the input and output flows in all the compart-
ments are balanced (the mass balance assumption). The choice of considering
a continuous extension is motivated by the fact that we are modelling fluxes of
biomass which better correspond to continuous fluxes.
    The continuous Petri net model is still derived only from the network topol-
ogy by exploiting the minimal T-invariants in a way similar to what is done in
[22] for Time Petri nets. A first observation is in order.
Remark 1. In the structural Petri net model of a trophic network Ns (T ) any
place has typically at least one incoming and one outgoing transition, otherwise
the place would unnaturally correspond to a compartment with monotonically
increasing or decreasing content. Under this assumption, Ns (T ) is covered by
T-invariants, namely each transition in the Petri net belongs to at least one
minimal T-invariant. In fact, when we exclude interface transitions Ns (T ) is
a state machine, hence for any transition, if we follow the predecessors and
successors we will get back to the transition itself (internal T-invariant) or to an
interface transition on both sides (I/O T-invariant).
   In order to associate rates with the transitions, we assume that each subsys-
tem corresponding to a minimal T-invariant
 1. is active and
 2. performs all its transitions once per time unit.
The assumption that all minimal subsystems of an ecosystem are active is quite
reasonable from an ecological viewpoint. On the contrary the assumption that
all subsystems perform all their transitions exactly once per time unit is rather
strong and unrealistic. This is the simplest choice which can be taken in absence
of further information on the ecosystem. When additional knowledge is available,
it could be integrated in the model, as shown in the next section.
    Let us consider the structural Petri net model Ns (T ) of a trophic network
T as described in Section 4.1 and its Hilbert basis B(Ns (T )). According to the
assumptions above, the rate of a transition t should depend on the number
of minimal invariants in which t occurs. Then, for the trophic network T , we
define the simple continuous Petri net model Nc (T ) as the continuous Petri net
obtained by considering the structural model Ns (T ) as underlying Petri net and
by associating to each transition t a constant rate given by:




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
30      P Baldan et al.

                     rate(t) = |{Ii |Ii ∈ B(Ns (T )) ∧ t ∈ Ii }|.

    With such rates, all the transitions in all the invariants in Nc (T ) are per-
formed once in one time unit and the system is in a steady state. Moreover, since
all transition arcs are 1-weighted, rates and flows per time unit coincide.

Remark 2. The continuous Petri net model of a trophic network satisfies the
mass balance assumption, namely, for all compartments the sum of ingoing and
outgoing fluxes coincide. This is an immediate consequence of the fact that
minimal T-invariants are simple cycles or paths. Hence, given a place p, for any
invariant Ii that “crosses” place p, one token is added to p by a transition in Ii
and one token is consumed by another transition in Ii , namely the flux flowing
through p via Ii is balanced. This holds for any invariant crossing p and for any
p. Therefore, the input and output fluxes coincide for any place of the network.

    In the simple continuous model Nc (T ), the system is represented in a steady
state, with the fluxes of biomass balanced in all compartments. This corresponds
closely to the ecologists representation of a trophic network as a snapshot of the
system at steady state. Note that the continuous Petri net model Nc (T ), despite
the fact that it makes explicit some additional features, is still based only on the
topology of T : biomasses do not play a role in the definition of the rates.
    For our case study, the continuous Petri net model resulting from the con-
struction outlined above is shown in Figure 2, where each transition have an
associated rate. Note that all places are balanced. We would like to validate
our simple continuous model by considering some basic ecological processes and
check their plausibility from an ecological point of view. For each compartment
we compute the throughput, namely the total amount of flux flowing per unit of
time, in order to measure the degree of activity of the compartment. Besides we
compute food consumption (total amount of ingested food per time unit), food
assimilation (amount of ingested food minus amount of faeces, per time unit),
respiration and mortality as percentages of the consumption. Table 2 shows the
throughputs, the assimilation and respiration values as resulting from the model
compared with those found in the literature.
    The values derived from the simple continuous model are quite interesting.
Considering the throughput, the various compartments are ordered as follows:

                      DET>PHP>BPL=TAP>MIZ>MEZ.

We may distinguish two main groups: lower trophic level compartments (DET,
PHP and BPL), having higher throughput, and higher trophic level compart-
ments (TAP, MIZ and MEZ), having lower throughput. This is coherent with
the general knowledge on metabolic and growth rates of the two different groups
of compartments under consideration.
    Assimilation of the top compartment TAP is just over the maximum indi-
cated in the literature, while assimilation requirements for MEZ and MIZ are
perfectly met. However, MEZ assimilation is close to the lower bound of the
indicated range. This is due to the fact that MEZ is a top level compartment




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                  Petri nets for trophic networks   31




               Fig. 2. Continuous Petri net model for the case study


in the network and no predators are modelled for it. This is a quite unrealistic
assumption: in natural systems MEZ are actually preyed by other species, like
fishes. By adding an external predation on MEZ, we found that its assimilation
becomes close to TAP and MIZ assimilation values.
    Concerning respiration, TAP and MEZ satisfy the constraints found in the
literature, while MIZ and BPL are slightly below the indicated value. Respiration
of PHP is instead largely below the lower bound of the indicated range. The
low respiration flows for MIZ, BPL and PHP is caused by the fact that there
are only a few I/O minimal invariants involving these compartments. This is a
misbehaviour of the simple continuous model, that must be somehow overcome.
    Concerning mortality, for BPL it is irrelevant and this is in accordance with
experimental data (see discussion in Section 2). Mortality of PHP is instead
quite high: this is probably due to the fact that some PHP grazers, like fishes
usually occurring in lagoon systems, are not modelled.
    On the whole, the continuous Petri net model realistically reproduces the
main processes of the trophic network considered in the case study. Even if it
based only on the network topology, it allows for deriving some quantitative
information on trophic network flows, which are coherent with results of ex-
perimental measures taken in natural ecosystems. Moreover, the quantitative
validation shows that the model is somehow incomplete, signalling that two fur-
ther predation fluxes, one for MEZ and one for PHP, should be represented in
the model.




               Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
32      P Baldan et al.

 Compartment throughput Literature values                   Model values
    TAP          41      [25] Respiration ≥ 20%             Respiration = 36%
                         [25] 37% ≤ Assimilation ≤ 70%      Assimilation = 73%
                                                            Defecation and Mortality = 27%
      MEZ         28       [12] Respiration ≥ 20%           Respiration = 37%
                           [23, 9] 40% ≤ Assimilation ≤ 80% Assimilation = 39%
                                                            Defecation and Mortality = 61%
      MIZ         37       [12] Respiration ≥ 20%           Respiration = 14%
                           [23, 9] 40% ≤ Assimilation ≤ 80% Assimilation = 78%
                                                            Defecation and Mortality = 22%
      BPL         41       [26, 5] Respiration ≥ 20%        Respiration = 17%
                          Assimilation = Consumption        Assimilation = Consumption
                                                            Mortality = 2,4%
      PHP         49       [32, 3] 10% ≤ Respiration ≤ 30% Respiration = 2%
                          Assimilation = Consumption        Assimilation = Consumption
                                                            Mortality = 22%
      DET         58      not relevant                      not relevant

Table 2. Literature values and measured values for the continuous Petri net model of
the case study.



4.4   Introducing ecological constraints in the Petri net model
In the previous section we underlined some misbehaviours of the simple continu-
ous Petri net model. These are somehow expected since the model is only based
on the topology of the system and it relies on the strong assumption that all
subsystems proceed at the same speed. In order to adjust the model and make
it closer to the real trophic network, one can follow two directions:
 1. Drop the assumption that all the subsystems perform their path exactly once
    in one time unit and “speedup” some subsystems.
 2. Use additional knowledge on the trophic network besides the topology, such
    as the metabolism of the species or their diet, and impose some constraints
    on the rates of the corresponding transitions.
   We next examine more closely these two alternatives and apply them to our
case study.

Speeding-up subsystems. Recall that any linear combination of minimal T-invariants
is a T-invariant and a possible steady state of the network. Let us consider a
generic linear combination of all minimal T-invariants:
                              X
                                      ki Ii , ki ∈ R.
                             Ii ∈B(Nc (T ))

    The simple continuous model Nc (T ) corresponds to a steady state given by
a linear combination of all the minimal T-invariants where all the ki are set to
one. The refined continuous Petri net model, Ncs (T ), is obtained from Nc (T ) by
dropping the assumption that all subsystems have the same speed and setting
the invariants constants ki to values possibly greater than one. In Ncs (T ) the
rate associated with each transition is generalised to:
                                          X
                          rate(t) =                  ki .
                                         Ii ∈B(Ns (T )), t∈Ii




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                     Petri nets for trophic networks           33

                    rate after                       rate after                       rate after
No. Transition rate speedup      No. Transition rate speedup      No. Transition rate speedup
1   CO2 PHP 49          60       10 BPL MIZ 16           17       19 MEZ CO2     10       10
2   input DET 11        14       11 BPL TAP 11           11       20 TAP DET     11       11
3   PHP MIZ 20          22       12 MIZ MIZ 1            1        21 TAP CO2     15       15
4   PHP MEZ 10          10       13 MIZ DET 8            8        22 TAP Harv. 15         15
5   PHP DET 11          11       14 MIZ CO2 5            8        23 DET TAP     11       11
6   PHP TAP 7           7        15 MIZ MEZ 11           11       24 DET Export 7          7
7   DET BPL 41          44       16 MIZ TAP 12           12       25 PHP CO2     1        10
8   BPL CO2 7           9        17 MEZ MEZ 1            1        26 BPL DET     1         1
9   BPL MEZ 6           6        18 MEZ DET 17           17
    Table 3. Rates of the continuous Petri net model before and after speedup.



    The refined continuous Petri net model Ncs (T ) still represents the trophic
network at a steady state and with all compartments balanced, since the input
and output fluxes are balanced in each place for each minimal T-invariant.
    We applied this idea to the case study and speed up the invariants involving
respiration of PHP, BPL and MIZ, since the respiration flows of these compart-
ments do not satisfy the ranges indicated in the literature (see Table 2). The
new rates for the transitions are shown in Table 3.
    Concerning PHP, it receives in input CO2 and partially release it for respira-
tion. The unique I/O T-invariant for this process is {CO2 PHP; PHP CO2}. By
speeding up this invariant to run ten times per unit of time, the respiration flow
for PHP becomes the 16% of its total consumption, within the range indicated
by the literature (see Table 2).
    Concerning BPL, it is fed by the Detritus and part of the ingested food is used
for respiration. The invariants involving transition BPL CO2 are {CO2 PHP;
PHP DET; DET BPL; BPL CO2} and {input DET; DET BPL; BPL CO2}.
By allowing the second invariant to run three times per unit of time, respiration
of BPL become the 20% of its total consumption.
    Concerning MIZ, we could speedup the invariants involving MIZ CO2, namely
{CO2 PHP; PHP DET; DET MIZ; MIZ CO2} and {input DET; DET MIZ;
BPL MIZ}. By allowing them to run three and two times per unit of time, re-
spectively, respiration of BPL becomes the 20% of its total consumption. Assim-
ilation of BPL becomes the 80% of the consumption, still in the range indicated
in Table 2.

Including constraints in the model. The second alternative for improving the
model consists in “embedding” into the continuous Petri net model of the trophic
network some available information regarding the metabolism of the species
or their diet. We work under the simplifying assumption that flux constraints
imposed on the model are linear. This assumption is generally satisfied by the
constraints on metabolic fluxes and on the diet partitions. For our case study,
some metabolic constraints taken from the literature are given in Table 2.
    We define a continuous Petri net model which structurally coincides with
Ns (T ) and whose transition rates satisfy a set of linear inequalities. As in the
previous cases, the transition rates are derived from the “speed” ki of each
minimal invariant, but now we are interested only in invariants that satisfy the




                  Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
34      P Baldan et al.

constraints. These can be obtained as solutions of a system of inequalities
                                       AN · X = 0
                                                                                (1)
                                       C ·X ≥0
where AN is the incidence matrix of Ns (T ). We can consider the minimal such
T-invariants, referred to as the constrained Hilbert basis BC (Ns (T )), so that any
solution of (1) will be a linear combination of elements in BC (Ns (T )).
    A continuous Petri net model Nc (T , C) for the trophic network T satisfying
the constraints C is defined as follows. The underlying Petri net is Ns (T ) and
each transition t is associated with a constant rate:
                   rate(t) = |{Ii : Ii ∈ BC (Ns (T )) ∧ t ∈ Ii }|.
In this way each transition in each constrained invariant Ii in BC (Ns (T )) can
be performed once in one time unit.
    When applied to our case study, this approach produces a linear system of
equalities and inequalities, where the inequalities express the literature knowl-
edge summarised in Table 2. By considering only the inequalities given by the
lower bounds, the constrained Hilbert basis contains 349 minimal invariants. The
induced rate constants for the extended network automatically satisfy the given
ecological constraints.
    The two approaches could be combined, by determining the constrained in-
variants and by setting for them possibly different speeds.
    Simulations on continuous models with constant rates do not provide mean-
ingful information. Some hints on how to further refine the model to do simula-
tion analyses are given in the conclusions.


5    Conclusions and Future Work
In this paper we explored the use of Petri nets for representing and analysing
trophic networks and our preliminary results are encouraging. A trophic network
naturally translates into a structural Petri net model which allows for recovering
classical trophic networks concepts and analyses. The structural model can be
refined into a continuous Petri net model that closely resembles the representa-
tion of the trophic network usually adopted by ecologists, where the system is at
a steady state and the input and output flows are balanced in all the compart-
ments. Despite the fact that the Petri net models proposed are still simplistic
(in particular, the continuous models have constant rates, independent of the
masses), in our case study of the Venice lagoon, the analysis of the continu-
ous Petri net model shows that it realistically reproduces the main ecological
processes. Furthermore, it shows that the continuous Petri net model can be
fruitfully used for an early stage validation of the trophic network under study.
Two refinements of the continuous Petri net are considered: the first is based on
a fine tuning of the speed of the minimal T-invariants, while the second one is
based on a systematic embedding of some ecological knowledge expressed as lin-
ear inequalities into the calculation of the Hilbert basis. This however might have




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
                                                    Petri nets for trophic networks   35

scalability problems, since the constraints increase the size of the Hilbert basis,
and the problem of determining the Hilbert basis is already in EXPSPACE.
    Future work deals with making the Petri net model more realistic and dy-
namic, by adding biomass information on compartments. The knowledge of
biomasses at a steady state can, in fact, be used to derive constants for a con-
tinuous model governed, e.g., by the mass action equation. We believe that in-
troducing rates dependent on biomasses could allow for interesting simulations,
describing, not only the steady state but also the transient behaviour leading
to such state. Additionally, on such model perturbations of the biomasses and
of the speed of the various interactions could be used for performing what-if
analyses.

Acknowledgements. We are grateful to Monika Heiner and Andrea Marin for
many inspiring discussions.


References

 1. 4ti2 team. 4ti2—a software package for algebraic, geometric and combinatorial
    problems on linear spaces. Available at www.4ti2.de.
 2. S. Allesina and R. E. Ulanowicz. Cycling in ecological networks: Finn’s index
    revisited. Computational Biology and Chemistry, 28:227–233, 2004.
 3. R.S.K. Barnes and R.N. Hughes. An introduction to Marine Ecology. Wiley, 1999.
 4. D. Brigolin and R. Pastres. Influence of intra-seasonal variability of metabolic
    rates on the output of a steady-state food web model. In Jordán F. and Jørgensen
    S.E., editors, Models of the Ecological Hierarchy: From Molecules to the Ecosphere,
    Developments in Environmental Modelling, pages 165–179. Elsevier, 2012.
 5. C.A. Carlson, P.A. Del Giorgio, and G.J. Herndl. Microbes and the dissipation
    of energy and respiration: from cells to ecosystems. Oceanography, 20(2):89–100,
    2007.
 6. V. Christensen. Ecopath a software balancing steady-state models and calculating
    network characteristics. Ecological modelling, 61:169–185, 1992.
 7. V. Christensen and C. J. Walters. Ecopath with Ecosim: methods, capabilities and
    limitations. Ecological modelling, 172(2):109–139, 2004.
 8. V. Christensen, C. J. Walters, and D. Pauly. Ecopath with ecosim: a users guide.
    Fisheries Centre, University of British Columbia, Vancouver, 154, 2005.
 9. R.J. Conover. Factors affecting the assimilation of organic matter by zooplankton
    and the question of superfluous feeding. Limnology and Oceanography, 11(3):346–
    354, 2003.
10. J. Desel and J. Esparza. Free Choice Petri Nets. Cambridge University Press,
    2005.
11. J. Esparza and M. Nielsen. Decidability issues for Petri Nets - a survey. Journal
    Inform. Process. Cybernet. EIK, 30(3):143–160, 1994.
12. Vézina A. F. and M. L. Pace. An inverse model analysis of planktonic food
    webs in experimental lakes. Canadian Journal of Fisheries and Aquatic Sciences,
    51(9):2034–2044, 1994.
13. M. Heiner, D. Gilbert, and R. Donaldson. Petri Nets for Systems and Synthetic
    Biology. In Proc. of SFM’08, volume 5016 of LNCS, pages 215–264. Springer, 2008.




                 Proc. BioPPN 2015, a satellite event of PETRI NETS 2015
36      P Baldan et al.

14. M. Heiner, M. Herajy, F. Liu, C. Rohr, and M. Schwarick. Snoopy a unifying
    Petri net tool. In Proc. of Petri Nets 2012, volume 7347 of LNCS, pages 398–407.
    Springer, 2012.
15. M. Heiner, M. Schwarick, and J. Wegener. Charlie an extensible petri net analysis
    tool. In Proc. of Petri Nets 2015, LNCS. Springer, 2015. to appear.
16. R. E. Heymans, J. J. Ulanowicz and C. Bondavalli. Network analysis of the south
    florida everglades graminoid marshes and comparison with nearby cypress ecosys-
    tems. Ecological Modelling, 149:5–23, 2002.
17. F. Jordán, M. Scotti, and C. Priami. Process algebra-based computational tools
    in ecological modelling. Ecological Complexity, 8(4):357–363, 2011.
18. I. Koch and M. Heiner. Petri nets. In B. H. Junker and F. Schreiber, editors,
    Analysis of Biological Networks, Book Series in Bioinformatics, pages 139–179.
    Wiley, 2008.
19. T. Murata. Petri Nets: Properties, Analysis, and Applications. Proceedings of
    IEEE, 77(4):541–580, 1989.
20. E.P. Odum. The strategy of ecosystem development. Science, 164(3877):262–270,
    1969.
21. Petri nets tools. http://www.informatik.uni-hamburg.de/TGI/PetriNets/tools.
22. L. Popova-Zeugmann, M. Heiner, and I. Koch. Timed Petri Nets for modelling and
    analysis of biochemical networks. Fundamenta Informaticae, 67:149–162, 2005.
23. Parsons T. R., Takahashi M., and Hargrave B. Biological oceanographic processes.
    Pergamon Press, 1984.
24. A. Schrijver. Theory of linear and integer programming. Interscience series in
    discrete mathematics and optimization. Wiley, 1999.
25. I. Sorokin and O. Giovanardi. Trophic characteristics of the manila clam. ICES
    Journal of Marine Science, 52(5):853–862, 1995.
26. Reinthaler T., Winter C., and Herndl G. J. Relationship between bacterioplankton
    richness, respiration, and production in the Southern North Sea. Applied and
    environmental microbiology, 5(7):2260–2266, 2005.
27. R. E. Ulanowicz. A phenomenological perspective of ecological development.
    Aquatic Toxicology and Environmental Fate, 9:73–81, 1986.
28. R. E. Ulanowicz. Quantitative methods for ecological network analysis and its
    application to coastal ecosystems. Treatise on Estuarine and Coastal Science,
    9:35–57, 2011.
29. D. van Oevelen, K. van den Meersche, F. R. Meysman, K. Soetaert, J. Middel-
    burg, and A. Vézina. Quantifying Food Web Flows Using Linear Inverse Models.
    Ecosystems, 13:32–45, 2010.
30. M. Vasconcellos, S. Mackinson, K. Sloman, and D. Pauly. The stability of trophic
    mass-balance models of marine ecosystems: a comparative analysis. Ecological
    Modelling, 100:125–134, 1997.
31. A.F. Vézina and T. Platt. Food web dynamics in the ocean. I. Best-estimates of
    flow networks using inverse methods. Marine Ecology - Progress Series, 42:269–287,
    1988.
32. R. G. Wetzel. Limnology. Lake and River Ecosystems. Elsevier, 2001.




                Proc. BioPPN 2015, a satellite event of PETRI NETS 2015