Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
simulator.agent.Agent Class Referenceabstract

Major class of iDynoMiCS - defines the agents that are involved in an iDynoMiCS simulation. Extended by a number of agent types. More...

Inheritance diagram for simulator.agent.Agent:
simulator.agent.SpecialisedAgent simulator.agent.ActiveAgent simulator.agent.InfoAgent simulator.agent.LocatedAgent simulator.agent.zoo.Episome simulator.agent.zoo.MultiEpisome simulator.agent.zoo.Bacterium simulator.agent.zoo.ParticulateEPS simulator.agent.zoo.BactEPS simulator.agent.zoo.BactAdaptable

Public Member Functions

 Agent ()
 Initialise an agent object, setting its time of creation and thus the time it was last stepped. More...
 
void initFromProtocolFile (Simulator aSimulator, XMLParser aSpeciesRoot)
 Initialise the agent from the protocol file. Implemented by classes that extend this class. More...
 
void initFromResultFile (Simulator aSim, String[] singleAgentData)
 Create an agent using information in a previous state or initialisation file. More...
 
void mutateAgent ()
 Mutates agent parameters. Implemented by classes that extend this class. More...
 
void makeKid () throws CloneNotSupportedException
 Creates a new agent from an existing one, and registers this new agent in the simulation. More...
 
Object clone () throws CloneNotSupportedException
 Clones this agent object, creating a new progeny of this agent. More...
 
abstract void registerBirth ()
 Registers a created agent into a respective container. Each agent must be referenced by one such container. Implemented by classes that extend Agent. More...
 
void step ()
 Perform the next timestep of the simulation for this agent. More...
 
String sendHeader ()
 Used in creation of results files - specifies the header of the columns of output information for this agent. More...
 
String writeOutput ()
 Used in creation of results files - creates an output string of information generated on this particular agent. More...
 
String sendName ()
 Returns a string containing the family name and genealogy of this agent. More...
 
void giveName ()
 Set the family for this agent, based on the next family. More...
 

Protected Member Functions

abstract void internalStep ()
 Called at each time step (under the control of the method Step of the class Agent to avoid multiple calls) More...
 
void recordGenealogy (Agent baby)
 Called when creating an agent : updates _generation and _genealogy field. More...
 

Protected Attributes

int _lastStep
 
int _generation = 0
 
long _genealogy = 0
 
int _family = 0
 
double _birthday
 

Static Protected Attributes

static int nextFamily = 0
 

Detailed Description

Major class of iDynoMiCS - defines the agents that are involved in an iDynoMiCS simulation. Extended by a number of agent types.

Major class of iDynoMiCS - defines the agents that are involved in an iDynoMiCS simulation. Extended by a number of agent types

Author
Andreas Dötsch (andre.nosp@m.as.d.nosp@m.oetsc.nosp@m.h@he.nosp@m.lmhol.nosp@m.tz-h.nosp@m.zi.de), Helmholtz Centre for Infection Research (Germany)
Laurent Lardon (lardo.nosp@m.nl@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr), INRA, France

Constructor & Destructor Documentation

simulator.agent.Agent.Agent ( )

Initialise an agent object, setting its time of creation and thus the time it was last stepped.

Initialise an agent object, setting its time of creation and thus the time it was last stepped

Member Function Documentation

Object simulator.agent.Agent.clone ( ) throws CloneNotSupportedException

Clones this agent object, creating a new progeny of this agent.

Clones this agent object, creating a new progeny of this agent

Exceptions
CloneNotSupportedExceptionException should the class not implement Cloneable
void simulator.agent.Agent.giveName ( )

Set the family for this agent, based on the next family.

Set the family for this agent, based on the next family

void simulator.agent.Agent.initFromProtocolFile ( Simulator  aSimulator,
XMLParser  aSpeciesRoot 
)

Initialise the agent from the protocol file. Implemented by classes that extend this class.

Initialise the agent from the protocol file. Implemented by classes that extend this class

Parameters
aSimulatorThe simulation object used to simulate the conditions specified in the protocol file
aSpeciesRootA Species mark-up within the specified protocol file
void simulator.agent.Agent.initFromResultFile ( Simulator  aSim,
String[]  singleAgentData 
)

Create an agent using information in a previous state or initialisation file.

Create an agent using information in a previous state or initialisation file

Parameters
aSimThe simulation object used to simulate the conditions specified in the protocol file
singleAgentDataData from the result or initialisation file that is used to recreate this agent
abstract void simulator.agent.Agent.internalStep ( )
protectedpure virtual

Called at each time step (under the control of the method Step of the class Agent to avoid multiple calls)

Called at each time step (under the control of the method Step of the class Agent to avoid multiple calls). Implemented by classes that extend Agent

Implemented in simulator.agent.ActiveAgent, simulator.agent.LocatedAgent, simulator.agent.zoo.Bacterium, simulator.agent.zoo.ParticulateEPS, simulator.agent.zoo.MultiEpisome, simulator.agent.zoo.Episome, simulator.agent.zoo.BactAdaptable, simulator.agent.zoo.BactEPS, and simulator.agent.InfoAgent.

void simulator.agent.Agent.makeKid ( ) throws CloneNotSupportedException

Creates a new agent from an existing one, and registers this new agent in the simulation.

Creates a new agent from an existing one, and registers this new agent in the simulation

Exceptions
CloneNotSupportedExceptionException should the class not implement Cloneable
void simulator.agent.Agent.mutateAgent ( )

Mutates agent parameters. Implemented by classes that extend this class.

Implemented by classes that extend this class

void simulator.agent.Agent.recordGenealogy ( Agent  baby)
protected

Called when creating an agent : updates _generation and _genealogy field.

Called when creating an agent : updates _generation and _genealogy field

Parameters
babyThe newly created agent that is the next generation of this agent
abstract void simulator.agent.Agent.registerBirth ( )
pure virtual

Registers a created agent into a respective container. Each agent must be referenced by one such container. Implemented by classes that extend Agent.

Registers a created agent into a respective container. Each agent must be referenced by one such container. Implemented by classes that extend Agent

Implemented in simulator.agent.ActiveAgent, simulator.agent.LocatedAgent, simulator.agent.zoo.MultiEpisome, simulator.agent.zoo.Episome, and simulator.agent.SpecialisedAgent.

String simulator.agent.Agent.sendHeader ( )

Used in creation of results files - specifies the header of the columns of output information for this agent.

Used in creation of results files - specifies the header of the columns of output information for this agent

Returns
String specifying the header of each column of results associated with this agent
String simulator.agent.Agent.sendName ( )

Returns a string containing the family name and genealogy of this agent.

Returns a string containing the family name and genealogy of this agent

Returns
String containing the family name and genealogy of this agent
void simulator.agent.Agent.step ( )

Perform the next timestep of the simulation for this agent.

Perform the next timestep of the simulation for this agent. _lastStep is implemented to note that the agent has been stepped. Implemented fully by agent types that extend Agent

String simulator.agent.Agent.writeOutput ( )

Used in creation of results files - creates an output string of information generated on this particular agent.

Used in creation of results files - creates an output string of information generated on this particular agent

Returns
String containing results associated with this agent

Member Data Documentation

double simulator.agent.Agent._birthday
protected

Timestep at which this agent was created

int simulator.agent.Agent._family = 0
protected

Integer noting the family which this agent belongs to

long simulator.agent.Agent._genealogy = 0
protected

Integer for the binary reading of the 0 and 1 coding the lineage. When a cells divides, one daughter has the index value 1, the other the index value 0, then this index is added on the left of the lineage description

int simulator.agent.Agent._generation = 0
protected

The number of generations between the progenitor and the current agent

int simulator.agent.Agent._lastStep
protected

Integer noting the last simulation timestep when this agent was stepped

int simulator.agent.Agent.nextFamily = 0
staticprotected

Integer noting the next family that any newly created agent will belong to


The documentation for this class was generated from the following file: