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

Object to hold a group of agents in one location on the agent grid. More...

Classes

class  DistanceValueComparator
 Comparator used by the shrinking levelset algorithm.
 
class  TValueComparator
 Comparator used by the detachment levelset algorithm.
 

Public Member Functions

 LocatedGroup (int index, AgentContainer anAgentGrid, Simulator aSimulator)
 Set the coordinates of this group and check these are inside the grid. More...
 
void init ()
 Builds neighbourhood reference map. More...
 
void refreshElement ()
 Refresh status and concentration of the group. More...
 
double refreshVolume ()
 Refresh the volume statistics of this group. More...
 
double computeMove (SoluteGrid pressure, double deltaT)
 Compute the gradient due to pressure and use it to set the advective affect. More...
 
void resetMove ()
 
void addMoveToAgents (double alpha)
 Scale the movement vector for the grid element and apply to each agent. More...
 
void killAll ()
 Safely remove located agent from agentList & agentGrid. More...
 
void remove (LocatedAgent anAgent)
 Remove an agent from this LocatedGroup. More...
 
void add (LocatedAgent anAgent)
 Add an agent to this LocatedGroup. More...
 
void host (LocatedAgent aLoc)
 Shuffle coordinates of an agent inside the group. More...
 
LocatedGroup moveX (int i)
 Move the X parameter by a specified amount. More...
 
LocatedGroup moveY (int i)
 Move the Y parameter by a specified amount. More...
 
LocatedGroup moveZ (int i)
 Move the Z parameter by a specified amount. More...
 
double computeDifferenceVector (ContinuousVector me, ContinuousVector him, ContinuousVector move)
 Compute the difference vector between two continuous vectors. More...
 
void distanceFromBorders ()
 Compute distance to closest carrier and closest bulk. More...
 
int freeNbh ()
 Calculate the number of neighbours that contains no biomass. More...
 

Public Attributes

AgentContainer agentGrid
 
LinkedList< LocatedAgentgroup = new LinkedList<LocatedAgent>()
 
double[] speciesConcentration
 
double totalVolume = 0
 
double deltaV = 0
 
double totalConcentration = 0
 
double totalMass = 0
 
double erosionTime = Double.NaN
 
double distanceFromCarrier
 
double distanceFromBulk
 
double ratio
 
int gridIndex
 
ContinuousVector cc
 
DiscreteVector dc
 
int[][][] nbhIndex = new int[3][3][3]
 
LocatedGroup[][][] nbhGroup = new LocatedGroup[3][3][3]
 
int status = 2
 
boolean isBulk = false
 
boolean isCarrier = false
 
boolean isOutside
 
int nFreeNbh
 
ContinuousVector move = new ContinuousVector()
 

Protected Member Functions

void testNbh_3D (LocatedGroup[] shovGrid)
 Use the boundary conditions to build 3D neighbourhood reference map. More...
 
void testNbh_2D (LocatedGroup[] shovGrid)
 Use the boundary conditions to build 3D neighbourhood reference map. More...
 

Detailed Description

Object to hold a group of agents in one location on the agent grid.

Object to hold a group of agents in one location on the agent grid

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
Sónia Martins (SCM80.nosp@m.8@bh.nosp@m.am.ac.nosp@m..uk), Centre for Systems Biology, University of Birmingham (UK)

Constructor & Destructor Documentation

simulator.agent.LocatedGroup.LocatedGroup ( int  index,
AgentContainer  anAgentGrid,
Simulator  aSimulator 
)

Set the coordinates of this group and check these are inside the grid.

Set the coordinates of this group and check these are inside the grid

Parameters
indexIndex of the grid in which this group is located
anAgentGridThe agent grid associated with this index
aSimulatorThe current simulation object

Member Function Documentation

void simulator.agent.LocatedGroup.add ( LocatedAgent  anAgent)

Add an agent to this LocatedGroup.

Add an agent to this LocatedGroup

Parameters
anAgentLocatedAgent to add to this group
void simulator.agent.LocatedGroup.addMoveToAgents ( double  alpha)

Scale the movement vector for the grid element and apply to each agent.

Scale the movement vector for the grid element and apply to each agent

Parameters
alphaScaling factor to be applied to a move
double simulator.agent.LocatedGroup.computeDifferenceVector ( ContinuousVector  me,
ContinuousVector  him,
ContinuousVector  move 
)

Compute the difference vector between two continuous vectors.

Compute the difference vector between two continuous vectors

Parameters
meLocation of one agent expressed as continuous vector
himLocation of second agent expressed as continuous vector
moveContinuousVector to hold the difference between the two vectors
Returns
Double distance between the two points
Deprecated:
double simulator.agent.LocatedGroup.computeMove ( SoluteGrid  pressure,
double  deltaT 
)

Compute the gradient due to pressure and use it to set the advective affect.

Compute the gradient due to pressure and use it to set the advective affect

Parameters
pressurePressure grid
deltaTDeltaT
Returns
Norm of the movement vector under the affect of the pressure gradient
void simulator.agent.LocatedGroup.distanceFromBorders ( )

