Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mrd.models.cagn
Class CagnModel  view CagnModel download CagnModel.java

java.lang.Object
  extended bySimModelImpl
      extended byorg.mrd.models.cagn.CagnModel

public class CagnModel
extends SimModelImpl

The CAGN Model.


Nested Class Summary
 class CagnModel.PairFactory
          PairFactor is a place to store instances of the Pair object, this way we don't need to keep createing and destroying them, which can be an expensive task.
 
Field Summary
protected  double[] ageReproductionTable
          Holds value of property ageReproductionTable.
protected  double[] ageSurvivalTable
          Holds value of property ageSurvivalTable.
protected  double currentIterationSurvival
          Holds value of property currentIterationSurvival.
protected  RandomElement disp_generator
          Used in all the pairs to determine their dispersal distance.
private  org.mrd.analysis.RunningBasicStatistics dispersalStatistics
           
protected  java.lang.String habitatSpaceFile
          Holds the location of the PGM file used to load the landscape
protected  Beta iteration_survivial_distribution
          Used to generate the currentIterationSurvival probability.
private  double iterationDispersalSurvival
          Holds value of property iterationDispersalSurvival.
protected  double iterationSurvivalMean
          Holds value of property iterationSurvivalMean.
protected  double iterationSurvivalStd
          Holds value of property iterationSurvivalStd.
protected  double[] landReproductionTable
          Holds value of property landReproductionTable.
protected  Landscape landscape
          the landscape encapsulates agentList and grid datastructures.
protected  double[] landSurvivalTable
          Holds value of property landSurvivalTable.
protected  org.apache.commons.logging.Log log
          logging is always good to do, learn to use it.
protected  double maxIterations
          Holds value of property maxIterations, stop is scheduled using this.
protected  int modelInitialPairs
          Holds value of property modelInitialPairs.
protected  int pairClutchSize
          Holds value of property pairClutchSize.
protected  int pairDispersalSeed
          Holds value of property pairDispersalSeed.
protected  double pairMeanDispersalDistance
          Holds value of property pairMeanDispersalDistance.
protected  int pairReproductionSeed
          Holds value of property pairReproductionSeed.
protected  int pairSearchTime
          Holds value of property pairSearchTime.
protected  int pairSurvivalSeed
          Holds value of property pairSurvivalSeed.
protected  org.apache.commons.pool.ObjectPool pool
          Holds value of property maxIterations, stop is scheduled using this.
protected  RandomElement rep_generator
          Used in the Bernoulli trials of all the pairs to determine reproduction roll.
protected  Schedule schedule
          Every model must have a schedule
protected  RandomElement survival_generator
          Used in the Bernoulli trials of all the pairs to determine their survival roll.
 
Constructor Summary
CagnModel()
           
 
Method Summary
 void begin()
          Model begins from this method.
 java.lang.String getAgeReproductionTable()
          Getter for property survivalTable.
 java.lang.String getAgeSurvivalTable()
          Getter for property survivalTable.
 double getCurrentIterationSurvival()
          Getter for property currentIterationSurvival.
 org.mrd.analysis.RunningBasicStatistics getDispersalStatistics()
           
 java.lang.String getHabitatSpaceFile()
          Getter for property habitatSpace.
 java.lang.String[] getInitParam()
          Used by the GUI to expose the Parameters that can be Manipulated.
 double getIterationDispersalSurvival()
           
 double getIterationSurvivalMean()
          Getter for property iterationSurvivalMean.
 double getIterationSurvivalStd()
          Getter for property iterationSurvivalStd.
 java.lang.String getLandReproductionTable()
          Getter for property landReproductionTable.
 Landscape getLandscape()
          Getter for property landscape.
 java.lang.String getLandSurvivalTable()
          Getter for property landSurvivalTable.
 double getMaxIterations()
          Getter for property maxIterations.
 int getModelInitialPairs()
          Getter for property modelInitialPairs.
 java.lang.String getName()
          a required method - displayed on the Controller toolbar.
 int getPairClutchSize()
          Getter for property pairClutchSize.
 int getPairDispersalSeed()
          Getter for property pairDispersalSeed.
 int getPairMaxAge()
          Getter for property maxAge.
 double getPairMeanDispersalDistance()
          Getter for property pairMeanDispersalDistance.
 int getPairReproductionSeed()
          Getter for property pairReproductionSeed.
 int getPairSearchTime()
          Getter for property pairSearchTime.
 int getPairSurvivalSeed()
          Getter for property pairSurvivalSeed.
 Schedule getSchedule()
          Getter for property schedule.
 void setAgeReproductionTable(java.lang.String table)
          Setter for property survivalTable.
 void setAgeSurvivalTable(java.lang.String table)
          Setter for property survivalTable.
 void setHabitatSpaceFile(java.lang.String habitatSpaceFile)
          Setter for property habitatSpace.
 void setIterationSurvivalMean(double iterationSurvivalMean)
          Setter for property iterationSurvivalMean.
 void setIterationSurvivalStd(double iterationSurvivalStd)
          Setter for property iterationSurvivalStd.
 void setLandReproductionTable(java.lang.String table)
          Setter for property landReproductionTable.
 void setLandSurvivalTable(java.lang.String table)
          Setter for property landSurvivalTable.
 void setMaxIterations(double maxIterations)
          Setter for property maxIterations.
 void setModelInitialPairs(int modelInitialPairs)
          Setter for property modelInitialPairs.
 void setPairClutchSize(int pairClutchSize)
          Setter for property pairClutchSize.
 void setPairDispersalSeed(int pairDispersalSeed)
          Setter for property pairDispersalSeed.
 void setPairMeanDispersalDistance(double pairMeanDispersalDistance)
          Setter for property pairMeanDispersalDistance.
 void setPairReproductionSeed(int pairReproductionSeed)
          Setter for property pairReproductionSeed.
 void setPairSearchTime(int pairSearchTime)
          Setter for property pairSearchTime.
 void setPairSurvivalSeed(int pairSurvivalSeed)
          Setter for property pairSurvivalSeed.
 void setSchedule(Schedule schedule)
          Setter for property schedule.
 void setup()
          Model is setup from this method.
 void step()
          This method is defined in the stepable interface, it is scheduled from with the begin method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
