# Simulation & Analysis Results

Once the user clicks on ``Run Model'', EcoNet converts the model into a deterministic or a stochastic differential equation system, then solves the equation using the selected method and parameters, and performs various network analyses based on the final state of the system. Therefore, if the system has not reached near steady state, some analysis results will not be valid.

Performance of EcoNet depends on the number of other users using EcoNet with you. Therefore EcoNet informs you about its current load as follows:

- LOW: More cores are available than number of users. There is no performance loss.
- MEDIUM: Some users are sharing a core. Simulations may run a little slower for some users (not all).
- HIGH: All users are sharing a core. Simulations will run a little slower for all users.

You will almost always see "LOW" when running your simulations. Rarely you might see "MEDIUM", which should not be of any concern. You can continue to work even if you see "HIGH". However, be advised that the simulations may take a little longer than usual.

In the following section, we will go over the simulation and
analysis results for a simple
model we presented previously. We use the default simulation method
and parameters, so the adaptive step-size method
(Runge-Kutta-Fehlberg) was selected with parameters
*Total time*=100 and *Sensitivity*=0.001

## Network Diagram

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.

This diagram is in GIF format. It is perfect for web viewing, but less than desirable for publication. You can click on this figure to download the same figure in EPS format, which is a vector based format. This file is publication quality, and can be used in books or manuscripts. You can generate JPEG or GIF files of any resolution from the EPS file using free or commercial software (Adobe, Gimp, etc.).

## Time-course plot and data of compartment storage values

The second figure displayed by EcoNet is the time course plot of compartment storage values. This figure is in GIF format. It is perfect for web viewing, but less than desirable for publication. You can click on this figure to download the same figure in EPS format, which is a vector based format. This file is publication quality, and can be used in books or manuscripts. You can generate JPEG or GIF files of any resolution from the EPS file using free or commercial software (Adobe, Gimp, etc.).

EcoNet also provides access to the time-course data via a link below the figure, which 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 "

__Data__for time-course figure" (see figure above), 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, Open Office or MS Office. 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, 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 Linux operating systems; and the following procedure is the same for all platforms:

- Start Matlab or Octave.
- Download the EcoNet data as described above.
- Copy the download file ``state.dat'' to Matlab/Octave's current working directory.
- Type the following on Matlab/Octave prompt:

>> s = load('state.dat');

>> 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.

## Compartmental Properties

The rest of the EcoNet results are expressed in vector, scalar, or matrix format. They provide information on model structure and function, and present network analysis results. The time-course figure is followed by a table that contains the following information:

**Initial storage:**Compartment storage values at the beginning of the simulation (time=0), as defined by the model.**Final storage:**Compartment storage values at the end of the simulation (time=*Total time*). We represent this value with x_{i}for compartment i**Environmental Input:**Environmental input flow rate to that compartment at the end of the simulation. We represent this value with z_{i}for compartment i**Environmental Output:**Environmental output flow rate from that compartment at the end of the simulation. We represent this value with y_{i}for compartment i**Throughflow-in:**Sum of input flow rates, both enviornmental and inter-compartmental, into that compartment at the end of the simulation. This value should be very close to*Throughflow-out*if the system is close to steady state by the end of the simulation. We represent this value with T_{i}^{in}for compartment i. For a model at steady-state, we define T_{i}= T_{i}^{out}= T_{i}^{in}.**Throughflow-out:**Sum of output flow rates, both enviornmental and inter-compartmental, from that compartment at the end of the simulation. This value should be very close to*Throughflow-in*if the system is close to steady state by the end of the simulation. We represent this value with T_{i}^{out}for compartment i. For a model at steady-state, we define T_{i}= T_{i}^{out}= T_{i}^{in}.**Residence Time:**Average residence time of flow material at that compartment at the end of simulation. It is computed as the ratio of compartment*Storage value*to*Throughflow-out*(x_{i}/ T_{i}).

## System-wide properties

Some of these indexes depend on the analysis matrices defined below.

**Link Density:**Number of intercompartmental links (d) per compartment: d/(Number of compartments)**Connectance:**Ratio of the number of actual inter-compartmental links (d) to the number of possible intercompartmental links: d/(Number of compartments)^{2}**Total System Throughflow:**Also called Total System Throughput, it is the sum of throughflows of all compartments: TST = T_{1}+T_{1}+...+T_{n}.**Finn's Cycling Index:**Measures the amount of cycling in the system by computing the fraction of total system throughlow that is recycled [4, 22].**Indirect Effects Index:**Measures the amount of flow that occurs over indirect connections versus direct connections [21]. When the ratio is greater than one, indirect flows are greater than direct flows.**Ascendency:**It quantifies both the level of system activity and the degree of organization (constraint) with which the material is being processed in ecosystems [23, 24 25].**Aggradation Index:**Measures the average path length. In other words, it is the average number of compartments a unit flow quantity (eg. an N atom, unit biomass, energy quanta, etc.) passes through before exiting the system [25]: TST/(z_{1}+z_{2}+...+z_{n}).**Synergism Index:**Based on utility analysis, it provides a system-wide index for pairwise compartment relations. Values larger than 1 indicate a shift toward positive interactions (mutualism). It is computed as the ratio of sum of positive entries over the sum of negative entries in the utility analysis matrix U [4, 3].**Mutualism Index:**Similar to synergism index, mutualism index provides a system-wide index for pairwise compartment relations. Values larger than 1 indicate a shift toward positive interactions (mutualism). It is computed as the ratio of number of positive entries over the number of negative entries in the mutual relations matrix [4, 3].**Homogenization Index:**Quantifies the action of the network making the flow distribution more uniform. Higher values indicate that resources become well mixed by cycling in the network, giving rise to a more homogeneous distribution of flow [4].

## Adjacency Matrix

Adjacency matrix A 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.

## Stoichiometric Matrix

Entries of the stoichiometric matrix can be 0, -1 and 1.
The entry *(i,j)* indicates how the storage value of compartment
*i* change when flow *j* occurs.

Note that the Adjacency matrix contains only inter-compartmental relationships. Stoichiometric matrix contains the flows between the system and the enviornment as well. Therefore the stoichiometric matrix alone is enough to define network topology.

Stoichometric matrix is named as "state shift matrix" in [10], where you can find a compact form of the differential equation governing system dynamics in terms of the stoichiometric matrix and the "propensity vector" (flow kinetics).

## Flow Matrix

In addition to connectivity information, *F* also provides
information on how strong the connections are. 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. *F* shows the flow rate between compartments at
the end of the simulation. Assuming that the model reaches steady
state at the end of the simulation:

## Ecological Network Analysis

The flow matrix *F* 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, 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,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. First version of EcoNet
performed *storage* (*S*), *throughflow* (*N*) and
*utility* (*U*) analyses. EcoNet 2.0 added many new analysis
results.

Some of the analysis results are valid only when the system is close to steady state. EcoNet displays results based on the final state of the system. To get accurate results, users should use the time-course plot (and/or throughflow values) to make sure that the system is close to steady state by the end of the simulation.

## Throughflow Analysis

The definition of throughflow is given compartmental properties. N_{ij} 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 N_{ij} 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 *G*, defined as
follows:

_{ij}= F

_{ij}/ T

_{j}

*G*can be viewed as a normalized

*F*matrix; where each entry

*F*is divided by the diagonal element of the row to which it belongs. While

_{ij}*F*represents the actual flow rate from j to i at steady state,

_{ij}*G*represents what ratio of the throughflow of j received by i. Note that both

_{ij}*N*and

*G*contain normalized values representing how energy (or biomass, nutrients, C, N, P, etc.) is distributed among compartments. However,

*N*accounts for all possible direct and indirect flows among compartments, while

*G*, by definition, only represents direct flows among compartments.

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

_{31}= G

_{31}= 0.571

Direct Flow: | Detritus -> Meiofauna |

Indirect Flow: | Detritus -> Microbiota -> Meiofauna |

Both are accounted for in N_{31} =
0.991, while G_{31} = 0.571
only represents the direct flow. Then we can conclude that 100x(0.991-0.571)/0.991 = 42% of the interaction
between Detritus to Meiofauna occurs over the indirect connection.

EcoNet provides two more matrices in its "Extended Results": G' and N', titled as "input oriented". Similar to G, G' is defined as follows:

_{ij}= F

_{ij}/ T

_{i}

*G'*can be viewed as a normalized

*F*matrix; where each entry

*F*is divided by the diagonal element of the column to which it belongs. N'

_{ij}_{ij}represents the amount of throughflow generated at compartment j for a unit output from compartment i.

*N*and

*N*are computed as follows:

^{-1}

N' = (I-G')

^{-1}

## 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. S

_{ij}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*:

_{11}= 2.857 , 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 ( *S _{12}=S_{13}=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

*S*of storage value in Detritus.

_{11}=2.857 unitsSimilarly, the storage value of Microbiota (*8.4 units*) is
all contributed by the environmental input to Detritus; therefore
*S _{21}=8.4/10=0.84*. Although the environmental input
to Microbiota is

*0 units/time*in our model,

*S*means that each unit of direct environmental input to Microbiota would contribute to

_{22}=1.96*S*units of storage value. The fact that

_{22}=1.96*S*informs us that an environmental input to Meiofauna will never affect the storage value of Microbiota.

_{23}=0We 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.

EcoNet provides "input oriented" storage analysis matrix S' in
"extended results".S'_{ij} represents
how much of the storage has to be generated at compartment j for a unit output from compartment i. *S* and *S'*
are computed as follows:

^{-1}

S' = -C'

^{-1}

_{ij}= F

_{ij}/ x

_{j}

C

_{ii}= T

_{i}/ x

_{i}

C'

_{ij}= F

_{ij}/ x

_{i}

C

_{ii}= T

_{i}/ x

_{i}

*S*, and we refer the interested user to references [17,4].

## Utility Analysis

Utility analysis quantifies "mututal relations" among compartments, again including indirect effects. Here's a simple example:

*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 quantitative 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.
*S* and *S'* are computed as follows:

^{-1}

_{ij}= (F

_{ij}-F

_{ji}) / T

_{i}

## Ecological Control Analysis

Coming soon.## Eco-Exergy Calculator

Eco-exergy is a thermodynamic indicator for ecosystems. It measures a system's deviation from chemical equilibrium. The definition of eco-exergy involves Kullback’s information measure. Therefore one needs the "β-values" for the compartments used in their model. Once the user enters these values in the provided spaces, eco-exergy will be computed instantaneously and displayed on the last line. A table for β-values for commonly compartments and more information on eco-exergy is available in the references [26, 27, 25].## Next: An example: Georgia salt marsh energy flow study using EcoNet

DHTML Menu By Milonic JavaScript