Simulation & Analysis Results

Once the user clicks on ``Run Model'', EcoNet converts the model into a deterministic or a stochastic differential equation system, then finds the numerical solution using the selected method and parameters, and performs various network analyses based on the final state of the system. In this section, we will go over these results for a simple model that we previously presented on page . We use the default simulation method and parameters, so the adaptive step-size method (Runge-Kutta-Fehlberg) was selected with parameters Maximum time=100 and Sensitivity=0.001


Network Diagram

The first result displayed by EcoNet is a network diagram of the model. A network diagram provides important visual information which is lacking in the text-based EcoNet model format. Some modeling software use a graphical model building interface where users drag and drop geometrical shapes representing compartments and then define arrows connecting these compartments. These interfaces provide visual information, however for slightly larger systems, the finished model ends up having too many flow lines crossing each other, creating a messy visual diagram. It becomes harder to build the model, and the final look does not provide much visual information.

A useful diagram should provide insights on system structure and behavior by locating important stocks with many connections in the center, while keeping stocks with fewer connections closer to the edges. Flow lines should be short with little curvature, and should not intersect often. For large systems, tightly coupled compartments should be located close to each other, forming ``sub-systems''. And if possible, the locations of compartments should reflect their trophic level, even in the case of cross-level feeding.

These goals are very hard to achieve for the user who is building the model, and actually requires a sophisticated optimization algorithm. Therefore, we designed EcoNet to create a desirable network graph using Graphviz [2], a professional open source graph visualization software, to determine the optimum placement of stocks and flow lines to achieve the listed objectives. EcoNet diagrams are designed to look as clean as possible, and will work even in the case of large models with over 50 compartments and 100 flows. Trophic-level of compartments will be well-represented regardless of model size.


Time-course plot and data of compartment storage values

The second figure displayed by EcoNet is the time course plot of compartment storage values.

Note that although we set Maximum time=100, the simulation ends at time=30. When the adaptive time-step method is selected, EcoNet terminates the simulation earlier if it detects that the system reaches steady state.

EcoNet also provides access to the time-course data via an html-link located towards the end of the page:

The second link here points to a text file named ``state.dat''. This file contains a matrix of numerical values that EcoNet uses to form the time-course plot. Users can view the contents of the file by simply clicking on the link, or they can save the file by right-clicking and choosing the ``Save Link As...'' option.

This feature enables the user to import the time-course data into other software, like Matlab, Octave or Excel. Therefore users can easily do further analysis, or recreate the same plot using a graphing software of their choice. This is particularly important because it enables users to zoom on the graph, create publication quality figures, or plot only the compartments of interest. Therefore we would like to demonstrate how easy this is, using Matlab or Octave. Octave is a free scientific computing software similar to Matlab. Both are available for Windows, Mac and Unix; and the following procedure is the same for all platforms:

  1. Start Matlab or Octave.
  2. Download the EcoNet data as described above.
  3. Copy the download file ``state.dat'' to Matlab/Octave's current working directory.
  4. Type the following on Matlab/Octave prompt:
    >> s = load('state.dat');
Here ``s'' is a matrix of time-course data, where the columns represent each compartment and rows represent different time values. Users can easily manipulate this matrix in Matlab/Octave environment for further analysis. To recreate the time-course plot, simply type:

>> plot(s);

Users can easily zoom into this plot, add annotations, and save it in various formats. Plotting only specific compartments comes in handy when the EcoNet plot is dominated by compartments with high storage values. To plot only the first compartment, simply type:

>> plot(s(:,1));

A lot more can be done in the Matlab/Octave environment, like creating multiple plots for each compartment. However we will not go into further detail, as documentation and many tutorials are available in print and online.


Model information

The rest of the EcoNet results are expressed in vector or matrix format. They provide information on model structure and function, and present network analysis results. The time-course plot is followed by four vectors that contain the following information:

  1. Inputs to compartments
  2. Outputs from compartments
  3. Initial storage values of compartments
  4. Storage values of all compartments at the end of the simulation


Adjacency Matrix

Next, EcoNet displays the adjacency matrix A, which consists of 0 and 1 entries and indicates if there exists a direct flow between two stocks. In other words:

The definition of A is relatively simple, however it contains important information regarding the model structure. A sparse adjacency matrix is an indication of a loosely connected system. A row with few non-zero entries indicates the existence of a compartment receiving inputs from many other compartments. Similarly, A will contain a column with few non-zero entries if there exists a compartment with outputs to many other compartments. If A has almost all zero entries above the diagonal, then the model has a tree-structure with very little feedback. If there are well-connected smaller subsystems in a large model, A will contain dense non-zero square blocks close to the diagonal.


Flow Coefficient Matrix

The adjacency matrix only contains connectivity information, but does not provide any information on connection strength. Therefore, EcoNet results also include the flow coefficient matrix C, which can be viewed as a ``weighted'' version of A.

C is also called the community matrix, and is defined only if the donor controlled flow type is used throughout the system;

$\displaystyle C_{ij}=\textrm{coefficient of the flow from
 compartment }j\textrm{ to compartment }i$

If no such flow exists, then $ C_{ij}=0$. Note that the coordinates of non-zero entries are the same in matrices A and C. The diagonal entries of C are defined as follows:
$\displaystyle C_{ii}=-(\textrm{sum of the flow coefficients of
all outputs from compartment }i)$

When the diagonals are defined this way, the differential equation system representing the model can be expressed in a compact form:

$\displaystyle \frac{dx}{dt}=Cx+z$
where x is the storage value vector, and z is the input vector (See figure). The explanation of this equation requires some linear algebra knowledge, and we refer the interested user to further reading [4,17].

Flow Matrix

In addition to connectivity information, C also provides information on how strong the connections are. When defining C, we use the flow coefficients as an indication of the connection strength. Another important measure of connection strength is the flow rate between compartments at steady state, and this is exactly what the flow matrix F provides;

As the compartment storage values change in time, the rate of flow between compartments also change accordingly. Flow rates reach a steady state with the storage values. EcoNet computes F using the steady state storage values, flow types and the associated flow coefficients. And if the simulation ends before the system reaches steady state, EcoNet computes the flow matrix based on the final state of the system (See figure). Users can use the time-course plot to see how close the system is to steady-state.

It seems that F and C must be somewhat correlated, but in fact they may differ significantly. Here is an example:

$\displaystyle 0.15=c_{21}$ $\displaystyle <$ $\displaystyle c_{32}=0.50$  
$\displaystyle 4.286=f_{21}$ $\displaystyle >$ $\displaystyle f_{32}=4.202$  

In general, the following relation holds for a donor controlled flow from compartment $ j$ to compartment $ i$:

$\displaystyle
f_{ij}=c_{ij}\, x_{j}$

Here, $ x_{j}$ denotes the storage value of compartment $ j$ at steady state. Note that C is well-defined only if a donor controlled flow type is used throughout the system. F does not have this requirement. If a Lotka-Volterra type flow (donor and recipient controlled) is used from compartment $ j$ to $ i$, then:
$\displaystyle f_{ij}=r\, x_{i}\,
x_{j}$

Here, $ r$ represents the donor and recipient controlled flow coefficient from compartment $ j$ to compartment $ i$.

Network Analysis

The flow matrix C represents the connection strength between compartments at steady-state. However, even if two compartments are not directly connected, they can still affect each other through indirect connections involving other compartments. For example, there are no direct flows between compartments A and D in the next figure below. However any change in compartment A will eventually affect compartment D. In this regard, all the previous matrices A, C and F fail to represent the true connectivity relation among compartments. In a way, even the model diagram below can be viewed as misleading because it only represents the direct flows. Particularly in well-connected systems, there is often a greater contribution from indirect flows than from direct. This property is called the dominance of indirect effects [4,7,17].

EcoNet uses Network Environ Analysis (NEA) [4,17] to quantify the actual relation among compartments, environmental inputs and outputs. Unlike most analysis methods, NEA treats the system as a whole and provides an elegant way to quantify the effects of all indirect flows in the system. NEA is not a one-step analysis, but a series of algebraic operations resulting in scalar and matrix values representing various system-wide properties. EcoNet currently includes storage (S), through flow (N) and utility (U) analyses.

We should note that NEA is valid only when the system is close to steady state. EcoNet displays NEA results based on the final state of the system. To get accurate results, users should use the time-course plot to make sure that the system is close to steady state at the end of the simulation.


Storage Analysis

Storage analysis matrix S represents the relation between input flow rates and compartment storage values. In the figure above, only Detritus receives a direct environmental input. This input is partially transferred to Microbiota and Meiofauna through indirect flows. Sij represents how much of the storage value of compartment $ i$ is contributed by a unit of direct environmental input to compartment $ j$.

Let's consider the first row of the storage matrix S:

$\displaystyle s_{11}=2.857\quad
s_{12}=s_{13}=0$

There are no environmental inputs into Microbiota and Meiofauna, therefore the storage value of Detritus depends only on its own environmental input ( S12=S13=0). The environmental input rate to Detritus is 10 units/time, and the steady-state storage value of Detritus is 28.57 units. Therefore, for 1 unit environmental input to Detritus, contributes to S11=2.857 units of storage value in Detritus.

Similarly, the storage value of Microbiota (8.4 units) is all contributed by the environmental input to Detritus; therefore S21=8.4/10=0.84. Although the environmental input to Microbiota is 0 units/time in our model, S22=1.96 means that each unit of direct environmental input to Microbiota would contribute to S22=1.96 units of storage value. The fact that S23=0 informs us that an environmental input to Meiofauna will never affect the storage value of Microbiota.

