public class StrategyExecutionFrequency extends AbstractReportVariables implements org.springframework.beans.factory.InitializingBean
This class collects data on the frequency with which each strategy is executed.
Strategy
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Agent |
agent
If agent is non-null then only track strategies executed by
the specified agent.
|
protected int |
agentIndex |
protected org.apache.commons.math3.stat.Frequency |
executionFrequency |
protected List<String> |
keyList |
static String |
NAME |
protected Population |
population |
name, simulation, timeStamp, xVariableName, yVariableNames
deleteQueue, genericListeners, specificListeners
Constructor and Description |
---|
StrategyExecutionFrequency() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
compute(SimEvent event)
Update variables.
|
void |
eventOccurred(SimEvent event) |
int |
getAgentIndex() |
List |
getKeyList() |
int |
getNumberOfSeries() |
double |
getPercentage(String tag) |
Map<Object,Number> |
getVariableBindings()
Get the values calculated by this report.
|
void |
initialise(SimEvent event)
Initialise the variables in response to event.
|
void |
onSimulationStarting(SimulationStartingEvent event) |
void |
onStrategyExecuted(StrategyExecutedEvent event) |
void |
setAgentIndex(int agentIndex)
The index of a particular agent within the population whose
strategy executions we want to track.
|
void |
setKeyList(List keySetObjects)
Configure the list of the strategies which this report will track.
|
createVariable, dispose, getName, getTimeStamp, getX, getxVariableName, getY, getyVariableNames, recordMoments, recordSummaryStatistics, setName, tag
addListener, addListener, clearListeners, clone, fireEvent, notifyGenericListeners, notifySpecificListeners, processDeleteQueue, removeListener
protected org.apache.commons.math3.stat.Frequency executionFrequency
protected Agent agent
protected Population population
protected int agentIndex
public static final String NAME
public Map<Object,Number> getVariableBindings()
Report
getVariableBindings
in interface Report
getVariableBindings
in class AbstractReportVariables
Map
of user-readable variable names to their
associated values.public double getPercentage(String tag)
public void eventOccurred(SimEvent event)
eventOccurred
in interface EventListener
eventOccurred
in class AbstractReportVariables
public void onSimulationStarting(SimulationStartingEvent event)
public void onStrategyExecuted(StrategyExecutedEvent event)
public void initialise(SimEvent event)
ReportVariables
initialise
in interface ReportVariables
initialise
in class AbstractReportVariables
public void compute(SimEvent event)
ReportVariables
compute
in interface ReportVariables
compute
in class AbstractReportVariables
public List getKeyList()
public void setKeyList(List keySetObjects)
keySetObjects
- The list of strategies which will be tracked. These can be
object factories, object instances, or strings denoting the
tag of a strategy.public int getAgentIndex()
public void setAgentIndex(int agentIndex)
agentIndex
- public int getNumberOfSeries()
getNumberOfSeries
in interface XYReportVariables
getNumberOfSeries
in class AbstractReportVariables
Copyright © 2014. All rights reserved.