Extension of Agent class, adds location and parameter information for an object of a particular species in the simulation. More...
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... | |
![]() | |
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... | |
![]() | |
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 |
![]() | |
int | _lastStep |
int | _generation = 0 |
long | _genealogy = 0 |
int | _family = 0 |
double | _birthday |
Additional Inherited Members | |
![]() | |
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 int | nextFamily = 0 |
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
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
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
CloneNotSupportedException | Exception should the class not implement Cloneable |
|
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
isStarving | Boolean 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
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
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
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
aSim | The simulation object used to simulate the conditions specified in the protocol file |
aSpeciesRoot | A 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)
MUTUAL | Whether movement is shared between two agents or applied only to this one |
pull | Boolean noting whether this action is shoving (false) or pulling (shrinking biofilm) (true) |
seq | Whether the move should be applied immediately or wait until the end of the step |
gain | Double noting change in position |
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
double simulator.agent.SpecialisedAgent.move | ( | ) |
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.
|
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.
|
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
aSpecies | A species object to use as the progenitor |
Implements simulator.agent.HasSpecies.
void simulator.agent.SpecialisedAgent.setSpeciesParam | ( | SpeciesParam | 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
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
fr | POV-Ray output file where the colour definition should be applied |
|
protected |
Grid in which this agent is contained
|
protected |
Type of species that this agent is representing
|
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