|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_OutOfMemoryErrorHandler uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_Environment
public class GENESIS_Environment
A general class to be instantiated and the Object accessible from all GENESIS components for access to general factories and other Objects and memory handling methods.
Field Summary | |
---|---|
Abstract_GENESIS_Model |
_AbstractModel
Always initialised |
int |
_DecimalPlacePrecisionForCalculations
|
int |
_DecimalPlacePrecisionForNetwork
|
int |
_DecimalPlacePrecisionForNetworkCalculations
|
java.io.File |
_Directory
|
uk.ac.leeds.ccg.andyt.generic.math.Generic_BigDecimal |
_Generic_BigDecimal
For mathematical uses |
GENESIS_AgentEnvironment |
_GENESIS_AgentEnvironment
|
uk.ac.leeds.ccg.andyt.grids.core.Grids_Environment |
_Grids_Environment
A store and reference for all AbstractGrid2DSquareCell |
GENESIS_Time |
_initial_Time
|
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble |
_network_Grid2DSquareCellDouble
An example of a network grid for tidy coding. |
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory |
_network_Grid2DSquareCellDoubleFactory
A factory for creating Grid2DSquareCellDouble of network dimensions |
GENESIS_PersonFactory |
_PersonFactory
|
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble |
_reporting_Grid2DSquareCellDouble
An example of a reporting grid for tidy coding. |
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory |
_reporting_Grid2DSquareCellDoubleFactory
A factory for creating Grid2DSquareCellDouble of reporting dimensions |
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D |
_reporting_VectorEnvelope2D
For storing the Envelope containing reporting grids. |
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble |
_reportingPopulationDensity_Grid2DSquareCellDouble
A grid for storing Population Density at any tick. |
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble |
_reportingPopulationDensityAggregate_Grid2DSquareCellDouble
A grid for storing cumulative Population Density. |
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble |
_reportingPopulationDensityMovingAggregate_Grid2DSquareCellDouble
A grid for storing cumulative Population Density of people that are moving. |
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell |
_Resource_Grid2DSquareCellDouble
|
java.util.HashSet<AbstractResource> |
_Resource_HashSet
|
GENESIS_Time |
_Time
|
java.math.BigDecimal |
_ToRoundToX_BigDecimal
|
java.math.BigDecimal |
_ToRoundToY_BigDecimal
|
TSMisc |
_TSMisc
|
static int |
DecimalPlacePrecisionForPopulationProbabilities
|
static java.math.MathContext |
MathContextForPopulationProbabilities
|
static java.math.RoundingMode |
RoundingModeForPopulationProbabilities
|
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_OutOfMemoryErrorHandler |
---|
Memory_Threshold |
Fields inherited from class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler |
---|
_Generic_TestMemory, _HandleOutOfMemoryError_boolean, _MemoryReserve, Default_Memory_Threshold, HandleOutOfMemoryErrorFalse, HandleOutOfMemoryErrorTrue |
Fields inherited from interface uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_OutOfMemoryErrorHandlerInterface |
---|
serialVersionUID |
Constructor Summary | |
---|---|
GENESIS_Environment()
|
|
GENESIS_Environment(Abstract_GENESIS_Model a_Model,
GENESIS_Time a_Time)
|
|
GENESIS_Environment(Abstract_GENESIS_Model a_Model,
GENESIS_Time a_Time,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory a_Grid2DSquareCellDoubleFactory,
boolean handleOutOfMemoryError)
Deprecated. |
|
GENESIS_Environment(Abstract_GENESIS_Model a_Model,
GENESIS_Time _Time,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory _Grid2DSquareCellDoubleFactory,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _World_Grid2DSquareCellDouble,
boolean handleOutOfMemoryError)
Deprecated. |
|
GENESIS_Environment(Abstract_GENESIS_Model a_Model,
GENESIS_Time a_Time,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory network_Grid2DSquareCellDoubleFactory,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory reporting_Grid2DSquareCellDoubleFactory,
boolean handleOutOfMemoryError)
|
|
GENESIS_Environment(GENESIS_Environment a_GENESIS_Environment)
Creates a new GENESIS_Environment based on a_GENESIS_Environment. |
|
GENESIS_Environment(java.util.logging.Logger logger)
|
Method Summary | |
---|---|
protected java.io.File |
get_Directory()
|
java.io.File |
get_Directory(boolean handleOutOfMemoryError)
|
uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D |
get_reporting_VectorEnvelope2D()
|
static int |
getDefaultMaximumNumberOfObjectsPerDirectory()
|
AbstractTrafficModel |
getTrafficModel()
|
long |
init_MemoryReserve_AccountAgentCollections(boolean handleOutOfMemoryError)
|
java.lang.Object[] |
init_MemoryReserve_AccountDetailAgentCollections(boolean handleOutOfMemoryError)
|
void |
init_MemoryReserve(boolean handleOutOfMemoryError)
Initialises _MemoryReserve. |
void |
init_MemoryReserve(GENESIS_FemaleCollection a_GENESIS_FemaleCollection,
boolean handleOutOfMemoryError)
|
void |
init_MemoryReserve(GENESIS_MaleCollection a_GENESIS_MaleCollection,
boolean handleOutOfMemoryError)
|
protected long |
swapToFile_AgentCollection_Account()
|
long |
swapToFile_AgentCollection_Account(boolean handleOutOfMemoryError)
|
protected long |
swapToFile_AgentCollections_Account()
|
long |
swapToFile_AgentCollections_Account(boolean handleOutOfMemoryError)
|
void |
swapToFile_AgentCollections(boolean handleOutOfMemoryError)
|
void |
swapToFile_Data()
|
boolean |
swapToFile_DataAny()
|
boolean |
swapToFile_DataAny(boolean handleOutOfMemoryError)
|
protected boolean |
swapToFile_DataAnyExcept(GENESIS_FemaleCollection a_GENESIS_FemaleCollection)
|
boolean |
swapToFile_DataAnyExcept(GENESIS_FemaleCollection a_GENESIS_FemaleCollection,
boolean handleOutOfMemoryError)
|
protected boolean |
swapToFile_DataAnyExcept(GENESIS_MaleCollection a_GENESIS_MaleCollection)
|
boolean |
swapToFile_DataAnyExcept(GENESIS_MaleCollection a_GENESIS_MaleCollection,
boolean handleOutOfMemoryError)
|
protected long |
swapToFile_Grid2DSquareCellChunk_Account()
|
protected void |
swapToFile_Grid2DSquareCellChunk()
Not needed, but makes code tidier and probably adds little in terms of overhead... |
void |
swapToFile_Grid2DSquareCellChunk(boolean handleOutOfMemoryError)
|
protected long |
swapToFile_Grid2DSquareCellChunks_Account()
|
long |
swapToFile_Grid2DSquareCellChunks_Account(boolean handleOutOfMemoryError)
|
protected void |
swapToFile_Grid2DSquareCellChunks()
|
void |
swapToFile_Grid2DSquareCellChunks(boolean handleOutOfMemoryError)
|
protected java.lang.Object[] |
tryToEnsureThereIsEnoughMemoryToContinue_AccountAgentCollections()
|
long |
tryToEnsureThereIsEnoughMemoryToContinue_AccountAgentCollections(boolean handleOutOfMemoryError)
|
protected java.lang.Object[] |
tryToEnsureThereIsEnoughMemoryToContinue_AccountDetailAgentCollections()
A method to try to ensure there is enough memory to continue whilst accounting any Agent collections that are swapped in the process. |
java.lang.Object[] |
tryToEnsureThereIsEnoughMemoryToContinue_AccountDetailAgentCollections(boolean handleOutOfMemoryError)
A method to ensure there is enough memory to continue that returns a HashSet |
protected boolean |
tryToEnsureThereIsEnoughMemoryToContinue()
A method to try to ensure there is enough memory to continue. |
boolean |
tryToEnsureThereIsEnoughMemoryToContinue(boolean handleOutOfMemoryError)
A method to ensure there is enough memory to continue. |
protected boolean |
tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_FemaleCollection a_FemaleCollection)
A method to ensure there is enough memory to continue whilst not swapping to disk a_GENESIS_FemaleCollection. |
void |
tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_FemaleCollection a_GENESIS_FemaleCollection,
boolean handleOutOfMemoryError)
A method to ensure there is enough memory to continue whilst not swapping to disk a_GENESIS_FemaleCollection |
protected boolean |
tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_MaleCollection a_MaleCollection)
A method to ensure there is enough memory to continue whilst not swapping to disk a_GENESIS_MaleCollection. |
void |
tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_MaleCollection a_GENESIS_MaleCollection,
boolean handleOutOfMemoryError)
A method to ensure there is enough memory to continue whilst not swapping to disk a_GENESIS_MaleCollection |
Methods inherited from class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler |
---|
clear_MemoryReserve, get_Generic_TestMemory, get_MemoryReserve, getRuntime, getTotalFreeMemory, getTotalFreeMemory, init_MemoryReserve, init_MemoryReserve, initFile, initFile, initFileDirectory, initString, initString, println, set_MemoryReserve, sin, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.io.File _Directory
public transient Abstract_GENESIS_Model _AbstractModel
public transient GENESIS_PersonFactory _PersonFactory
public transient GENESIS_AgentEnvironment _GENESIS_AgentEnvironment
public transient uk.ac.leeds.ccg.andyt.generic.math.Generic_BigDecimal _Generic_BigDecimal
public transient uk.ac.leeds.ccg.andyt.grids.core.Grids_Environment _Grids_Environment
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory _reporting_Grid2DSquareCellDoubleFactory
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _reporting_Grid2DSquareCellDouble
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _reportingPopulationDensity_Grid2DSquareCellDouble
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _reportingPopulationDensityAggregate_Grid2DSquareCellDouble
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _reportingPopulationDensityMovingAggregate_Grid2DSquareCellDouble
public transient uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D _reporting_VectorEnvelope2D
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory _network_Grid2DSquareCellDoubleFactory
public transient uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _network_Grid2DSquareCellDouble
public static final int DecimalPlacePrecisionForPopulationProbabilities
public static final java.math.RoundingMode RoundingModeForPopulationProbabilities
public static final java.math.MathContext MathContextForPopulationProbabilities
public int _DecimalPlacePrecisionForCalculations
public int _DecimalPlacePrecisionForNetworkCalculations
public int _DecimalPlacePrecisionForNetwork
public java.math.BigDecimal _ToRoundToX_BigDecimal
public java.math.BigDecimal _ToRoundToY_BigDecimal
public transient uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell _Resource_Grid2DSquareCellDouble
public GENESIS_Time _Time
public GENESIS_Time _initial_Time
public transient java.util.HashSet<AbstractResource> _Resource_HashSet
public transient TSMisc _TSMisc
Constructor Detail |
---|
public GENESIS_Environment()
public GENESIS_Environment(java.util.logging.Logger logger)
public GENESIS_Environment(GENESIS_Environment a_GENESIS_Environment)
a_GENESIS_Environment
- The _GENESIS_Environment to deep copy.public GENESIS_Environment(Abstract_GENESIS_Model a_Model, GENESIS_Time a_Time)
public GENESIS_Environment(Abstract_GENESIS_Model a_Model, GENESIS_Time a_Time, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory network_Grid2DSquareCellDoubleFactory, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory reporting_Grid2DSquareCellDoubleFactory, boolean handleOutOfMemoryError)
@Deprecated public GENESIS_Environment(Abstract_GENESIS_Model a_Model, GENESIS_Time a_Time, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory a_Grid2DSquareCellDoubleFactory, boolean handleOutOfMemoryError)
a_Model
- a_Time
- a_Grid2DSquareCellDoubleFactory
- handleOutOfMemoryError
- @Deprecated public GENESIS_Environment(Abstract_GENESIS_Model a_Model, GENESIS_Time _Time, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory _Grid2DSquareCellDoubleFactory, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble _World_Grid2DSquareCellDouble, boolean handleOutOfMemoryError)
Method Detail |
---|
public AbstractTrafficModel getTrafficModel()
public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D get_reporting_VectorEnvelope2D()
public void init_MemoryReserve(boolean handleOutOfMemoryError)
GENESIS_OutOfMemoryErrorHandlerInterface
init_MemoryReserve
in interface GENESIS_OutOfMemoryErrorHandlerInterface
init_MemoryReserve
in class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler
public long init_MemoryReserve_AccountAgentCollections(boolean handleOutOfMemoryError)
public java.lang.Object[] init_MemoryReserve_AccountDetailAgentCollections(boolean handleOutOfMemoryError)
handleOutOfMemoryError
-
public final void init_MemoryReserve(GENESIS_FemaleCollection a_GENESIS_FemaleCollection, boolean handleOutOfMemoryError)
public final void init_MemoryReserve(GENESIS_MaleCollection a_GENESIS_MaleCollection, boolean handleOutOfMemoryError)
public static int getDefaultMaximumNumberOfObjectsPerDirectory()
public boolean swapToFile_DataAny(boolean handleOutOfMemoryError)
swapToFile_DataAny
in class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler
public boolean swapToFile_DataAny()
swapToFile_DataAny
in class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler
public boolean swapToFile_DataAnyExcept(GENESIS_FemaleCollection a_GENESIS_FemaleCollection, boolean handleOutOfMemoryError)
public boolean swapToFile_DataAnyExcept(GENESIS_MaleCollection a_GENESIS_MaleCollection, boolean handleOutOfMemoryError)
protected boolean swapToFile_DataAnyExcept(GENESIS_MaleCollection a_GENESIS_MaleCollection)
protected boolean swapToFile_DataAnyExcept(GENESIS_FemaleCollection a_GENESIS_FemaleCollection)
public void swapToFile_Data()
public void swapToFile_Grid2DSquareCellChunks(boolean handleOutOfMemoryError)
protected void swapToFile_Grid2DSquareCellChunks()
public long swapToFile_Grid2DSquareCellChunks_Account(boolean handleOutOfMemoryError)
protected long swapToFile_Grid2DSquareCellChunks_Account()
protected long swapToFile_Grid2DSquareCellChunk_Account()
public void swapToFile_Grid2DSquareCellChunk(boolean handleOutOfMemoryError)
protected void swapToFile_Grid2DSquareCellChunk()
public void swapToFile_AgentCollections(boolean handleOutOfMemoryError)
public long swapToFile_AgentCollections_Account(boolean handleOutOfMemoryError)
protected long swapToFile_AgentCollections_Account()
public long swapToFile_AgentCollection_Account(boolean handleOutOfMemoryError)
protected long swapToFile_AgentCollection_Account()
public boolean tryToEnsureThereIsEnoughMemoryToContinue(boolean handleOutOfMemoryError)
tryToEnsureThereIsEnoughMemoryToContinue
in interface GENESIS_OutOfMemoryErrorHandlerInterface
tryToEnsureThereIsEnoughMemoryToContinue
in class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler
handleOutOfMemoryError
- protected boolean tryToEnsureThereIsEnoughMemoryToContinue()
tryToEnsureThereIsEnoughMemoryToContinue
in class uk.ac.leeds.ccg.andyt.generic.memory.Generic_OutOfMemoryErrorHandler
public void tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_FemaleCollection a_GENESIS_FemaleCollection, boolean handleOutOfMemoryError)
a_GENESIS_FemaleCollection
- An FemaleCollection not to be swapped.handleOutOfMemoryError
- public void tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_MaleCollection a_GENESIS_MaleCollection, boolean handleOutOfMemoryError)
a_GENESIS_MaleCollection
- An MaleCollection not to be swapped.handleOutOfMemoryError
- protected boolean tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_FemaleCollection a_FemaleCollection)
a_GENESIS_AgentCollection
- An AgentCollection not to be swapped.protected boolean tryToEnsureThereIsEnoughMemoryToContinue(GENESIS_MaleCollection a_MaleCollection)
a_GENESIS_AgentCollection
- An AgentCollection not to be swapped.public long tryToEnsureThereIsEnoughMemoryToContinue_AccountAgentCollections(boolean handleOutOfMemoryError)
protected java.lang.Object[] tryToEnsureThereIsEnoughMemoryToContinue_AccountAgentCollections()
public java.lang.Object[] tryToEnsureThereIsEnoughMemoryToContinue_AccountDetailAgentCollections(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- protected java.lang.Object[] tryToEnsureThereIsEnoughMemoryToContinue_AccountDetailAgentCollections()
public java.io.File get_Directory(boolean handleOutOfMemoryError)
protected java.io.File get_Directory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |