uk.ac.leeds.ccg.andyt.projects.genesis.core
Class GENESIS_Person

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_Agent
      extended by uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_Person
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GENESIS_Female, GENESIS_Male

public abstract class GENESIS_Person
extends GENESIS_Agent

Class for representing individual people.

See Also:
Serialized Form

Field Summary
protected  GENESIS_Age _Age
          A record of the time of birth of this person
 java.util.Calendar _Birth_Calendar
          A record of the time of birth of this person
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Birth_Point2D
          Provides the location at which this GENESIS_Person was born.
protected  java.lang.Long _Collection_ID
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Death_Point2D
          Provides the location at which this GENESIS_Person dies/died.
 GENESIS_Time _Death_Time
          A record of the time of death of this person.
protected  java.io.File _Directory
          Directory for storing information about this.
 Family _Family
          Stores a reference to the Family of this GENESIS_Person
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Heading_Point2D
          Stores the next network location where the person is heading.
 Household _Household
          Stores the GENESIS_Person's household which is information about where and with who the GENESIS_Person resides.
 java.lang.Object _HouseholdHistory
           
protected  java.lang.Long _ID
          A unique numerical ID for this
 Movement _Movement
          Stores current Movement of GENESIS_Person from an origin through all network locations to a destination.
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _Network2D
          Stores the persons network along which they have headed.
 java.math.BigDecimal _personalFertility_BigDecimal
           
 java.math.BigDecimal _personalMortality_BigDecimal
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D
          Stores the location of the GENESIS_Person.
protected  uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Previous_Point2D
          Stores a previous location.
 uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell.CellID _reporting_CellID
          For storing the _Environment._reportingGrid CellID
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _reporting_VectorNetwork2D
          Stores the persons network along which they have headed.
 java.util.ArrayList<java.lang.String> _ResidentialSubregionIDs
           
 double _resource_double
          Stores a measure of how much resource a GENESIS_Person has
 double _resourceMax_double
           
 GENESIS_Time _SetOffToWork_0_Time
          GENESIS_Time set of for work previously.
 GENESIS_Time _SetOffToWork_Time
          GENESIS_Time set of for work.
 java.math.BigDecimal _Speed_BigDecimal
          Stores the _Speed at which a person is moving.
 double _Speed_double
           
 java.math.BigDecimal _SpeedDefault_BigDecimal
          Stores the _Speed at which a person moves by default if they are moving.
 double _SpeedDefault_double
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Work_Point2D
          Stores work location.
 GENESIS_Time[] _Work_Time
          If a GENESIS_Person has just one period of work per day _Time_Work should have length == 2.
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_Agent
_GENESIS_AgentCollectionManager, _GENESIS_Environment, _Type
 
Constructor Summary
GENESIS_Person()
           
 
Method Summary
 GENESIS_Age get_Age()
           
protected abstract  int get_Gender()
           
abstract  int get_Gender(boolean handleOutOfMemoryError)
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D get_Previous_Point2D()
          return _Previous_Point2D;
protected  GENESIS_Time[] get_Work_Time()
           
 GENESIS_Age getAge()
           
 boolean getIsBirthday()
           
 boolean getIsTimeToSetOfToWork()
           
protected  boolean getIsWorkTime()
          Default to false.
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D.Connection getNextConnectionOnRoute()
          Convenience method for getting a next connection on a route.
 java.lang.String getPreviousRegionID()
           
 java.lang.String getPreviousSubregionID()
           
 java.lang.String getRegionID()
           
 java.lang.String getSubregionID()
           
static java.lang.String getTypeDeadFemale_String()
           
static java.lang.String getTypeDeadMale_String()
           
static java.lang.String getTypeLivingFemale_String()
           
static java.lang.String getTypeLivingMale_String()
           
 void init(GENESIS_Person a_Person)
           
 boolean isAlive(GENESIS_Time a_Time)
           
