Jeffrey M. Dambacher, Hiram W. Li, and Philippe A. Rossignol. 2002. Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology 83:1372-1385.


Supplement

Supplement 1, Version 3: Maple program commands for qualitative and symbolic analysis of the community matrix; for Maple V release 5 and later versions.
Ecological Archives E083-022-S1-R2.
Submitted 25 August 2005; Published 7 September 2005
.

Authors
File list (available for downloading)
Description

 

Supplement 1, Version 2: Community matrix (ii), a Maple 8 program for qualitative and symbolic analysis of the community matrix, version 2.0; and PowerPlay (ii), a digraph editor for creation of qualitatively specified community matrices.
Ecological Archives E083-022-S1-R1.
Submitted 26 May 2003; Published 10 June 2003
.

Authors
File list (available for downloading)
Description

 

Supplement 1, Version 1: Maple V program commands for qualitative and symbolic analysis of the community matrix, version 1.0.
Ecological Archives
E083-022-S1
.

Authors
File list (available for downloading)
Description

Copyright


Author(s) (Supplement 1, Version 3)

Jeffrey M. Dambacher
CSIRO Marine Research
GPO Box 1538
Hobart, Tasmania 7001 Australia
Jeffrey.Dambacher@csiro.au

Hiram W. Li
Oregon Cooperative Fish and Wildlife Research Unit (USGS)
Department of Fisheries and Wildlife
Room 104, Nash Hall, Oregon State University

Corvallis, Oregon 97331 USA
Hiram.Li@oregonstate.edu

Philippe A. Rossignol
Department of Fisheries and Wildlife
Room 104, Nash Hall, Oregon State University
Corvallis, Oregon 97331 USA
Phil.Rossignol@oregonstate.edu


File list (Supplement 1, Version 3)

Community Matrix(iii).mws

PowerPlay(ii) install.zip

PowerPlay(ii) install.exe

Description (Supplement 1, Version 3)

1) Community Matrix (iii).mws.—Maple program commands for qualitative and symbolic analysis of the community matrix; for Maple V release 5 and later versions. This revision includes code to calculate qualitative analyses of change in life expectancy described in Dambacher et al. 2005, and as well as metrics for stability described in Dambacher et al. 2003a which was added in Revision 1 of this supplement.

Run program by hitting enter key while curser is on the first line of active code (i.e., active code is in red coloured text), and doing the same after curser advances to new sections of code. The first section of program code requires input to specify elements of the community matrix by entries of 1, -1, or 0. The program has default input for the community matrix of model c (Fig. 7) in Dambacher et al. (2002). Use of PowerPlay, described below, greatly facilitates the creation and input of community matrices to this Maple program, especially for large and complex systems, thus reducing transcription errors common to matrix editing. In the Qualitative Analysis section the program first assesses potential for Lyapunov stability by qualitative metrics corresponding to Hurwitz criteria i and ii, as described in Dambacher et al. 2003a. Criteria i assesses feedback (F0. . . Fn) at each level of the system through the proportion of feedback cycles that are of like sign (through weighted feedback wFn). Criteria ii assesses the relative weight of the negative and positive terms in the n-1 Hurwitz determinant in relation to a model-c type system (through n-1 weighted determinant and its ratio to that of a model-c type system; note that assessment of criteria (ii) is limited to systems of size n = 2 to 25), as calculation of “permanent(H)” in line 37 below is, for larger systems, beyond current computational limits. Models are classified as being either “Class I” or “Class II”, and in this revision there is now a partial analysis of stability metrics for large (n>25) systems that bypasses calculation of the n-1weighted determinant in line 37 below. Next the program assesses the response of the system to input through the adjoint and weighted-predictions matrices, as described in Dambacher et al. (2002) and (2003b), and also change in life-expectancy, as described in Dambacher et al. (2005). These same analyses are assessed symbolically in the Symbolic Analysis section, and output can be obtained for whole matrices or series, and for selected matrix or series elements, as well as selected columns of matrices.

Description of program code.

1.             Community Matrix (iii).mws: qualitative and symbolic analysis of community matrix; Revision 2 of Ecological Archives E083-022-S1, Supplement 1 to Ecology 83:1372-1385. To remove input code while printing, select "View/Hide Content/Hide Input" from program menu. Matrix Input: Input n number of species or system variables, and °Aij community matrix elements as 0, 1, or -1.

Program header and instructions.

2.             with(linalg):

Installs linear algebra package.

3.             z:=proc(x,y)if y=0 then 1 else x/y fi end:

Defines division procedure used below, where division by zero equals one.

4.             t:=proc(x,y)x*y end:

Defines multiplication procedure used below.

5.             b:=proc(x,y)x+y end:

Defines addition procedure used below.

6.             "Qualitatively Specified Community Matrix (°A)";

Section header.

7.             n:=5:

Input: defines n number of species.

8.             A:=array(1..n,1..n,[[-1,1,0,0,0],[-1,-1,1,0,0],[0,-1,-1,1,0],[0,0,-1,-1,1],[0,0,0,-1,-1]]);

Input: defines community matrix elements.

9.             Qualitative Stability Analysis

"Criterion i";

Section headers.

10.         p:=charpoly(A,l):

Defines characteristic polynomial with lambda as root.

11.         Pc:=[seq(-1*coeff(p,l,n-i),i=0..n)]:

Defines polynomial coefficients in order of a0, a1, a2, a3,…an, with a0 = -1.

12.         poly_coef_F0_to_Fn=Pc;

Prints polynomial coefficients.

13.         P:=permanent(abs(A)+band([l],n)):

Defines absolute polynomial with lambda as root.

14.         aPc:=[seq(coeff(P,l,n-i),i=0..n)]:

Defines coefficients of absolute polynomial in order of a0, a1, a2, a3,…an.

15.         positive_feedback=vector(n+1,(j)->(aPc[j]+Pc[j])/2);

Prints number of positive feedback cycles at each system level F0 to Fn.

16.         negative_feedback=vector(n+1,(j)->-(aPc[j]-(aPc[j]+Pc[j])/2));

Prints number of negative feedback cycles at each system level F0 to Fn.

17.         absolute_feedback=vector(n+1,(j)->(aPc[j]));

Prints absolute number of feedback cycles at each system level F0 to Fn.

18.         wFn:=vector(n+1,(j)->z(Pc[j],aPc[j])):

Using procedure z, defines weighted feedback at each system level F0 to Fn.

19.         evalf(wFn=eval(wFn),2);

Prints weighted feedback at each system level F0 to Fn.

20.         k:=0:

Initially defines k = 0 for below logical statement.

21.         for i from 1 to n+1 do if aPc[i]=0 then k:=k+1 else fi od:

Defines k not equal to 0 if there is absence of feedback at any level in the system.

22.         printlevel:=0:

Sets minimal print level.

23.         if k>0 then print("Note: absence of feedback at one or more levels in system.")fi;

Prints note on a stability property.

24.         m:=max(seq(wFn[j],j=1..n+1)):

Defines maximum weighted feedback (max wFn).

25.         v:=0:

Initially defines v=0 for below logical statement.

26.         for j from 1 to n do if wFn[j]=m then v:=v+1 else fi od;

Defines v not equal to zero if max wFn not at highest system level only.

27.         "Criterion ii";

Section header.

28.         h:=matrix(n-1,n-1,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -Pc[2*j-i+1]else 0 fi):

Defines n-1 Hurwitz matrix.

29.         if n>25 then print("System too large (n>25) to assess n-1 weighted determinant, however, n-1 Hurwitz determinant");

Prints result header for systems of n<26.

30.         det_h:=det(h):

Calculates n-1 Hurwitz determinant.

31.         print(D[n-1]=evalf(det_h,2));

Prints n-1 Hurwitz determinant for n>26 sytstem.

32.         if det_h>0 and (m<>-1) and (v=0) or det_h>0 and m=-1 then print("is positive and max(wF) at highest level, though undetermined if Class I or II Model, as not known if weighted determinant is less or greater than Model C's.");

Prints result of logical statement regarding Class I or II systems.

33.         elif det_h<=0 then print("is non-positive, thus a Class II Model.");

Prints result of logical statement regarding Class II systems.