We should note that if there were an additional flow from Meiofauna to Detritus, there would be no zero entries in S, as any environmental input would cycle through all compartments, contributing to all storage values.

We have not discussed how to compute S, and we refer the interested user to references [17,4]. In mathematical terms, S is a linear mapping from environmental inputs to compartment storage values:

$\displaystyle S:\bar{z}\longmapsto\bar{x}\,\qquad\bar{x}=S\,\bar{z}$

Here, $ \bar{x}$ represents the vector of all steady-state storage values, and $ \bar{z}$ represents the vector of direct environmental inputs to each compartment.

Through flow Analysis

The through flow value of compartment $ i$ is defined as the total amount of mass or energy units received by (or lost from) that compartment per unit time at steady state:

$\displaystyle T_{i}=\sum_{j}f_{ij}$

Through flow analysis is conceptually the same as the storage analysis, the only change being the use of through flow values instead of storage values. Nij represents how much of the environmental input to compartment $ j$ is received by compartment $ i$. Note that this input may reach to compartment $ i$ through indirect flows that involve many other compartments, and Nij accounts for all such possible paths.

Let's consider the first column of matrix N given in the figure above. Obviously 100% of the environmental input to Detritus is received by Detritus, therefore $ n_{11}=1$. Coefficient $ n_{21}=0.428$ means that 42.8% of the environmental input to Detritus is received by Microbiota, then 57.2% flows to Meiofauna. Coefficient $ n_{31}=0.991$ represents the fact that Meiofauna eventually receives 99.1% of the environmental input (to Detritus), through Microbiota and directly from Detritus. Then we can also conclude that 0.9% of the environmental input returns back to the environment through dissipation at Microbiota.

To compare the effect of direct and indirect paths from an input to a compartment, EcoNet displays another matrix B, defined as follows:

$\displaystyle b_{ij}=f_{ij}/f_{jj}$
B can be viewed as a normalized F matrix; where each entry Fij is divided by the diagonal element of the row to which it belongs. While Fij represents the actual flow rate from $ j$ to $ i$ at steady state, Bij represents what ratio of the throughflow of $ j$ is received by $ i$. Note that both N and B contain normalized values representing how energy or mass units are distributed among compartments. However, N accounts for all possible direct or indirect flows between compartments, while B, by definition, only represents direct flows among compartments.

Comparing N and B matrices (previous two figures), we see that entries of both matrices match except for:

$\displaystyle 0.991=n_{31}\neq b_{31}=0.571$

This is expected for a simple three compartment model where there is one indirect flow. There are two paths from Compartment 1 (Detritus) to Compartment 3 (Meiofauna):
$\displaystyle \textrm{Direct flow: \,}$   $\displaystyle Detritus\rightarrow Meiofauna$  
$\displaystyle \textrm{Indirect flow: \,}$   $\displaystyle Detritus\rightarrow Microbiota\rightarrow Meiofauna$  

Both are accounted for in $ n_{31}=0.991$, while $ b_{31}=0.571$ only represents the direct flow. Then we can conclude that $ \frac{0.991-0.571}{0.991}\times100=42\%$ of the interaction between Detritus to Meiofauna occurs over the indirect connection.

In mathematical terms, N is a linear mapping from direct environmental inputs to through flow values:

$\displaystyle N:\bar{z}\longmapsto\bar{T}\,,\qquad\bar{T}=N\,\bar{z}$

Here $ \bar{T}$ represents a vector of through flow values. The computation of N is very similar to S, and we refer the interested user to references [4,17].

Utility Analysis

Utility analysis is a rather involved part of NEA. It is a powerful method that provides ``relations'' among compartments, again including indirect effects. In the following example

$\displaystyle *\longrightarrow tree\longrightarrow deer\longrightarrow wolf\longrightarrow*$

deer and wolf have a $ (-,+)$ relationship, same as the tree-deer relationship. Although not connected with a direct flow, the tree and the wolf have a mutualistic $ (+,+)$ relationship. Figuring out such relations is straightforward for simple models, but extremely difficult when models involve feedback loops, cycling or cross-level feeding. Utility analysis provides this relation among all compartments regardless of model complexity.

The second matrix above represents the relations among compartments in $ +/-$ format, while the first matrix U provides the relation strength as well. The three compartment model we provide here is too simple to present the strength of utility analysis. We postpone this discussion to the next section where we analyze John M. Teal's Georgia salt marsh model. For further details on utility analysis, and NEA in general, we refer the reader to [4,17,7,16].


Next: An example: Georgia salt marsh energy flow study using EcoNet


DHTML Menu By Milonic JavaScript