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

Extension of Agent and SpecialisedAgent - adds reaction information to model agent involvement in reactions. More...

Inheritance diagram for simulator.agent.ActiveAgent:
simulator.agent.SpecialisedAgent simulator.agent.HasReaction simulator.agent.Agent simulator.agent.HasSpecies simulator.agent.LocatedAgent simulator.agent.zoo.Bacterium simulator.agent.zoo.ParticulateEPS simulator.agent.zoo.BactEPS simulator.agent.zoo.BactAdaptable

Public Member Functions

 ActiveAgent ()
 Creates an ActiveAgent object and initialises the object in which associated parameters are stored. More...
 
void initFromProtocolFile (Simulator aSim, XMLParser xmlMarkUp)
 Creates an agent of the specified species and notes the grid in which this is assigned. More...
 
void initFromResultFile (Simulator aSim, String[] singleAgentData)
 Create an agent using information in a previous state or initialisation file. More...
 
void mutatePop ()
 Mutate any inherited parameters for a population of agents. More...
 
void createNewAgent ()
 Create a new agent with mutated parameters based on species default values. Agent is not located. More...
 
void registerBirth ()
 Registers a created agent into a respective container. Each agent must be referenced by one such container. 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...
 
void mutateAgent ()
 Mutate any inherited parameters for this particular agent. More...
 
void die (boolean isStarving)
 Notifies the simulation that this agent has become too small and is then counted as dead. More...
 
void updateSize ()
 Update size of agent to take growth into account. More...
 
void updateMass ()
 Update mass of agent, summing the particle mass. More...
 
void addReaction (Reaction aReaction, boolean useDefaultParam)
 Add the reaction to the list of known reactions. More...
 
void addActiveReaction (Reaction aReaction, boolean useDefaultParam)
 Adds an active reaction to the list of known reactions and switches the reaction on. More...
 
void removeReaction (Reaction aPathway)
 Remove a reaction from the list of known reactions. More...
 
void switchOffreaction (Reaction aPathway)
 Switches off a reaction by removing it from the active reaction array. More...
 
void switchOnReaction (Reaction aReaction)
 Switches on a reaction by adding it to the active reaction array. More...
 
void registerOnAllActiveReaction ()
 Register the agent on each guild of its activated pathways. Called by makeKid. More...
 
void unregisterFromAllActiveReactions ()
 Called by the die method, to unregister the agent from all active reactions. More...
 
void fitMassOnGrid (SpatialGrid aSpG, int catalystIndex)
 Add the reacting concentration of an agent to the received grid. More...
 
void fitReacRateOnGrid (SpatialGrid aRateGrid, int reactionIndex)
 Add the reaction/growth rate of an agent on received grid, for a specified reaction. More...
 
void fitMassOnGrid (SpatialGrid aSpG)
 Add the total concentration of an agent on received grid. 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...
 
double getTotalMass ()
 Return total mass of this agent. More...
 
double getParticleMass (int particleIndex)
 Return particle mass of this agent. More...
 
double getNetGrowth ()
 Return net growth rate of this agent. More...
 
double getVolGrowth ()
 Return volume growth rate of this agent. More...
 
void setNetGrowth (double value)
 Set net growth rate of this agent. More...
 
double[] getSoluteYield (int indexReaction)
 Return solute yield for a particular reaction. More...
 
double[] getReactionKinetic (int indexReaction)
 Return the reaction kinetic parameters for a particular reaction. More...
 
ActiveParam getSpeciesParam ()
 Return the parameters associated with this agent (speciesParam) More...
 
- Public Member Functions inherited from simulator.agent.SpecialisedAgent
 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 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 Attributes

Reaction[] allReactions
 
double[][] soluteYield
 
double[][] reactionKinetic
 
double[][] particleYield
 
double[] particleMass
 
- Public Attributes inherited from simulator.agent.SpecialisedAgent
int speciesIndex
 
boolean isDead = false
 
String death
 

Protected Member Functions

void internalStep ()
 Called at each time step of the simulation to compute cell growth, update size, and monitor cell death and division. More...
 
void grow ()
 

Protected Attributes

ArrayList< Integer > reactionActive
 
ArrayList< Integer > reactionKnown
 
double _netGrowthRate = 0
 
double _netVolumeRate = 0
 
double[] growthRate
 
double _totalMass
 
- Protected Attributes inherited from simulator.agent.SpecialisedAgent
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

