Extension of Agent and SpecialisedAgent - adds reaction information to model agent involvement in reactions. More...
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... | |
![]() | |
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... | |
![]() | |
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 |
![]() | |
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 |
![]() | |
Species | _species |
SpeciesParam | _speciesParam |
AgentContainer | _agentGrid |
![]() | |
int | _lastStep |
int | _generation = 0 |
long | _genealogy = 0 |
int | _family = 0 |
double | _birthday |
Additional Inherited Members | |
![]() | |
static int | nextFamily = 0 |
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
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
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
aReaction | The reaction to add to the list |
useDefaultParam | Whether 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
aReaction | The reaction to add to the list |
useDefaultParam | Whether 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
CloneNotSupportedException | Exception should the class not implement Cloneable |
|
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
isStarving | Boolean 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
aSpG | Spatial grid used to sum catalysing mass |
catalystIndex | Index 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
aSpG | Spatial 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
aRateGrid | Spatial grid used to store total reaction rate |
reactionIndex | Index 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
double simulator.agent.ActiveAgent.getParticleMass | ( | int | particleIndex | ) |
Return particle mass of this agent.
Return 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
indexReaction | Index to a reaction in the simulation dictionary |
double [] simulator.agent.ActiveAgent.getSoluteYield | ( | int | indexReaction | ) |
Return solute yield for a particular reaction.
Return solute yield for a particular reaction
indexReaction | Index to a reaction in the simulation dictionary |
ActiveParam simulator.agent.ActiveAgent.getSpeciesParam | ( | ) |
Return the parameters associated with this agent (speciesParam)
Return the parameters associated with this agent (speciesParam)
Implements simulator.agent.HasSpecies.
double simulator.agent.ActiveAgent.getTotalMass | ( | ) |
Return total mass of this agent.
Return total mass of this agent
double simulator.agent.ActiveAgent.getVolGrowth | ( | ) |
Return volume growth rate of this agent.
Return volume growth rate of this agent
|
protected |
Perform agent growth by calling all active reaction pathways.
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
aSim | The simulation object used to simulate the conditions specified in the protocol file |
xmlMarkUp | A 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
aSim | The simulation object used to simulate the conditions specified in the protocol file |
singleAgentData | Data from the result or initialisation file that is used to recreate this agent |
|
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.
|
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
aPathway | The 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
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
value | Double 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
aPathway | The 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
aReaction | The 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
|
protected |
Net growth rate of this agent due to reactions
|
protected |
Net volume change rate of this agent due to reactions
|
protected |
Sum of masses of all particles
Reaction [] simulator.agent.ActiveAgent.allReactions |
Array of all the reactions this agent is involved in
|
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
|
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
|
protected |
Array of all reactions (even those not active on this agent)
double [][] simulator.agent.ActiveAgent.soluteYield |
Solute yield for reactions involving this agent