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

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

public abstract class GENESIS_Agent
extends java.lang.Object
implements java.io.Serializable

To create and Agent first an AgentCollection is needed. A reference to this AgentCollection is set in the Agent. Agents may be stored on disk in a File store. The File can be found from a numerical identifier _Agent_ID. So if the Agent does not exist in memory it can be loaded from a File.

See Also:
Serialized Form

Field Summary
 GENESIS_AgentCollectionManager _GENESIS_AgentCollectionManager
           
 GENESIS_Environment _GENESIS_Environment
          A reference to the GENESIS_Environment of this simulation.
protected  java.lang.String _Type
          For storing the type of GENESIS_Agent
 
Constructor Summary
GENESIS_Agent()
           
 
Method Summary
abstract  java.lang.Long get_Agent_ID(boolean handleOutOfMemoryError)
           
protected abstract  GENESIS_AgentCollection get_AgentCollection()
           
protected  GENESIS_AgentCollectionManager get_AgentCollectionManager()
           
protected abstract  java.io.File get_Directory()
           
 java.lang.String getType()
           
 void setType(java.lang.String Type)
           
protected abstract  void write()
           
abstract  void write(boolean handleOutOfMemoryError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_GENESIS_Environment

public transient GENESIS_Environment _GENESIS_Environment
A reference to the GENESIS_Environment of this simulation. Declared transient so that Object can be swapped to file and reloaded without swapping GENESIS_Environment. When reloading, care is needed to initialise this...


_GENESIS_AgentCollectionManager

public transient GENESIS_AgentCollectionManager _GENESIS_AgentCollectionManager

_Type

protected java.lang.String _Type
For storing the type of GENESIS_Agent

Constructor Detail

GENESIS_Agent

public GENESIS_Agent()
Method Detail

get_AgentCollection

protected abstract GENESIS_AgentCollection get_AgentCollection()
Returns:
this._GENESIS_AgentEnvironment._GENESIS_AgentCollectionManager.getAgentCollection(_AgentCollection_ID)

get_AgentCollectionManager

protected GENESIS_AgentCollectionManager get_AgentCollectionManager()

get_Agent_ID

public abstract java.lang.Long get_Agent_ID(boolean handleOutOfMemoryError)

get_Directory

protected abstract java.io.File get_Directory()

write

public abstract void write(boolean handleOutOfMemoryError)

write

protected abstract void write()

getType

public java.lang.String getType()
Returns:
the _Type

setType

public void setType(java.lang.String Type)
Parameters:
Type - the _Type to set