|
|||||||||
| Home >> All >> org >> mrd >> models >> [ simple overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mrd.models.simple
Class Pair

java.lang.Objectorg.mrd.repast.landscape.LandscapeAgent
org.mrd.models.simple.Pair
- public class Pair
- extends org.mrd.repast.landscape.LandscapeAgent
Represents a Pair in the CAGN model. A pair is an abstraction in the model where only females are tracked. This makes an assumption that sex ratios in the model are always equal. This class encapsulates the behavior of pairs, they need to get tested for survival and reproduction during each iteration of the model.
| Field Summary | |
protected int |
clutchSize
Holds value of property clutchSize. |
protected int |
currentAge
Holds value of property currentAge. |
private double |
currentDispersalDist
Holds value of property actualDisperal. |
protected Uniform |
dispersalAngle
Holds value of property angle (Dispersal Angle Generator). |
protected Poisson |
dispersalDistance
Holds value of property distance (Dispersal Distance Poisson Trail Generator). |
protected org.apache.commons.logging.Log |
log
|
private org.apache.commons.pool.ObjectPool |
pool
Holds value of property pool. |
protected org.mrd.random.Bernoulli |
reproduction
Holds value of property reproduction (Reproduction Bernoulli Trail Generator). |
protected int |
searchTime
Holds value of property searchTime. |
protected org.mrd.random.Bernoulli |
survival
Holds value of property survival (Survival Bernoulli Trail Generator). |
| Fields inherited from class org.mrd.repast.landscape.LandscapeAgent |
ALIVE, DEAD, landscape, stage, x, y |
| Constructor Summary | |
Pair(org.mrd.repast.landscape.Landscape landscape,
RandomElement survivalGen,
RandomElement reproductionGen,
RandomElement dispersalAngleGen,
RandomElement dispersalDistGen)
Constructs an new pair in the current model and landscape |
|
| Method Summary | |
void |
disperse(int parent_x,
int parent_y)
Used by fledgling pair to disperse to its new lication. |
void |
draw(SimGraphics g)
Used by the GUI to Draw this Agent on the Landscape Grid. |
int |
getClutchSize()
Getter for property clutchSize. |
int |
getCurrentAge()
Getter for property currentAge. |
double |
getCurrentDispersalDist()
Getter for property actualDisperal. |
org.apache.commons.pool.ObjectPool |
getPool()
Getter for property pool. |
double |
getReproductionProbability()
Getter for property reproductionProbability. |
int |
getSearchTime()
Getter for property searchTime. |
double |
getSurvivalProbability()
Getter for property survivalProbability. |
java.awt.Point |
searchFrom(int current_x,
int current_y)
Searches for a dispersal point from the this agents current position. |
void |
setClutchSize(int clutchSize)
Setter for property clutchSize. |
void |
setCurrentAge(int currentAge)
Setter for property currentAge. |
void |
setMeanDispersalDistance(double meanDispersalDistance)
Setter for property dispersalDistance. |
void |
setPool(org.apache.commons.pool.ObjectPool pool)
Setter for property pool. |
void |
setReproductionProbability(double successProbability)
Setter for property reproductionProbability. |
void |
setSearchTime(int searchTime)
Setter for property searchTime. |
void |
setSurvivalProbability(double successProbability)
Setter for property survivalProbability. |
void |
step()
Step iterates this agent, behaviors this agent will perform are executed here. |
| Methods inherited from class org.mrd.repast.landscape.LandscapeAgent |
getStage, getX, getY, setStage, setX, setY |
| 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
survival
protected org.mrd.random.Bernoulli survival
- Holds value of property survival (Survival Bernoulli Trail Generator).
reproduction
protected org.mrd.random.Bernoulli reproduction
- Holds value of property reproduction (Reproduction Bernoulli Trail Generator).
dispersalDistance
protected Poisson dispersalDistance
- Holds value of property distance (Dispersal Distance Poisson Trail Generator).
dispersalAngle
protected Uniform dispersalAngle
- Holds value of property angle (Dispersal Angle Generator).
searchTime
protected int searchTime
- Holds value of property searchTime.
clutchSize
protected int clutchSize
- Holds value of property clutchSize.
currentDispersalDist
private double currentDispersalDist
- Holds value of property actualDisperal.
currentAge
protected int currentAge
- Holds value of property currentAge.
pool
private org.apache.commons.pool.ObjectPool pool
- Holds value of property pool.
| Constructor Detail |
Pair
public Pair(org.mrd.repast.landscape.Landscape landscape, RandomElement survivalGen, RandomElement reproductionGen, RandomElement dispersalAngleGen, RandomElement dispersalDistGen)
- Constructs an new pair in the current model and landscape
| Method Detail |
searchFrom
public java.awt.Point searchFrom(int current_x, int current_y)
- Searches for a dispersal point from the this agents current position.
1.) Used in the model to initialize the landscape without the risk of
emigration from the landscape due to lack of available spaces.
2.) Used by fledgling to search for an adequate position to disperse to
disperse
public void disperse(int parent_x,
int parent_y)
throws java.lang.Exception
- Used by fledgling pair to disperse to its new lication. This method allows the
pair to use its own disperse method to determine the dispersal point instead of
its parents disperse method. If the fledgling fails to locate a viable position
it is removed from the model.
step
public void step()
- Step iterates this agent, behaviors this agent will perform are executed here.
step() is called by the scheduler once per tick.
getCurrentAge
public int getCurrentAge()
- Getter for property currentAge.
setCurrentAge
public void setCurrentAge(int currentAge)
- Setter for property currentAge.
getSurvivalProbability
public double getSurvivalProbability()
- Getter for property survivalProbability.
setSurvivalProbability
public void setSurvivalProbability(double successProbability)
- Setter for property survivalProbability.
getClutchSize
public int getClutchSize()
- Getter for property clutchSize.
setClutchSize
public void setClutchSize(int clutchSize)
- Setter for property clutchSize.
getReproductionProbability
public double getReproductionProbability()
- Getter for property reproductionProbability.
setReproductionProbability
public void setReproductionProbability(double successProbability)
- Setter for property reproductionProbability.
getSearchTime
public int getSearchTime()
- Getter for property searchTime.
setSearchTime
public void setSearchTime(int searchTime)
- Setter for property searchTime.
setMeanDispersalDistance
public void setMeanDispersalDistance(double meanDispersalDistance)
- Setter for property dispersalDistance.
draw
public void draw(SimGraphics g)
- Used by the GUI to Draw this Agent on the Landscape Grid.
draw() is called whenever the display is updated, assuming the agent
is part of what is being displayed.
getCurrentDispersalDist
public double getCurrentDispersalDist()
- Getter for property actualDisperal.
getPool
public org.apache.commons.pool.ObjectPool getPool()
- Getter for property pool.
setPool
public void setPool(org.apache.commons.pool.ObjectPool pool)
- Setter for property pool.
|
|||||||||
| Home >> All >> org >> mrd >> models >> [ simple overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC