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

java.lang.Objectorg.mrd.model.Agent
org.mrd.examples.simple.Pair
- public class Pair
- extends org.mrd.model.Agent
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 | |
private Uniform |
angles
|
private int |
clutchSize
Holds value of property clutchSize. |
private int |
currentAge
Holds value of property currentAge. |
private double |
dispersalDistance
Holds value of property dispersalDistance. |
private Poisson |
distance
Holds value of property distance (Dispersal Distance Poisson Trail Generator.. |
private org.mrd.random.Bernoulli |
reproduction
Holds value of property reproduction (Reproduction Bernoulli Trail Generator). |
private int |
searchTime
Holds value of property searchTime. |
private org.mrd.random.Bernoulli |
survival
Holds value of property survival (Survival Bernoulli Trail Generator). |
| Fields inherited from class org.mrd.model.Agent |
ALIVE, DEAD, landscape, model, stage, x, y |
| Constructor Summary | |
Pair()
Constructs a New Pair in this Landscape and Model/ |
|
| Method Summary | |
java.awt.Point |
disperse()
|
void |
draw(SimGraphics g)
Used by the GUI to Draw this Agent on the Landscape Grid. |
protected void |
finalize()
Cleans up this object when it is removed from the simulation |
int |
getClutchSize()
Getter for property clutchSize. |
int |
getCurrentAge()
Getter for property currentAge. |
double |
getDispersalDistance()
Getter for property dispersalDistance. |
double |
getReproductionProbability()
Getter for property reproductionProbability. |
int |
getSearchTime()
Getter for property searchTime. |
double |
getSurvivalProbability()
Getter for property survivalProbability. |
void |
setClutchSize(int clutchSize)
Setter for property clutchSize. |
void |
setCurrentAge(int currentAge)
Setter for property currentAge. |
void |
setDispersalAngleGenerator(edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
Setter for property dispersalDistance. |
void |
setDispersalDistance(double dispersalDistance,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
Setter for property dispersalDistance. |
void |
setReproductionProbability(double reproductionProbability,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
Setter for property reproductionProbability. |
void |
setSearchTime(int searchTime)
Setter for property searchTime. |
void |
setSurvivalProbability(double survivalProbability,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
Setter for property survivalProbability. |
void |
step()
Step iterates this agent, behaviors this agent will perform are executed here. |
| Methods inherited from class org.mrd.model.Agent |
getLandscape, getModel, getStage, getX, getY, setLandscape, setLocation, setModel |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
currentAge
private int currentAge
- Holds value of property currentAge.
survival
private org.mrd.random.Bernoulli survival
- Holds value of property survival (Survival Bernoulli Trail Generator).
reproduction
private org.mrd.random.Bernoulli reproduction
- Holds value of property reproduction (Reproduction Bernoulli Trail Generator).
distance
private Poisson distance
- Holds value of property distance (Dispersal Distance Poisson Trail Generator..
dispersalDistance
private double dispersalDistance
- Holds value of property dispersalDistance.
searchTime
private int searchTime
- Holds value of property searchTime.
clutchSize
private int clutchSize
- Holds value of property clutchSize.
angles
private Uniform angles
| Constructor Detail |
Pair
public Pair()
- Constructs a New Pair in this Landscape and Model/
| Method Detail |
finalize
protected void finalize()
throws java.lang.Throwable
- Cleans up this object when it is removed from the simulation
disperse
public java.awt.Point disperse()
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 survivalProbability,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
- 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 reproductionProbability,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
- Setter for property reproductionProbability.
getSearchTime
public int getSearchTime()
- Getter for property searchTime.
setSearchTime
public void setSearchTime(int searchTime)
- Setter for property searchTime.
getDispersalDistance
public double getDispersalDistance()
- Getter for property dispersalDistance.
setDispersalDistance
public void setDispersalDistance(double dispersalDistance,
edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
- Setter for property dispersalDistance.
setDispersalAngleGenerator
public void setDispersalAngleGenerator(edu.cornell.lassp.houle.RngPack.RandomElement randomGenerator)
- 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.
|
|||||||||
| Home >> All >> org >> mrd >> examples >> [ simple overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC