clFuncResponseSeedPredation Class Reference

Models functional response seed predation. More...

#include <FuncResponseSeedPredation.h>

Inheritance diagram for clFuncResponseSeedPredation:

clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clFuncResponseSeedPredation (clSimManager *p_oSimManager)
 Constructor.
 ~clFuncResponseSeedPredation ()
 Destructor.
void Action ()
 Performs the model.

Protected Member Functions

void GetData (xercesc::DOMDocument *p_oDoc)
 Reads in the parameter file values.
void SetPredatorInitialDensity ()
 Sets all grid cells in the predator grid with the appropriate initial density.
void GetParameterFileData (xercesc::DOMDocument *p_oDoc)
 Gets the data from the parameter file.

Protected Attributes

clGridBasemp_oSeedGrid
 Pointer to the "Dispersed Seeds" grid created by disperse behaviors.
clGridBasemp_oPredatorGrid
 Pointer to predator grid.
char m_cOutput [MAX_FILENAME_SIZE]
 File to which to write intermediate output, if desired.
float m_fMaxInstantaneousDeclineRate
 Max instantaneous rate at which predator abundance declines in the absense of food, number of predators per week.
float m_fDemographicEfficiency
 Population's demographic efficiency.
float m_fDensityDependentCoefficient
 Density-dependent coefficient.
float m_fForagingEfficiency
 Foraging efficiency.
float m_fPredatorInitialDensity
 Predator initial density - number per square meter.
float m_fMaxIntakeRate
 Maximum seed intake rate - number of seeds per predator per day.
float m_fProportionGerminating
 Proportion of seeds that germinate each week in the germination period - this must be a number between 0 and 1.
float m_fCellArea
 Area of a seed grid grid cell in square meters - when multiplied by the density of predators, produces the number in the cell.
int m_iNumWeeksToModel
 Number of weeks to run the model.
int m_iNumWeeksSeedFall
 Number of weeks of seed fall.
int m_iWeekGerminationStarts
 Week in which germination begins.
short int * mp_iSeedGridCode
 Data member codes for seed grid for number of seeds.
short int m_iNumPredsCode
 Data member in the predators grid.
bool m_bPreservePredatorDensities
 Whether or not to carry over mouse population densities.

Detailed Description

Models functional response seed predation.

This runs as a model-within-a-model, in weekly timesteps for a year. It doesn't matter if the length of the overall model timestep is longer than a year; the amount of seeds is treated as a one-year pool, which produces the same result.

This behavior reduces the number of seeds available in the "Dispersed Seeds" grid. In each cell of that grid, there are a certain number of predators (calculated from the initial density of predators) which have the number of seeds present in that cell as a food source. For all the species to which this behavior is applied, the seeds are eaten with equal enthusiasm; the proportions of each type are captured before predation, and any leftover seeds are redistributed according to those proportions.

Seed rain is evenly divided over a set number of timesteps (weeks). The predator population has as a food source the number of seeds added during the current week's rain (if the rain is going on) plus any leftover seeds from previous weeks which have not been consumed. Beginning at a certain week in the spring, the number of seeds available to the mice is further reduced by a certain percentage each week to simulate germination. Once germination begins, it continues until the predator model finishes running. In order to correctly calculate mouse consumption and ensure that the seeds which germinate are actually available later, this keeps track of the seeds consumed; it is this number which is subtracted from total seeds at the end.

Seed offtake for each week is calculated as

O = IRs * N
where Per capita seed offtake is
IRs = cs(1 - e-(S*D))
where The number of predators in each cell's population is calculated as
Nt = Nt-1 * ert-1

where The instantaneous rate of change, r, is calculated as
r = a + d(IRs) + g(N)
where

This behavior must be used in conjunction with a disperse behavior. If such a behavior is not present (and thus the "Dispersed Seeds" grid is not present), a fatal error will be thrown during setup.

The namestring and parameter file call string are "functional response seed predation".

Copyright 2004 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 28, 2004 - Submitted as beta (LEM)


Constructor & Destructor Documentation

clFuncResponseSeedPredation::clFuncResponseSeedPredation ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clFuncResponseSeedPredation::~clFuncResponseSeedPredation (  ) 

Destructor.

Frees memory.


Member Function Documentation

void clFuncResponseSeedPredation::Action (  )  [virtual]

Performs the model.

If predator densities are not to be preserved, then the predator grid is initialized with SetPredatorInitialDensity().

Reimplemented from clBehaviorBase.

void clFuncResponseSeedPredation::GetData ( xercesc::DOMDocument *  p_oDoc  )  [protected, virtual]

Reads in the parameter file values.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if there is no such grid called "Dispersed Seeds", or if the "Dispersed Seeds" grid does not contain a valid return code for all behavior species.

Implements clWorkerBase.

void clFuncResponseSeedPredation::GetParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Gets the data from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if:
  • Number of weeks of seedfall is less than or equal to zero
  • Initial predator density is less than or equal to zero
  • Number of weeks to run the model is less than 0 or greater than 52
  • Week to start germination is less than 0 or greater than 52
  • Proportion germinating isn't between 0 and 1


Member Data Documentation

short int* clFuncResponseSeedPredation::mp_iSeedGridCode [protected]

Data member codes for seed grid for number of seeds.

Array size is # behavior species.

clGridBase* clFuncResponseSeedPredation::mp_oPredatorGrid [protected]

Pointer to predator grid.

The name of this grid is "Seed Predators". Its grid cell resolution will match that of "Dispersed Seeds". It has one float data member - "num preds". It will accept maps if m_bPreservePredatorDensities = true and if they are of the right resolution.


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:42:21 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.7