logging is always good to do, learn to use it.


schedule

protected Schedule schedule
Every model must have a schedule


maxIterations

protected double maxIterations
Holds value of property maxIterations, stop is scheduled using this.


pool

protected org.apache.commons.pool.ObjectPool pool
Holds value of property maxIterations, stop is scheduled using this.


landscape

protected Landscape landscape
the landscape encapsulates agentList and grid datastructures.


habitatSpaceFile

protected java.lang.String habitatSpaceFile
Holds the location of the PGM file used to load the landscape


iteration_survivial_distribution

protected Beta iteration_survivial_distribution
Used to generate the currentIterationSurvival probability. This is later used by the pairs in calculating thier survival


survival_generator

protected RandomElement survival_generator
Used in the Bernoulli trials of all the pairs to determine their survival roll.


rep_generator

protected RandomElement rep_generator
Used in the Bernoulli trials of all the pairs to determine reproduction roll.


disp_generator

protected RandomElement disp_generator
Used in all the pairs to determine their dispersal distance.


pairClutchSize

protected int pairClutchSize
Holds value of property pairClutchSize.


pairSearchTime

protected int pairSearchTime
Holds value of property pairSearchTime.


pairMeanDispersalDistance

protected double pairMeanDispersalDistance
Holds value of property pairMeanDispersalDistance.


modelInitialPairs

protected int modelInitialPairs
Holds value of property modelInitialPairs.


pairSurvivalSeed

protected int pairSurvivalSeed
Holds value of property pairSurvivalSeed.


pairReproductionSeed

protected int pairReproductionSeed
Holds value of property pairReproductionSeed.


pairDispersalSeed

protected int pairDispersalSeed
Holds value of property pairDispersalSeed.


ageSurvivalTable

protected double[] ageSurvivalTable
Holds value of property ageSurvivalTable.


ageReproductionTable

protected double[] ageReproductionTable
Holds value of property ageReproductionTable.


landReproductionTable

protected double[] landReproductionTable
Holds value of property landReproductionTable.


landSurvivalTable

protected double[] landSurvivalTable
Holds value of property landSurvivalTable.


iterationSurvivalMean

protected double iterationSurvivalMean
Holds value of property iterationSurvivalMean.


iterationSurvivalStd

protected double iterationSurvivalStd
Holds value of property iterationSurvivalStd.


currentIterationSurvival

protected double currentIterationSurvival
Holds value of property currentIterationSurvival.


iterationDispersalSurvival

private double iterationDispersalSurvival
Holds value of property iterationDispersalSurvival.


dispersalStatistics

private org.mrd.analysis.RunningBasicStatistics dispersalStatistics
Constructor Detail

CagnModel

public CagnModel()
Method Detail

setup