34.         elif det_h>0 and (m<>-1) and (v<>0) then print("is positive, but max(wF) not at highest level, thus a Class II Model.")fi;

Prints result of logical statement regarding Class II systems.

35.         else H:=matrix(n-1,n-1,(i,j)->if 2*j-i<=n and 2*j-i>=0 then aPc[2*j-i+1]else 0 fi):

Defines n-1 Hurwitz matrix with absolute number of terms as matrix entries.

36.         C:=array(2..25,[1,3,11,107,1531,54249,3073177,412107573,.92642e11,.47847e14,.42733e17,.85868e20,.30498e24,.23997e28,.32396e32,.10496e37,.59083e41,.72127e46,.16176e52,.78077e57,.69792e63,.13343e70,.47555e76,.36057e83]):

Defines vector of 1/n-1 weighted determinants of model c type systems for sizes n=2-25.

37.         wH:=(det(h)/permanent(H)):

Defines n-1 weighted determinant.

38.         print(wD[n-1]=evalf(wH,2));

Prints n-1 weighted determinant to two significant figures.

39.         print(ratio_to_model_C=evalf(wH*C[n],2));

Prints ratio of n-1 weighted determinant to that of model c type system.

40.         if(m<>-1)and(v=0)and(wH>=1/C[n])or(m=-1)and(wH>=1/C[n])then print("Class I Model")else print("Class II Model")fi fi;

Prints result of logical statement that defines systems of n<26 as either Class I or Class II.

41.         Qualitative Press Perturbation Analysis

"Change in Abundance from Positive Input";

"From Increased Birth or Immigration or from Decreased Death or Emigration";

"adjoint (-A)";

Section and matrix headers.

42.         adj(-A);

Calculates and prints adjoint matrix.

43.         "absolute feedback (T)";

Matrix header.

44.         T:=matrix(n,n,(i,j)->permanent(minor(abs(A),j,i))):

Calculates absolute feedback matrix.

45.         evalm(T);

Prints absolute feedback matrix.

46.         "weighted predictions (W)";

Matrix header.

47.         evalf(matrix(n,n,(i,j)->abs(z(adj(A)[i,j],T[i,j]))),2);

Calculates and prints weighted predictions matrix using vectorized division with procedure z.

48.         "Change in Life Expectancy (E) from Positive Input";

Section header.

49.         SA:=matrix(n,n,(i,j)->t((A)[i,j],(a)[i,j])):

Symbolically defines community matrix.

50.         bR:=matrix(n,n,(i,j)->if((A)[i,j]>0) then 1 else 0 fi):

Defines birth rates matrix.

51.         dR:=matrix(n,n,(i,j)->if((A)[i,j]<0) then 1 else 0fi):

Defines death rates matrix.

52.         SbR:=matrix(n,n,(i,j)->t((bR)[i,j],(a)[i,j])):

Defines birth rates matrix symbolically.

53.         SdR:=matrix(n,n,(i,j)->t((dR)[i,j],(a)[i,j])):

Defines death rates matrix symbolically.

54.         s_adj:=adj(-SA):

Defines adjoint matrix symbolically.

55.         s_dE_b:=simplify(evalm(-1*(SdR&*adj(-SA)))):

Defines delta E_birth symbolically.

56.         s_dE_d:=simplify(evalm(-1*(SbR&*adj(-SA)))):

Defines delta E_death symbolically.

57.         aEb:=matrix(n,n,(i,j)->numboccur(expand(s_dE_b[i,j]),(a))/n):

Evaluates absolute number of feedback cycles in delta E_birth matrix.

58.         aEd:=matrix(n,n,(i,j)->numboccur(expand(s_dE_d[i,j]),(a))/n):

Evaluates absolute number of feedback cycles in delta E_death matrix.

59.         DEb:=evalm(-1*(dR&*adj(-A))):

Defines delta E_birth matrix.

60.         "Increased Rate of Birth or Immigration";

"delta E";

Section and results headers.

61.         evalm(DEb);

Prints delta E_birth matrix.

62.         "absolute feedback";

Results header.

63.         evalm(aEb);

Prints matrix of absolute feedback for delta E_birth matrix.

64.         "weighted delta E";

Results header.

65.         evalf(matrix(n,n,(i,j)->abs(z(DEb[i,j],aEb[i,j]))),2);

Calculates and prints weighted predictions matrix for delta E_birth matrix.

66.         DEd:=evalm(-1*(bR&*adj(-A))):

Defines delta E_death matrix.

67.         "Decreased Rate of Death or Emigration";

"delta E";

Section and results headers.

68.         evalm(DEd);

Prints delta E_death matrix.

69.         "absolute feedback";

Results header.

70.         evalm(aEd);

Prints matrix of absolute feedback for delta E_death matrix.

71.         "weighted delta E";

Results header.

72.         evalf(matrix(n,n,(i,j)->abs(z(DEd[i,j],aEd[i,j]))),2);

Calculates and prints weighted predictions matrix for delta E_birth matrix.

73.         Symbolic Analyses

"Whole Matrix or Series Output":

"Symbolically Specified Community Matrix";

Section and results headers.

74.         printlevel:=1:

Sets normal print level.

75.         SA:=matrix(n,n,(i,j)->t((A)[i,j],(a)[i,j])):

Defines  symbolic community matrix.

76.         evalm(SA);

Prints symbolic community matrix.

77.         Sp:=charpoly(SA,l):

Defines characteristic polynomial symbolically.

78.         SPc:=[seq(-1*coeff(Sp,l,n-i),i=0..n)]:

Symbolically defines polynomial coefficients.

79.         s_fb:=[seq(-1*coeff(charpoly(SA,l),l,n-i-1),i=0..n-1)]:

Symbolically defines polynomial coefficients without a0.

80.         "system feedback";

for i from 1 to n+1 do F[n+1-i];

Results header.

81.         SPc[n+2-i] od;

Prints symbolic feedback for each level in system.

82.         "Hurwitz determinants";

Results header.

83.         printlevel:=1:

Sets normal print level.

84.         for k from 1 to n do D[n+1-k];

Results header for each Hurwitz determinant.

85.         det(matrix(n+1-k,n+1-k,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -SPc[2*j-i+1] else 0 fi)) od;

Prints each Hurwitz determinant Dn to D1 symbolically.

86.         "adjoint (-A)";

Matrix header.

87.         evalm(adj(-SA));

Prints symbolic adjoint matrix.

88.         "delta E from increased birth rate";

Matrix header.

89.         evalm(s_dE_b);

Prints delta E_birth matrix.

90.         "delta E from decreased death rate";

Matrix header.

91.         evalm(s_dE_d);

Prints delta E_death matrix.

92.         Selected Analyses

"Note: for selected output enter x in 'k:=x' below to select symbolic results for kth level of system feedback or kth Hurwitz determinant":

Section header and input instructions.

93.         printlevel:=1:

Sets normal print level.

94.         k:=x:

Input to define k for selected output below.

95.         "System feedback at level";

F[k];

Results header.

96.         s_fb[k];

Prints selected (kth) level of feedback symbolically.

97.         Hurwitz_determinant_D[k];

Results header.

98.         det(matrix(k,k,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -SPc[2*j-i+1] else 0 fi));

Prints selected (kth) Hurwitz determinant.

99.         "All Qualitatively Specified Hurwitz Determinants";

Results header.

100.     printlevel:=1:

Sets normal print level.

101.     for k from 1 to n do D[n+1-k];

Results header.

102.     det(matrix(n+1-k,n+1-k,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -Pc[2*j-i+1] else 0 fi)) od;

Prints all n Hurwitz determinants.

103.     "Note: for selected matrix elements enter x and y below to select symbolic detail for ith and jth element of given matrices":

Input instructions.

104.     printlevel:=1:

Sets normal print level.

105.     i:=x:

Defines i for selected output below.

106.     j:=y:

Defines j for selected output below.

107.     adjoint[i,j];

Matrix header.

108.     adj(-SA)[i,j];

Prints selected ijth element of adjoint matrix symbolically.

109.     dE_birth[i,j];

Matrix header.

110.     s_dE_b[i,j];

Prints selected ijth element of delta_E_birth matrix symbolically.

111.     dE_death[i,j];

Matrix header.

112.     s_dE_d[i,j];

Prints selected ijth element of delta_E_death matrix symbolically.

113.     "Note: for selected matrix columns enter y below to select symbolic detail for jth column of given matrices":

Input instructions.

114.     printlevel:=1:

Sets normal print level.

115.     j:=y:

Defines j for selected column output below.

116.     (adjoint_column(j));

Column header.

117.     Vector[column](n,Vector(n,col(adj(-SA),j)));

Prints selected column of adjoint matrix.

118.     (delta_E_birth_column(j));

Column header.

119.     Vector[column](n,Vector(n,col(s_dE_b,j)));

Prints selected column of delta E_birth matrix.

120.     (delta_E_death_column(j));

Column header.

121.     Vector[column](n,Vector(n,col(s_dE_d,j)));

Prints selected column of delta E_death matrix.

2) PowerPlay(ii) install.exe—.PowerPlay (version 2.0) is a digraph editor created by Oregon State University students Peter Westfahl, Zach Heath, and Clint Woodrow in 2002, for the purpose of drawing signed digraphs and converting them to matrix output used in the above described Maple program.

After installation follow directions provided in the Help menu to create, save, and recall signed digraphs, then go to Data Tools and Show Matrix View and find the line of text with general format of “n:= x: A:=array (1..n, 1..n, [[ … ]]);”. With computer mouse, double click on this line, then select and copy it to computer’s clip board, and then paste it into the ‘Matrix Input’ section of the Maple program, being sure to first eliminate or to paste over the example code. You may find that you have to insert code in front of the semicolon at the end of the line to make the code active (active code is coloured red, inactive code is black).

Literature cited

Dambacher, J. M., H. W. Li, and P. A. Rossignol. 2002. Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology 83:1372–1385.

Dambacher, J. M., H.-K. Luh, H. W. Li, and P. A. Rossignol. 2003a. Qualitative stability and ambiguity in model ecosystems. American Naturalist 161:1876–888.

Dambacher, J. M., H. W. Li, and P. A. Rossignol. 2003b. Qualitative predictions in model ecosystems. Ecological Modelling 161:79–93.

Dambacher, J. M., R. Levins, and P. A. Rossignol. 2005. Life expectancy change in perturbed communities: derivation and qualitative analysis. Mathematical Biosciences 197:1–14.


Author(s) (Supplement 1, Version 2)

Jeffrey M. Dambacher
CSIRO Marine Research
GPO Box 1538
Hobart, Tasmania 7001 Australia
Jeffrey.Dambacher@csiro.au

Hiram W. Li
Oregon Cooperative Fish and Wildlife Research Unit (USGS)
Department of Fisheries and Wildlife
Room 104, Nash Hall, Oregon State University

Corvallis, Oregon 97331 USA
Hiram.Li@orst.edu

Philippe A. Rossignol
Department of Fisheries and Wildlife
Room 104, Nash Hall, Oregon State University
Corvallis, Oregon 97331 USA
Phil.Rossignol@oregonstate.edu


File list (Supplement 1, Version 2)

Community Matrix(ii).mws

PowerPlay(ii) install.zip

PowerPlay(ii) install.exe

Description (Supplement 1, Version 2)

1) Community Matrix (ii).mws.—Maple program commands for qualitative and symbolic analysis of the community matrix.  For versions of Maple including Maple V release 5 to Maple 8. This revision includes code to calculate qualitative metrics for stability set forth in Dambacher et al. 2003b.

Run program by hitting enter key while cursor is on the first line of code (in red colored text), and doing the same on subsequent sections of code.  In the Matrix Input section the example community matrix is for model c (Fig. 7) in Dambacher et al. (2002).  Use of PowerPlay (see below) greatly facilitates the creation and manipulation of community matrices, especially for large and complex systems, thus reducing transcription errors common to matrix editing.  In the Qualitative Analysis section the program first assesses potential for Lyapunov stability by qualitative metrics corresponding to Hurwitz criteria (i) and (ii), as described in Dambacher et al. 2003b.  Criteria (i) assesses feedback (F0. . . Fn) at each level of the system through the proportion of feedback cycles that are of like sign (through weighted feedback wFn). Criteria (ii) assesses the relative weight of the negative and positive terms in the n-1 Hurwitz determinant in relation to a model-c type system (through n-1 weighted determinant and its ratio to that of a model-c type system; note that assessment of criteria (ii) is limited to systems of size n = 3–25).  Models are classified as being either “Class I” or “Class II”.  Next the program assesses the response of the system to input through the adjoint and weighted-predictions matrices, as described in Dambacher et al. (2002) and (2003a).  These same analyses are assessed symbolically in the Symbolic Analysis section, and output can be obtained for whole matrices or series, and for selected matrix or series elements.

Line-by-line description of Maple commands.

1) with(linalg):

Calls up Maple’s linear algebra package.

2) z:=proc(x,y)if y=0 then 1 else x/y fi end:

Defines special division procedure used below, where division by zero equals 1.

3) t:=proc(x,y)x*y end:

Defines multiplication procedure used below.

4) b:=proc(x,y)x+y end:

Defines addition procedure used below.

5) n:=5:

Input: defines number of species.

6) A:=array(1..n,1..n,[[-1,-1,0,0,0],[1,-1,-1,0,0],[0,1,-1,-1,0],[0,0,1,-1,-1],[0,0,0,1,-1]]);

Input: defines community matrix.

7) "Stability Criterion (i)";

Prints section header.

8) p:=charpoly(A,l):

Defines characteristic polynomial with lambda as root.

9) Pc:=[seq(-1*coeff(p,l,n-i),i=0..n)]:

Defines polynomial coefficients in order of a0, a1, a2, a3,…an, with a0 = -1.

10) poly_coef_F0_to_Fn=Pc;

Prints polynomial coefficients.

11) P:=permanent(abs(A)+band([l],n)):

Defines absolute polynomial with lambda as root.

12) aPc:=[seq(coeff(P,l,n-i),i=0..n)]:

Defines coefficients of absolute polynomial in order of a0, a1, a2, a3,…an.

13) positive_feedback=vector(n+1,(j)->(aPc[j]+Pc[j])/2);

Prints number of positive feedback cycles at each system level F0 to Fn.

14) negative_feedback=vector(n+1,(j)->-(aPc[j]-(aPc[j]+Pc[j])/2));

Prints number of negative feedback cycles at each system level F0 to Fn.

15) absolute_feedback=vector(n+1,(j)->(aPc[j]));

Prints absolute number of feedback cycles at each system level F0 to Fn.

16) wFn:=vector(n+1,(j)->z(Pc[j],aPc[j])):

Using procedure z, defines weighted feedback at each system level F0 to Fn.

17) evalf(wFn=eval(wFn),2);

Prints weighted feedback at each system level F0 to Fn.

18) h:=matrix(n-1,n-1,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -Pc[2*j-i+1] else 0 fi):

Defines Hurwitz matrices Dn to D0.

19) H:=matrix(n-1,n-1,(i,j)->if 2*j-i<=n and 2*j-i>=0 then aPc[2*j-i+1] else 0 fi):

Defines Hurwitz matrices Dn to D0 with absolute number of terms as matrix entries.

20) m:=max(seq(wFn[j],j=1..n+1)):

Defines maximum weighted feedback (max wFn).

21) v:=0:

Initially defines v=0 for below logical statement.

22) for j from 1 to n do if wFn[j]=m then v:=v+1 else fi od;

Defines v not equal to zero if max wFn not at highest system level only.

23) "Stability Criterion (ii)";

Prints section header.

24) q:="Class I Model":

Defines q for later output from logical statement.

25) r:="Class II Model":

Defines r for later output from logical statement.

26) C:=array(3..25,[3,11,107,1531,54249,3073177,412107573,.92642e11,.47847e14,.42733e17,.85868e20,.30498e24,.23997e28,.32396e32,.10496e37,.59083e41,.72127e46,.16176e52,.78077e57,.69792e63,.13343e70,.47555e76,.36057e83]):

Defines vector of 1/n-1 weighted determinants of model c type systems, size n=3-25.

27) wH:=(det(h)/permanent(H)):

Defines n-1 weighted determinant.

28) wD["n-1"]=evalf(wH,2);

Prints n-1 weighted determinant to two significant figures.

29) ratio_to_model_C=evalf(wH*C[n],2);

Prints ratio of n-1 weighted determinant to that of model c type system.

30) if (m<>-1) and (v=0) and (wH>=1/C[n]) or (m=-1) and (wH>=1/C[n]) then q else r fi;

Prints result of logical statement that defines system as either Class I or Class II.

31) k:=0:

Initially defines k=0 for below logical statement.

32) for i from 1 to n+1 do if aPc[i]=0 then k:=k+1 else fi od:

Defines k not equal to 0 if there is absence of feedback at any level in the system.

33) if k>0 then "NOTE: ABSENCE OF FEEDBACK AT ONE OR MORE LEVELS IN THE SYSTEM" else fi;

Prints notice when there is an absence of feedback at any level in the system.

34) "Change in Abundance from (+) Input";

Prints section header.

35) "adjoint (-A)";

Prints matrix header.

36) adj(-A);

Prints adjoint of negative community matrix.

37) "absolute feedback (T)";

Prints matrix header.

38) T:=matrix(n,n,(i,j)->permanent(minor(abs(A),j,i))):

Defines absolute feedback matrix.

39) evalm(T);

Prints absolute feedback matrix.

40) "weighted predictions (W)";

Prints matrix header.

41) evalf(matrix(n,n,(i,j)->abs(z(adj(A)[i,j],T[i,j]))),2);

Prints weighted predictions matrix using vectorized division with procedure z.

42) SA:=matrix(n,n,(i,j)->t((A)[i,j],(a)[i,j])):

Symbolically defines community matrix.

43) Sp:=charpoly(SA,l):

Defines characteristic polynomial symbolically.

44) SPc:=[seq(-1*coeff(Sp,l,n-i),i=0..n)]:

Symbolically defines polynomial coefficients.

45) s_fb:=[seq(-1*coeff(charpoly(SA,l),l,n-i-1),i=0..n-1)]:

Symbolically defines polynomial coefficients without a0.

46) s_adj:=adj(-SA):

Symbolically defines adjoint matrix.

47) "Community Matrix (A)";

Prints header.

48) evalm(SA);

Prints symbolic community matrix.

49) "system feedback";

Prints header.

50) for i from 1 to n+1 do F[n+1-i]; SPc[n+2-i] od;

Prints each level of system feedback Fn to F0 symbolically.

51) "Hurwitz determinants";

Prints header.

52) for k from 1 to n do D[n+1-k]; det(matrix(n+1-k,n+1-k,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -SPc[2*j-i+1] else 0 fi)) od;

Prints each Hurwitz determinant Dn to D1 symbolically.

53) "adjoint (-A)";

Prints header.

54) evalm(adj(-SA));

Prints symbolic adjoint matrix.

55) k:=x:

Defines k for selected output below.

56) System_Feedback_F[k];

Prints header.

57) s_fb[k];

Prints selected (k) level of feedback symbolically.

58) Hurwitz_determinant_D[k];

Prints Header.

59) det(matrix(k,k,(i,j)->if 2*j-i<=n and 2*j-i>=0 then -SPc[2*j-i+1] else 0 fi));

Prints selected (k) Hurwitz determinant.

60) i:=x:

Defines i for selected output below.

61) j:=y:

Defines j for selected output below.

62) adjoint[i,j];

Prints header.

63) s_adj[i,j];

Prints selected ijth element of adjoint matrix symbolically.

2) PowerPlay(ii) install.exe.PowerPlay (version 2.0) is a digraph editor created by Oregon State University students Peter Westfahl, Zach Heath, and Clint Woodrow in 2002, for the purpose of drawing signed digraphs and converting them to matrix output used in the above described Maple program.

After installation follow directions provided in the Help menu to create, save, and recall signed digraphs, then go to Data Tools and Show Matrix View and find the line of text with general format of “n:= x: A:=array (1..n, 1..n, [[ … ]];”.  With computer mouse, double click on this line, then select and copy it to computer’s clip board, and then paste it into the ‘Matrix Input’ section of the Maple program, being sure to first eliminate or to paste over the example code.  You may find that you have to insert code in front of the semicolon at the end of the line to make the code active (active code is shown as red colored font).

Literature cited

Dambacher, J. M., H. W. Li, and P. A. Rossignol. 2002. Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology 83:1372–1385.

Dambacher, J. M., H. W. Li, and P. A. Rossignol. 2003a. Qualitative predictions in model ecosystems. Ecological Modelling 161(1-2):79–93.

Dambacher, J. M., H. -K. Luh, H. W. Li, and P. A. Rossignol. 2003b. Qualitative stability and ambiguity in model ecosystems. American Naturalist 161(6):1876–888.


Author(s)

Jeffrey M. Dambacher
Oregon Department of Fish and Wildlife
Corvallis Research Lab
28655 Hwy. 34, Corvallis, Oregon 97333 USA
dambacherj@fsl.orst.edu

Hiram W. Li
Oregon Cooperative Fish and Wildlife Research Unit (USGS)
Department of Fisheries and Wildlife
Nash Hall, Oregon State University

Corvallis, Oregon 97331 USA
Hiram.Li@orst.edu

Philippe A. Rossignol
Department of Fisheries and Wildlife
Nash Hall, Oregon State University
Corvallis, Oregon 97331 USA
rossignp@mail.science.orst.edu


File list

Community Matrix.MWS

Description (Supplement 1, Version 1)

Commands are for Maple V Release 5.  Matrix Input below includes example input for Model C (Fig. 7).  In Qualitative Analysis program first assesses Lyapunov stability by criteria of (i) feedback (F0. . .Fn) at each nth level of the system being negative, and (ii) all positive Hurwitz determinants.  Criterion (ii) is calculated by Maple V share-library program ‘Hurwitz’, which returns true if met and false if not.  See Dambacher (2001) for interpretation of ‘wFn’ weighted stability output.  Program then assesses values of the adjoint, absolute feedback, and weighted predictions matrices.  In Symbolic Analysis program gives symbolic output for selected terms of F0 . . .Fn system feedback and adjoint matrix.

Source Code

Matrix Input: Input n:=x, at second command line, for x number of species or system variables, and input Aij community matrix elements as 0, 1, or –1.

[>with(linalg):with(share):with(Hurwitz):

[>n:=5:A:=array(1..n,1..n,[[-1,1,0,0,0],[-1,-1,1,0,0],[0,-1,-1,1,0], [0,0,-1,-1,1],[0,0,0,-1,-1]]);

Qualitative Analysis

[>p:=charpoly(A,l):P:=permanent(abs(A)+band([l],n)):Pc:=[seq(-1*coeff (p,l,degree(p)-i),i=0..degree(p))]:polynomial_coefficients:=Pc; Hurwitz _criterion=Hurwitz(p,l);aPc:=[seq(coeff(P,l,degree(P)-i), i=0..degree (P))]:z:=proc(x,y)if y=0then 1; else x/y;fi;end:evalf (wFn=matrix(1, degree(p)+1,(i,j)->abs (z(Pc[j],aPc[j]))),2);

[>adjoint_A=adj(-A);T:=matrix(n,n,(i,j)->permanent(minor(abs(A),j,i))); evalf(weighted_predictions_W=matrix(n,n,(i,j)->abs(z(adjoint(A)[i,j], T[i,j]))),2);

Symbolic Analysis: input [n] in second-to-last command line below to detail symbolic conditions of nth level of system feedback; input [i,j] in last command line to detail ijth adjoint element, use ‘evalm(symbolic_adjoint);’ to show entire matrix.

[>t:=proc(x,y)x*y:end:a=array(1..n,1..n):Symbolic_A:=matrix(n,n,(i,j)->t((A)[i,j], (a)[i,j]));symbolic_feedback:=[seq(-1*coeff(charpoly (Symbolic_A,l),l,degree(p)-i-1),i=0..degree(p)-1)]:symbolic_adjoint:= adj(-Symbolic_A):

[>symbolic_feedback[n];

[>symbolic_adjoint[i,j];

Literature cited

Dambacher, J. M. 2001. Qualitative Analysis of the Community Matrix. Dissertation. Oregon State University, Corvallis, Oregon, USA.



ESA Publications | Ecological Archives | Permissions | Citation | Contacts