protected static void log(java.util.logging.Level level, java.lang.String message)
           
protected static void log(java.lang.String message)
           
protected  java.math.BigDecimal move()
           
 java.math.BigDecimal move(java.math.BigDecimal distance_BigDecimal)
          Attempts to move person a set distance and return it.
 void move(boolean handleOutOfMemoryError)
           
 void set_Death_Time(GENESIS_Time _Time_Death)
           
 void set_Heading_Point2D(java.math.BigDecimal distance0_BigDecimal)
          Sets a_Person._Heading_Point2D using next connection on route.
 void set_Previous_Point2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D)
          this._Previous_Point2D = new Vector_Point2D(a_Point2D);
 void setMovement()
           
 java.lang.String toString()
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_Agent
get_Agent_ID, get_AgentCollection, get_AgentCollectionManager, get_Directory, getType, setType, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_ResidentialSubregionIDs

public java.util.ArrayList<java.lang.String> _ResidentialSubregionIDs

_ID

protected java.lang.Long _ID
A unique numerical ID for this


_Collection_ID

protected java.lang.Long _Collection_ID

_Directory

protected java.io.File _Directory
Directory for storing information about this. If this is null, it can be retrieved using _ID from: _GENESIS_FemaleCollection._Agent_ID_Agent_HashMap


_Birth_Calendar

public java.util.Calendar _Birth_Calendar
A record of the time of birth of this person


_Age

protected GENESIS_Age _Age
A record of the time of birth of this person


_Death_Time

public GENESIS_Time _Death_Time
A record of the time of death of this person. If this is null then the GENESIS_Person can be assumed not to dead.


_Birth_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Birth_Point2D
Provides the location at which this GENESIS_Person was born. This is probably referred to very infrequently and might best be stored in a File.


_Death_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Death_Point2D
Provides the location at which this GENESIS_Person dies/died. As with _Time_Death, this is null if and only if the GENESIS_Person is not dead.


_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D
Stores the location of the GENESIS_Person.


_Previous_Point2D

protected uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Previous_Point2D
Stores a previous location.


_reporting_CellID

public uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell.CellID _reporting_CellID
For storing the _Environment._reportingGrid CellID


_Heading_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Heading_Point2D
Stores the next network location where the person is heading.


_Movement

public Movement _Movement
Stores current Movement of GENESIS_Person from an origin through all network locations to a destination. Might be heavy, so this might be best stored in a File in _Directory.


_Network2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _Network2D
Stores the persons network along which they have headed. Might be heavy, so this might be best stored in a File in _Directory.


_reporting_VectorNetwork2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _reporting_VectorNetwork2D
Stores the persons network along which they have headed. Might be heavy, so this might be best stored in a File in _Directory.


_Family

public Family _Family
Stores a reference to the Family of this GENESIS_Person


_Household

public Household _Household
Stores the GENESIS_Person's household which is information about where and with who the GENESIS_Person resides. Currently each GENESIS_Person has just one household at a time.


_Work_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Work_Point2D
Stores work location. Perhaps need an ordered collection of meetings... This would combine locations and times and perhaps other things, e.g. reference to the other people and things expected to be involved...


_Speed_BigDecimal

public java.math.BigDecimal _Speed_BigDecimal
Stores the _Speed at which a person is moving.


_Speed_double

public double _Speed_double

_SpeedDefault_BigDecimal

public java.math.BigDecimal _SpeedDefault_BigDecimal
Stores the _Speed at which a person moves by default if they are moving.


_SpeedDefault_double

public double _SpeedDefault_double

_Work_Time

public GENESIS_Time[] _Work_Time
If a GENESIS_Person has just one period of work per day _Time_Work should have length == 2. The first time is the start time, the second time is the end time for a period of work.


_SetOffToWork_Time

public GENESIS_Time _SetOffToWork_Time
GENESIS_Time set of for work.


_SetOffToWork_0_Time

