uk.ac.leeds.ccg.andyt.projects.genesis.process
Class AbstractTrafficModel
java.lang.Object
uk.ac.leeds.ccg.andyt.projects.genesis.process.Abstract_GENESIS_Model
uk.ac.leeds.ccg.andyt.projects.genesis.process.AbstractTrafficModel
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Traffic_Leeds_0, Traffic_Taipei_0
public abstract class AbstractTrafficModel
- extends Abstract_GENESIS_Model
- See Also:
- Serialized Form
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.process.Abstract_GENESIS_Model |
_Directory, _GENESIS_AgentCollectionManager, _GENESIS_Environment, _HandleOutOfMemoryError, _ImageExporter, _InitialRandomSeed, _Input_Parameter_File, _NextRandomSeed, _RandomArray, _RandomSeed, _RandomSeedIncrement, _ResultDataDirectory_File, executorService |
Method Summary |
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D |
get_OSGB_To_LatLon_Point2D(uk.ac.leeds.ccg.andyt.projects.moses.io.CASAreaEastingNorthingDataRecord a_CASAreaEastingNorthingDataRecord,
int a_DecimalPlacePrecision)
|
java.lang.Object[] |
getCellBoundaryIntersection(GENESIS_Person aPerson,
long aPersonPoint2DRowIndex,
long aPersonPoint2DColIndex,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCellDouble,
int a_DecimalPlacePrecision)
|
GENESIS_Female |
getFemale(java.lang.Long a_Agent_ID,
boolean handleOutOfMemoryError)
|
protected GENESIS_Female |
getFemale(java.lang.Long a_Agent_ID,
GENESIS_FemaleCollection a_GENESIS_FemaleCollection)
|
GENESIS_Female |
getFemale(java.lang.Long a_Agent_ID,
GENESIS_FemaleCollection a_GENESIS_FemaleCollection,
GENESIS_AgentCollectionManager a_GENESIS_AgentCollectionManager,
boolean handleOutOfMemoryError)
|
GENESIS_Male |
getMale(java.lang.Long a_Agent_ID,
boolean handleOutOfMemoryError)
|
protected GENESIS_Male |
getMale(java.lang.Long a_Agent_ID,
GENESIS_MaleCollection a_GENESIS_MaleCollection)
|
GENESIS_Male |
getMale(java.lang.Long a_Agent_ID,
GENESIS_MaleCollection a_GENESIS_MaleCollection,
GENESIS_AgentCollectionManager a_GENESIS_AgentCollectionManager,
boolean handleOutOfMemoryError)
|
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D |
getRandomAdjoiningCellPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D)
567 3*4 012 |
protected void |
init_Rounding(java.math.BigDecimal cellsize_BigDecimal,
java.math.BigDecimal minx,
java.math.BigDecimal miny)
|
void |
init_Rounding(java.math.BigDecimal cellsize_BigDecimal,
java.math.BigDecimal minx,
java.math.BigDecimal miny,
boolean handleOutOfMemoryError)
|
void |
init_Shifts()
Shiftwork: Shift 0: 0-12 Shift 1: 6-18 Shift 2: 12-24 Shift 3: 18-6 |
void |
init_Shifts(boolean handleOutOfMemoryError)
|
abstract void |
simulate()
|
void |
simulateMovement()
Work needed here: Split into movement while at work, movement to work and
movement home from work and movement around home. |
void |
visualiseNetworkOnGrid(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
java.io.File a_Directory)
|
void |
visualiseNetworkOnGrid(java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
java.io.File a_Directory)
|
void |
visualiseNetworkOnGrid1(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D a_VectorEnvelope)
|
void |
visualiseNetworkOnGrid1(java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D a_VectorEnvelope)
|
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.process.Abstract_GENESIS_Model |
get_NextRandom, get_NextRandomSeed, get_Random, get_RandomArray, get_RandomArray, get_RandomArrayMinLength, getExecutorService, getFileThatExists, getLogger, init_Environment, init_RandomArrayMinLength, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_MalePopulation_HashSet
public java.util.HashSet<java.lang.Long> _MalePopulation_HashSet
_FemalePopulation_HashSet
public java.util.HashSet<java.lang.Long> _FemalePopulation_HashSet
_PersonFactory
public GENESIS_PersonFactory _PersonFactory
_SpeedDefault_BigDecimal
public java.math.BigDecimal _SpeedDefault_BigDecimal
_Shifts
public java.util.HashMap _Shifts
- Keys are integers between 0 and 11 inclusive Values are start and end
times for shift work
AbstractTrafficModel
public AbstractTrafficModel()
init_Rounding
public void init_Rounding(java.math.BigDecimal cellsize_BigDecimal,
java.math.BigDecimal minx,
java.math.BigDecimal miny,
boolean handleOutOfMemoryError)
init_Rounding
protected void init_Rounding(java.math.BigDecimal cellsize_BigDecimal,
java.math.BigDecimal minx,
java.math.BigDecimal miny)
simulate
public abstract void simulate()
getFemale
public GENESIS_Female getFemale(java.lang.Long a_Agent_ID,
boolean handleOutOfMemoryError)
getMale
public GENESIS_Male getMale(java.lang.Long a_Agent_ID,
boolean handleOutOfMemoryError)
getFemale
protected GENESIS_Female getFemale(java.lang.Long a_Agent_ID,
GENESIS_FemaleCollection a_GENESIS_FemaleCollection)
getMale
protected GENESIS_Male getMale(java.lang.Long a_Agent_ID,
GENESIS_MaleCollection a_GENESIS_MaleCollection)
getFemale
public GENESIS_Female getFemale(java.lang.Long a_Agent_ID,
GENESIS_FemaleCollection a_GENESIS_FemaleCollection,
GENESIS_AgentCollectionManager a_GENESIS_AgentCollectionManager,
boolean handleOutOfMemoryError)
getMale
public GENESIS_Male getMale(java.lang.Long a_Agent_ID,
GENESIS_MaleCollection a_GENESIS_MaleCollection,
GENESIS_AgentCollectionManager a_GENESIS_AgentCollectionManager,
boolean handleOutOfMemoryError)
visualiseNetworkOnGrid
public void visualiseNetworkOnGrid(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
java.io.File a_Directory)
visualiseNetworkOnGrid
public void visualiseNetworkOnGrid(java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
java.io.File a_Directory)
visualiseNetworkOnGrid1
public void visualiseNetworkOnGrid1(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D a_VectorEnvelope)
- Parameters:
a_Network2D_HashSet
- a_Grid2DSquareCell
- The grid to visualise on.
visualiseNetworkOnGrid1
public void visualiseNetworkOnGrid1(java.util.HashSet<uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D> a_Network2D_HashSet,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D a_VectorEnvelope)
- Parameters:
a_Network2D_HashSet
- a_Grid2DSquareCell
- The grid to visualise on.
simulateMovement
public void simulateMovement()
- Work needed here: Split into movement while at work, movement to work and
movement home from work and movement around home. At the moment only one
mode of movement implemented... Need to simplify this code (split into
smaller methods)
Move people around in the environment. Each person has a location and a
heading and a _Speed. People either get to where they are heading and
stop, or set off somewhere else, or they just move to where they are
heading at their given _Speed and don't make it. Each movement is
accounted for in a persons _Network2D once they reach a heading. The time
a person spends in a cell is accounted for in an aggregate form in
_AggregatePopulationDensity_Grid2DSquareCellDouble.
Movement is restricted to a grid network. Other than this as yet the
movement is not contrained in that all people can move down the same part
of the network in any tick.
A development s to constrain for maximum flow. This might involve
implementing some form of queue. To do this a radical refactor may be
required... At the same time variable _Speed should be handled...
getRandomAdjoiningCellPoint2D
public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandomAdjoiningCellPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D)
- 567 3*4 012
get_OSGB_To_LatLon_Point2D
public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D get_OSGB_To_LatLon_Point2D(uk.ac.leeds.ccg.andyt.projects.moses.io.CASAreaEastingNorthingDataRecord a_CASAreaEastingNorthingDataRecord,
int a_DecimalPlacePrecision)
- Parameters:
a_CASAreaEastingNorthingDataRecord
- a_DecimalPlacePrecision
-
- Returns:
getCellBoundaryIntersection
public java.lang.Object[] getCellBoundaryIntersection(GENESIS_Person aPerson,
long aPersonPoint2DRowIndex,
long aPersonPoint2DColIndex,
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCellDouble,
int a_DecimalPlacePrecision)
init_Shifts
public void init_Shifts(boolean handleOutOfMemoryError)
init_Shifts
public void init_Shifts()
- Shiftwork: Shift 0: 0-12 Shift 1: 6-18 Shift 2: 12-24 Shift 3: 18-6