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

Extension of Agent class, adds location and parameter information for an object of a particular species in the simulation. More...

Inheritance diagram for simulator.agent.SpecialisedAgent:
simulator.agent.Agent simulator.agent.HasSpecies 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

 SpecialisedAgent ()
 Creates a SpecialisedAgent object and initialises the object in which associated parameters are stored. More...
 
void initFromProtocolFile (Simulator aSim, XMLParser aSpeciesRoot)
 Creates an agent of the specified species and notes the grid in which this is assigned. More...
 
Object clone () throws CloneNotSupportedException
 Clones this agent object, creating a new progeny of this agent. Ensures new clone inherits same parameters as parents. More...
 
abstract void createNewAgent ()
 Create a new agent with mutated parameters based on species default values. More...
 
abstract SpecialisedAgent sendNewAgent () throws CloneNotSupportedException
 
void mutateAgent ()
 Mutate any inherited parameters for this particular agent. More...
 
void mutatePop ()
 Mutate any inherited parameters for a population of agents. More...
 
void registerBirth ()
 Registers a created agent into a respective container. Each agent must be referenced by one such container. More...
 
void die (boolean isStarving)
 Notifies the simulation that this agent has become too small and is then counted as dead. More...
 
double move ()
 Used in the calculation of delta move in Agent Container class. Will investigate further why this class returns 0. More...
 
void setSpeciesParam (SpeciesParam aSpeciesParam)
 Set the species parameters to a specified Species Parameter object. More...
 
SpeciesParam getSpeciesParam ()
 
Species getSpecies ()
 Returns the species object that is represented by this agent. More...
 
void setSpecies (Species aSpecies)
 Set the progenitor Specialised agent to a specified species. More...
 
String getName ()
 Return the name of the species represented by this agent. More...
 
boolean willDetach ()
 Returns a boolean noting whether this agent is detached and may be removed in sloughing. Implemented by extending classes. More...
 
int getGridIndex ()
 Returns the integer grid index where this agent resides. Implemented by extending classes. More...
 
double interact (boolean MUTUAL, boolean pull, boolean seq, double gain)
 Models a mechanical interaction between two located agents. Implemented by extending classes (LocatedAgent) More...
 
boolean isMoving ()
 Returns a boolean noting whether this agent is moving due to growth and sloughing. Implemented by extending classes. More...
 
void writePOVColorDefinition (FileWriter fr) throws IOException
 Used in POV-Ray output to display this species - writes a colour definition to the passed-in file. More...
 
- Public Member Functions inherited from simulator.agent.Agent
 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...
 
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...
 
- Public Member Functions inherited from simulator.agent.HasSpecies
String sendHeader ()
 Used in creation of results files - specifies the header of the columns of output information for this agent. More...
 

Public Attributes

int speciesIndex
 
boolean isDead = false
 
String death
 

Protected Attributes

Species _species
 
SpeciesParam _speciesParam
 
AgentContainer _agentGrid
 
- Protected Attributes inherited from simulator.agent.Agent
int _lastStep
 
int _generation = 0
 
long _genealogy = 0
 
int _family = 0
 
double _birthday
 

Additional Inherited Members

- Protected Member Functions inherited from simulator.agent.Agent
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...
 
- Static Protected Attributes inherited from simulator.agent.Agent
static int nextFamily = 0
 

Detailed Description

Extension of Agent class, adds location and parameter information for an object of a particular species in the simulation.

Extension of Agent class, adds location and parameter information for an object of a particular species in the simulation

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.SpecialisedAgent.SpecialisedAgent ( )

Creates a SpecialisedAgent object and initialises the object in which associated parameters are stored.

Creates a SpecialisedAgent object and initialises the object in which associated parameters are stored

Member Function Documentation

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

Clones this agent object, creating a new progeny of this agent. Ensures new clone inherits same parameters as parents.

Clones this agent object, creating a new progeny of this agent. Ensures new clone inherits same parameters as parents

Exceptions
CloneNotSupportedExceptionException should the class not implement Cloneable
abstract void simulator.agent.SpecialisedAgent.createNewAgent ( )
pure virtual

Create a new agent with mutated parameters based on species default values.

Create a new agent with mutated parameters based on species default values

Implements simulator.agent.HasSpecies.

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

void simulator.agent.SpecialisedAgent.die ( boolean  isStarving)

Notifies the simulation that this agent has become too small and is then counted as dead.

Notifies the simulation that this agent has become too small and is then counted as dead. Decreases the population of this species

Parameters
isStarvingBoolean noting whether the agent currently has access to any resources
int simulator.agent.SpecialisedAgent.getGridIndex ( )

Returns the integer grid index where this agent resides. Implemented by extending classes.

Returns the integer grid index where this agent resides. Implemented by extending classes

Returns
Integer grid index where this agent is located within
String simulator.agent.SpecialisedAgent.getName ( )

Return the name of the species represented by this agent.

Return the name of the species represented by this agent

Returns
Name of the species represented
Species simulator.agent.SpecialisedAgent.getSpecies ( )

Returns the species object that is represented by this agent.

Returns the species object that is represented by this agent