public GENESIS_Time _SetOffToWork_0_Time
GENESIS_Time set of for work previously.


_HouseholdHistory

public java.lang.Object _HouseholdHistory

_personalFertility_BigDecimal

public java.math.BigDecimal _personalFertility_BigDecimal

_personalMortality_BigDecimal

public java.math.BigDecimal _personalMortality_BigDecimal

_resource_double

public double _resource_double
Stores a measure of how much resource a GENESIS_Person has


_resourceMax_double

public double _resourceMax_double
Constructor Detail

GENESIS_Person

public GENESIS_Person()
Method Detail

getRegionID

public java.lang.String getRegionID()

getSubregionID

public java.lang.String getSubregionID()

getPreviousRegionID

public java.lang.String getPreviousRegionID()

getPreviousSubregionID

public java.lang.String getPreviousSubregionID()

getTypeLivingFemale_String

public static java.lang.String getTypeLivingFemale_String()
Returns:
the TypeLivingFemale_String

getTypeDeadFemale_String

public static java.lang.String getTypeDeadFemale_String()
Returns:
the TypeDeadFemale_String

getTypeLivingMale_String

public static java.lang.String getTypeLivingMale_String()
Returns:
the TypeLivingMale_String

getTypeDeadMale_String

public static java.lang.String getTypeDeadMale_String()
Returns:
the TypeDeadMale_String

init

public void init(GENESIS_Person a_Person)

get_Previous_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D get_Previous_Point2D()
return _Previous_Point2D;

Returns:

set_Previous_Point2D

public void set_Previous_Point2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D)
this._Previous_Point2D = new Vector_Point2D(a_Point2D);

Parameters:
a_Point2D -

set_Death_Time

public void set_Death_Time(GENESIS_Time _Time_Death)

setMovement

public void setMovement()
Parameters:
a_DecimalPlacePrecision -
toRoundToX_BigDecimal -
toRoundToY_BigDecimal -

get_Gender

public abstract int get_Gender(boolean handleOutOfMemoryError)

get_Gender

protected abstract int get_Gender()

getAge

public GENESIS_Age getAge()
Returns:
Copy of _Age.

get_Age

public GENESIS_Age get_Age()
Returns:
_Age.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
description of this.

getIsBirthday

public boolean getIsBirthday()
Returns:
true if _Birth_Time.getDayOfYear() == _GENESIS_Environment._Time.getDayOfYear() &TODO deal with leap years. _GENESIS_Environment._Time._DayOfYear

get_Work_Time

protected GENESIS_Time[] get_Work_Time()

getIsWorkTime

protected boolean getIsWorkTime()
Default to false.

Returns:
true if this person is supposed to be working...

getIsTimeToSetOfToWork

public boolean getIsTimeToSetOfToWork()
Returns:
true if it is the time this person is supposed to set off to work (from home)...

getNextConnectionOnRoute

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D.Connection getNextConnectionOnRoute()
Convenience method for getting a next connection on a route. This currently does not distinguish between Connection Type

Returns:
A next Connection on the _networkRoute_VectorNetwork2D if there is one and null otherwise.

move

public void move(boolean handleOutOfMemoryError)

move

protected java.math.BigDecimal move()
Parameters:
_AggregatePopulationDensity_Grid2DSquareCellDouble -

move

public java.math.BigDecimal move(java.math.BigDecimal distance_BigDecimal)
Attempts to move person a set distance and return it. If destination is reached then the distance to that destination is returned and the movement is halted.

Parameters:
distance_BigDecimal -
Returns:

set_Heading_Point2D

public void set_Heading_Point2D(java.math.BigDecimal distance0_BigDecimal)
Sets a_Person._Heading_Point2D using next connection on route. If no further connection on route set new movement.


isAlive

public boolean isAlive(GENESIS_Time a_Time)

log

protected static void log(java.lang.String message)

log

protected static void log(java.util.logging.Level level,
                          java.lang.String message)