- Static Protected Attributes inherited from simulator.agent.Agent
static int nextFamily = 0
 

Detailed Description

Extension of Agent and SpecialisedAgent - adds reaction information to model agent involvement in reactions.

Extension of Agent and SpecialisedAgent - adds reaction information to model agent involvement in reactions

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
Brian Merkey (brim@.nosp@m.env..nosp@m.dtu.d.nosp@m.k, bvm@n.nosp@m.orth.nosp@m.weste.nosp@m.rn.e.nosp@m.du), Department of Engineering Sciences and Applied Mathematics, Northwestern University (USA)

Constructor & Destructor Documentation

simulator.agent.ActiveAgent.ActiveAgent ( )

Creates an ActiveAgent object and initialises the object in which associated parameters are stored.

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

Member Function Documentation

void simulator.agent.ActiveAgent.addActiveReaction ( Reaction  aReaction,
boolean  useDefaultParam 
)

Adds an active reaction to the list of known reactions and switches the reaction on.

Adds an active reaction to the list of known reactions and switches the reaction on

Parameters
aReactionThe reaction to add to the list
useDefaultParamWhether to use default reaction parameters or bespoke parameters have been specified in the protocol file

Implements simulator.agent.HasReaction.

void simulator.agent.ActiveAgent.addReaction ( Reaction  aReaction,
boolean  useDefaultParam 
)

Add the reaction to the list of known reactions.

Add the reaction to the list of known reactions

Parameters
aReactionThe reaction to add to the list
useDefaultParamWhether to use default reaction parameters or bespoke parameters have been specified in the protocol file

Implements simulator.agent.HasReaction.

Object simulator.agent.ActiveAgent.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
void simulator.agent.ActiveAgent.createNewAgent ( )
virtual

Create a new agent with mutated parameters based on species default values. Agent is not located.

Create a new agent with mutated parameters based on species default values. Agent is not located

Implements simulator.agent.SpecialisedAgent.

void simulator.agent.ActiveAgent.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
void simulator.agent.ActiveAgent.fitMassOnGrid ( SpatialGrid  aSpG,
int  catalystIndex 
)

Add the reacting concentration of an agent to the received grid.

Add the reacting concentration of an agent to the received grid

Parameters
aSpGSpatial grid used to sum catalysing mass
catalystIndexIndex of the compartment of the cell supporting the reaction
void simulator.agent.ActiveAgent.fitMassOnGrid ( SpatialGrid  aSpG)

Add the total concentration of an agent on received grid.

Add the total concentration of an agent on received grid

Parameters
aSpGSpatial grid used to sum total mass
void simulator.agent.ActiveAgent.fitReacRateOnGrid ( SpatialGrid  aRateGrid,
int  reactionIndex 
)

Add the reaction/growth rate of an agent on received grid, for a specified reaction.

Add the total reaction/growth rate of an agent on received grid, for a specified reaction

Parameters
aRateGridSpatial grid used to store total reaction rate
reactionIndexIndex of this declared reaction in the simulation dictionary
double simulator.agent.ActiveAgent.getNetGrowth ( )

Return net growth rate of this agent.

Return net growth rate of this agent

Returns
Double stating the net growth rate of this agent
double simulator.agent.ActiveAgent.getParticleMass ( int  particleIndex)

Return particle mass of this agent.

Return particle mass of this agent

Returns
Double stating the particle mass of this agent
double [] simulator.agent.ActiveAgent.getReactionKinetic ( int  indexReaction)

Return the reaction kinetic parameters for a particular reaction.

Return rection kinetic parameters for a particular reaction

Parameters
indexReactionIndex to a reaction in the simulation dictionary
Returns
Double array of the rection kinetic parameters for that reaction
double [] simulator.agent.ActiveAgent.getSoluteYield ( int  indexReaction)

Return solute yield for a particular reaction.

Return solute yield for a particular reaction

Parameters
indexReactionIndex to a reaction in the simulation dictionary
Returns
Double array of the solute yields for that reaction
ActiveParam simulator.agent.ActiveAgent.getSpeciesParam ( )

Return the parameters associated with this agent (speciesParam)

Return the parameters associated with this agent (speciesParam)

Returns
ActiveParam object containing the species associated with this agent

Implements simulator.agent.HasSpecies.

double simulator.agent.ActiveAgent.getTotalMass ( )

Return total mass of this agent.

Return total mass of this agent

Returns
Double stating the total mass of this agent
double simulator.agent.ActiveAgent.getVolGrowth ( )

Return volume growth rate of this agent.

Return volume growth rate of this agent

Returns
Double stating the volume growth rate of this agent
void simulator.agent.ActiveAgent.grow ( )
protected

Perform agent growth by calling all active reaction pathways.

void simulator.agent.ActiveAgent.initFromProtocolFile ( Simulator  aSim,
XMLParser  xmlMarkUp 
)

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
xmlMarkUpA species mark-up within the specified protocol file
void simulator.agent.ActiveAgent.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
void simulator.agent.ActiveAgent.internalStep ( )
protectedvirtual

Called at each time step of the simulation to compute cell growth, update size, and monitor cell death and division.

Called at each time step of the simulation to compute cell growth, update size, and monitor cell death. Also determines whether the agent has reached the size at which it must divide

Implements simulator.agent.Agent.

Reimplemented in simulator.agent.LocatedAgent, simulator.agent.zoo.Bacterium, simulator.agent.zoo.ParticulateEPS, simulator.agent.zoo.BactAdaptable, and simulator.agent.zoo.BactEPS.

void simulator.agent.ActiveAgent.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.ActiveAgent.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.ActiveAgent.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.LocatedAgent.

void simulator.agent.ActiveAgent.registerOnAllActiveReaction ( )

Register the agent on each guild of its activated pathways. Called by makeKid.

Register the agent on each guild of its activated pathways. Called by makeKid

void simulator.agent.ActiveAgent.removeReaction ( Reaction  aPathway)

Remove a reaction from the list of known reactions.

Remove a reaction from the list of known reactions

Parameters
aPathwayThe reaction to remove from the list

Implements simulator.agent.HasReaction.

String simulator.agent.ActiveAgent.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

Implements simulator.agent.HasSpecies.

void simulator.agent.ActiveAgent.setNetGrowth ( double  value)

Set net growth rate of this agent.

Set net growth rate of this agent

Parameters
valueDouble stating the net growth rate of this agent
void simulator.agent.ActiveAgent.switchOffreaction ( Reaction  aPathway)

Switches off a reaction by removing it from the active reaction array.

Switches off a reaction by removing it from the active reaction array. BVM 27.11.08: added the '.reactionIndex' calls to the two lines below in order to get this function to work correctly

Parameters
aPathwayThe reaction to switch off

Implements simulator.agent.HasReaction.

void simulator.agent.ActiveAgent.switchOnReaction ( Reaction  aReaction)

Switches on a reaction by adding it to the active reaction array.

Switches off a reaction by adding it to the active reaction array. BVM 27.11.08: added the if statement to prevent adding a reaction if it is already present

Parameters
aReactionThe reaction to switch on

Implements simulator.agent.HasReaction.

void simulator.agent.ActiveAgent.unregisterFromAllActiveReactions ( )

Called by the die method, to unregister the agent from all active reactions.

Called by the die method, to unregister the agent from all active reactions

void simulator.agent.ActiveAgent.updateMass ( )

Update mass of agent, summing the particle mass.

Update mass of agent, summing the particle mass

void simulator.agent.ActiveAgent.updateSize ( )

Update size of agent to take growth into account.

Update mass of agent to take growth into account

String simulator.agent.ActiveAgent.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.ActiveAgent._netGrowthRate = 0
protected

Net growth rate of this agent due to reactions

double simulator.agent.ActiveAgent._netVolumeRate = 0
protected

Net volume change rate of this agent due to reactions

double simulator.agent.ActiveAgent._totalMass
protected

Sum of masses of all particles

Reaction [] simulator.agent.ActiveAgent.allReactions

Array of all the reactions this agent is involved in

double [] simulator.agent.ActiveAgent.growthRate
protected

Growth rate of this agent due to reactions

double [] simulator.agent.ActiveAgent.particleMass

Mass of the agent (table for all particles belonging to the agent)

double [][] simulator.agent.ActiveAgent.particleYield

Particle yield for reactions involving this agent

ArrayList<Integer> simulator.agent.ActiveAgent.reactionActive
protected

Array of the reactions that are active

double [][] simulator.agent.ActiveAgent.reactionKinetic

Array of the kinetic factor parameters for the reactions this agent is involved in

ArrayList<Integer> simulator.agent.ActiveAgent.reactionKnown
protected

Array of all reactions (even those not active on this agent)

double [][] simulator.agent.ActiveAgent.soluteYield

Solute yield for reactions involving this agent


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