public void setup()
Model is setup from this method. Runs first.


begin

public void begin()
Model begins from this method. Executes second.


step

public void step()
This method is defined in the stepable interface, it is scheduled from with the begin method. Any code added here will be executed when the scheduled event occurs (currently once each iteration).


getName

public java.lang.String getName()
a required method - displayed on the Controller toolbar.


getInitParam

public java.lang.String[] getInitParam()
Used by the GUI to expose the Parameters that can be Manipulated.


getPairClutchSize

public int getPairClutchSize()
Getter for property pairClutchSize.


setPairClutchSize

public void setPairClutchSize(int pairClutchSize)
Setter for property pairClutchSize.


getPairSearchTime

public int getPairSearchTime()
Getter for property pairSearchTime.


setPairSearchTime

public void setPairSearchTime(int pairSearchTime)
Setter for property pairSearchTime.


getPairMeanDispersalDistance

public double getPairMeanDispersalDistance()
Getter for property pairMeanDispersalDistance.


setPairMeanDispersalDistance

public void setPairMeanDispersalDistance(double pairMeanDispersalDistance)
Setter for property pairMeanDispersalDistance.


getModelInitialPairs

public int getModelInitialPairs()
Getter for property modelInitialPairs.


setModelInitialPairs

public void setModelInitialPairs(int modelInitialPairs)
Setter for property modelInitialPairs.


getPairSurvivalSeed

public int getPairSurvivalSeed()
Getter for property pairSurvivalSeed.


setPairSurvivalSeed

public void setPairSurvivalSeed(int pairSurvivalSeed)
Setter for property pairSurvivalSeed.


getPairReproductionSeed

public int getPairReproductionSeed()
Getter for property pairReproductionSeed.


setPairReproductionSeed

public void setPairReproductionSeed(int pairReproductionSeed)
Setter for property pairReproductionSeed.


getPairDispersalSeed

public int getPairDispersalSeed()
Getter for property pairDispersalSeed.


setPairDispersalSeed

public void setPairDispersalSeed(int pairDispersalSeed)
Setter for property pairDispersalSeed.


getAgeSurvivalTable

public java.lang.String getAgeSurvivalTable()
Getter for property survivalTable.


setAgeSurvivalTable

public void setAgeSurvivalTable(java.lang.String table)
Setter for property survivalTable.


getAgeReproductionTable

public java.lang.String getAgeReproductionTable()
Getter for property survivalTable.


setAgeReproductionTable

public void setAgeReproductionTable(java.lang.String table)
Setter for property survivalTable.


getLandReproductionTable

public java.lang.String getLandReproductionTable()
Getter for property landReproductionTable.


setLandReproductionTable

public void setLandReproductionTable(java.lang.String table)
Setter for property landReproductionTable.


getLandSurvivalTable

public java.lang.String getLandSurvivalTable()
Getter for property landSurvivalTable.


setLandSurvivalTable

public void setLandSurvivalTable(java.lang.String table)
Setter for property landSurvivalTable.


getPairMaxAge

public int getPairMaxAge()
Getter for property maxAge.


getLandscape

public Landscape getLandscape()
Getter for property landscape.


getHabitatSpaceFile

public java.lang.String getHabitatSpaceFile()
Getter for property habitatSpace.


setHabitatSpaceFile

public void setHabitatSpaceFile(java.lang.String habitatSpaceFile)
Setter for property habitatSpace.


getIterationSurvivalMean

public double getIterationSurvivalMean()
Getter for property iterationSurvivalMean.


setIterationSurvivalMean

public void setIterationSurvivalMean(double iterationSurvivalMean)
Setter for property iterationSurvivalMean.


getIterationSurvivalStd

public double getIterationSurvivalStd()
Getter for property iterationSurvivalStd.


setIterationSurvivalStd

public void setIterationSurvivalStd(double iterationSurvivalStd)
Setter for property iterationSurvivalStd.


getCurrentIterationSurvival

public double getCurrentIterationSurvival()
Getter for property currentIterationSurvival.


getMaxIterations

public double getMaxIterations()
Getter for property maxIterations.


setMaxIterations

public void setMaxIterations(double maxIterations)
Setter for property maxIterations.


getSchedule

public Schedule getSchedule()
Getter for property schedule.


setSchedule

public void setSchedule(Schedule schedule)
Setter for property schedule.


getDispersalStatistics

public org.mrd.analysis.RunningBasicStatistics getDispersalStatistics()

getIterationDispersalSurvival

public double getIterationDispersalSurvival()