10 struct SimulationParameters;
~FluxAgent()
unregisters FluxAgent from the grid
void setPotential(double potential)
set the FluxAgent's potential
unsigned long int stepsSinceLast() const
get the number of steps since storeLast() was called
unsigned long int m_attempts
the number of times the FluxAgent has tried to transport.
Definition: fluxagent.h:202
unsigned long int attempts() const
get the FluxAgent's attempt counter
double rate() const
get the FluxAgent's rate
A class that abstractly represents an object that can occupy grid sites.
Definition: agent.h:24
unsigned long int m_lastStep
the step at which last was noted
Definition: fluxagent.h:222
void setAttempts(unsigned long int value)
set the FluxAgent's attempt counter
Grid & grid() const
get the Grid this FluxAgent belongs to
unsigned long int m_successes
the number of times the FluxAgent was successful in transporting.
Definition: fluxagent.h:207
double successRate() const
calculate and return the current rate of success
A class to hold Agents, calculate their positions, and store the background potential.
Definition: cubicgrid.h:35
FluxAgent(Agent::Type type, World &world, Grid &grid, QObject *parent=0)
Create the flux agent.
virtual double energyChange(int site)
The energy change associated with moving a carrier from the FluxAgent to a site.
double successRateSinceLast() const
calculate and return the rate of success since storeLast() was called
void setSuccesses(unsigned long int value)
set the FluxAgent's success counter
double m_probability
the constant probability used in the default behavoir of shouldTransport().
Definition: fluxagent.h:227
Type
An identifier for the type of Agent.
Definition: agent.h:33
Grid & m_grid
the grid this FluxAgent resides in
Definition: fluxagent.h:239
unsigned long int m_lastSuccesses
storage to note the number of successes at some step
Definition: fluxagent.h:212
double successProbability() const
calculate and return the current probabilty of success
A class to change the number of carriers in the system.
Definition: fluxagent.h:17
A class to hold all objects in a simulation.
Definition: world.h:51
unsigned long int m_lastAttempts
storage to note the number of successes at some step
Definition: fluxagent.h:217
Grid::CubeFace m_face
the face of the grid this FluxAgent occupies
Definition: fluxagent.h:246
double successProbabilitySinceLast() const
calculate and return the probabilty of success since storeLast() was called
QString faceToLetter()
convert the Grid::CubeFace to a single letter
double m_potential
the potential that is (possibly) used when calculating an energy change
Definition: fluxagent.h:234
virtual bool shouldTransport(int site)
decide if the FluxAgent should transport a carrier to/from a given site
unsigned long int successes() const
get the FluxAgent's success counter
Grid::CubeFace face() const
get the Grid:CubeFace this FluxAgent is assigned to
void resetCounters()
set the attempt and success counters to zero
CubeFace
A way to indicate the faces of a cube.
Definition: cubicgrid.h:46
void setRateSmartly(double rate, double dflt)
set the FluxAgent's rate
unsigned long int successesSinceLast() const
get the number of successes since storeLast() was called
void initializeSite(int site)
assign the FluxAgent to a specific site in the grid
void setRate(double rate)
set the FluxAgent's rate
double potential() const
get the FluxAgent's potential
unsigned long int attemptsSinceLast() const
get the number of attempts since storeLast() was called
void storeLast()
set the value of last to the value of successes, and store the current step