Returns
Object of the Species class that this agent is representing
SpeciesParam simulator.agent.SpecialisedAgent.getSpeciesParam ( )

Returns the object containing a set of parameters associated with a particular agent (species)

Implements simulator.agent.HasSpecies.

void simulator.agent.SpecialisedAgent.initFromProtocolFile ( Simulator  aSim,
XMLParser  aSpeciesRoot 
)

Creates an agent of the specified species and notes the grid in which this is assigned.

Creates an agent of the specified species and notes the grid in which this is assigned

Parameters
aSimThe simulation object used to simulate the conditions specified in the protocol file
aSpeciesRootA species mark-up within the specified protocol file
double simulator.agent.SpecialisedAgent.interact ( boolean  MUTUAL,
boolean  pull,
boolean  seq,
double  gain 
)

Models a mechanical interaction between two located agents. Implemented by extending classes (LocatedAgent)

Models a mechanical interaction between two located agents. Implemented by extending classes (LocatedAgent)

Parameters
MUTUALWhether movement is shared between two agents or applied only to this one
pullBoolean noting whether this action is shoving (false) or pulling (shrinking biofilm) (true)
seqWhether the move should be applied immediately or wait until the end of the step
gainDouble noting change in position
Returns
The move to be applied once the shoving or pull calculations have been performed
boolean simulator.agent.SpecialisedAgent.isMoving ( )

Returns a boolean noting whether this agent is moving due to growth and sloughing. Implemented by extending classes.

Returns a boolean noting whether this agent is moving due to growth and sloughing. Implemented by extending classes

Returns
Boolean noting whether or not this agent is moving
double simulator.agent.SpecialisedAgent.move ( )

Used in the calculation of delta move in Agent Container class. Will investigate further why this class returns 0.

Used in the calculation of delta move in Agent Container class. Will investigate further why this class returns 0

Returns
0
void simulator.agent.SpecialisedAgent.mutateAgent ( )

Mutate any inherited parameters for this particular agent.

Mutate any inherited parameters for this particular agent. KA June 2013 - not sure this action is implemented

void simulator.agent.SpecialisedAgent.mutatePop ( )

Mutate any inherited parameters for a population of agents.

Mutate any inherited parameters for a population of agents. KA June 2013 - not sure this action is implemented

Implements simulator.agent.HasSpecies.

void simulator.agent.SpecialisedAgent.registerBirth ( )
virtual

Registers a created agent into a respective container. Each agent must be referenced by one such container.

Registers a created agent into a respective container. Each agent must be referenced by one such container. In this case, the species is registered into the agent grid

Implements simulator.agent.Agent.

Reimplemented in simulator.agent.zoo.MultiEpisome, and simulator.agent.zoo.Episome.

abstract SpecialisedAgent simulator.agent.SpecialisedAgent.sendNewAgent ( ) throws CloneNotSupportedException
pure virtual

Implemented by classes that extend this class - obtain another instance of the same species (totally independent)

Implements simulator.agent.HasSpecies.

Implemented in simulator.agent.zoo.Bacterium, simulator.agent.zoo.MultiEpisome, simulator.agent.zoo.Episome, and simulator.agent.zoo.ParticulateEPS.

void simulator.agent.SpecialisedAgent.setSpecies ( Species  aSpecies)

Set the progenitor Specialised agent to a specified species.

Set the progenitor Specialised agent to a specified species. New agents of this species are created using this information

Parameters
aSpeciesA species object to use as the progenitor

Implements simulator.agent.HasSpecies.

void simulator.agent.SpecialisedAgent.setSpeciesParam ( SpeciesParam  aSpeciesParam)

Set the species parameters to a specified Species Parameter object.

Set the species parameters to a specified Species Parameter object

Parameters
aSpeciesParam
boolean simulator.agent.SpecialisedAgent.willDetach ( )

Returns a boolean noting whether this agent is detached and may be removed in sloughing. Implemented by extending classes.

Returns a boolean noting whether this agent is detached and may be removed in sloughing. Implemented by extending classes

Returns
Boolean value noting whether this agent will be detached
void simulator.agent.SpecialisedAgent.writePOVColorDefinition ( FileWriter  fr) throws IOException

Used in POV-Ray output to display this species - writes a colour definition to the passed-in file.

Used in POV-Ray output to display this species. This writes a color definition to the passed-in file. Meant for later use in macros. Note that this routine is put here and not in Species to allow derived agents to use different colors for different states; EpiBac is one example, with different colors for donor, recipient, and transconjugant states

Parameters
frPOV-Ray output file where the colour definition should be applied

Member Data Documentation

AgentContainer simulator.agent.SpecialisedAgent._agentGrid
protected

Grid in which this agent is contained

Species simulator.agent.SpecialisedAgent._species
protected

Type of species that this agent is representing

SpeciesParam simulator.agent.SpecialisedAgent._speciesParam
protected

Set of parameters associated with this specialised agent

String simulator.agent.SpecialisedAgent.death

Reason for agent's death. Added by Sonia Martins April 2010

boolean simulator.agent.SpecialisedAgent.isDead = false

Boolean noting whether this agent is still active in the simulation

int simulator.agent.SpecialisedAgent.speciesIndex

Integer index to that species within the simulation dictionary


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