Compute distance to closest carrier and closest bulk.

Compute distance to closest carrier and closest bulk

int simulator.agent.LocatedGroup.freeNbh ( )

Calculate the number of neighbours that contains no biomass.

Calculate the number of neighbours that contains no biomass

Returns
the number of empty neighbours
void simulator.agent.LocatedGroup.host ( LocatedAgent  aLoc)

Shuffle coordinates of an agent inside the group.

Shuffle coordinates of an agent inside the group.

Parameters
aLocLocatedAgent which is to be shuffled
void simulator.agent.LocatedGroup.init ( )

Builds neighbourhood reference map.

Builds neighbourhood reference map

void simulator.agent.LocatedGroup.killAll ( )

Safely remove located agent from agentList & agentGrid.

Safely remove located agent from agentList & agentGrid

LocatedGroup simulator.agent.LocatedGroup.moveX ( int  i)

Move the X parameter by a specified amount.

Move the X parameter by a specified amount

Parameters
iThe current I grid element
Returns
Located group reached by that move
LocatedGroup simulator.agent.LocatedGroup.moveY ( int  i)

Move the Y parameter by a specified amount.

Move the Y parameter by a specified amount

Parameters
iThe current grid element
Returns
Located group reached by that move
LocatedGroup simulator.agent.LocatedGroup.moveZ ( int  i)

Move the Z parameter by a specified amount.

Move the Z parameter by a specified amount

Parameters
iThe current grid element
Returns
Located group reached by that move
void simulator.agent.LocatedGroup.refreshElement ( )

Refresh status and concentration of the group.

Refresh status and concentration of the group

double simulator.agent.LocatedGroup.refreshVolume ( )

Refresh the volume statistics of this group.

Refresh the volume statistics of this group

Returns
Double noting the total volume of agents in this group
void simulator.agent.LocatedGroup.remove ( LocatedAgent  anAgent)

Remove an agent from this LocatedGroup.

Remove an agent from this LocatedGroup

Parameters
anAgentLocatedAgent to remove from this group
void simulator.agent.LocatedGroup.resetMove ( )
void simulator.agent.LocatedGroup.testNbh_2D ( LocatedGroup[]  shovGrid)
protected

Use the boundary conditions to build 3D neighbourhood reference map.

Use the boundary conditions to build 3D neighbourhood reference map

Parameters
shovGridThe shoving grid used to build reference map
void simulator.agent.LocatedGroup.testNbh_3D ( LocatedGroup[]  shovGrid)
protected

Use the boundary conditions to build 3D neighbourhood reference map.

Use the boundary conditions to build 3D neighbourhood reference map

Parameters
shovGridThe shoving grid used to build reference map

Member Data Documentation

AgentContainer simulator.agent.LocatedGroup.agentGrid

Agent container this located group is within

ContinuousVector simulator.agent.LocatedGroup.cc

Coordinates of this location as a continuous vector

DiscreteVector simulator.agent.LocatedGroup.dc

Coordinates of this location as a discrete

double simulator.agent.LocatedGroup.deltaV = 0
double simulator.agent.LocatedGroup.distanceFromBulk

Distance of the group at this location from the bulk

double simulator.agent.LocatedGroup.distanceFromCarrier

Distance of the group at this location from the carrier

double simulator.agent.LocatedGroup.erosionTime = Double.NaN
int simulator.agent.LocatedGroup.gridIndex

The index of the grid at which this located group represents

LinkedList<LocatedAgent> simulator.agent.LocatedGroup.group = new LinkedList<LocatedAgent>()

Linked list to hold members of this group

boolean simulator.agent.LocatedGroup.isBulk = false

Boolean stating whether this location is in the bulk

boolean simulator.agent.LocatedGroup.isCarrier = false

Boolean stating whether this location is in the carrier

boolean simulator.agent.LocatedGroup.isOutside

Boolean stating whether this location is outside the grid

ContinuousVector simulator.agent.LocatedGroup.move = new ContinuousVector()

Vector to hold an amount of distance an agent is to move

LocatedGroup [][][] simulator.agent.LocatedGroup.nbhGroup = new LocatedGroup[3][3][3]

Neighbouring groups around this group

int [][][] simulator.agent.LocatedGroup.nbhIndex = new int[3][3][3]

Index of the neighbours of this group

int simulator.agent.LocatedGroup.nFreeNbh

Number of free neighbours around this location

double simulator.agent.LocatedGroup.ratio
double [] simulator.agent.LocatedGroup.speciesConcentration

Concentration of species in this group, thus area represented

int simulator.agent.LocatedGroup.status = 2

Space occupation (-1->outside, 0->carrier, 1->biofilm, 2->liquid, 3->bulk)

double simulator.agent.LocatedGroup.totalConcentration = 0

Total concentration of agents in this group

double simulator.agent.LocatedGroup.totalMass = 0

Total mass of agents in this group

double simulator.agent.LocatedGroup.totalVolume = 0

Total volume of agents in this group


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