net.sourceforge.jabm.strategy
Class AbstractRlStrategy

java.lang.Object
  extended by net.sourceforge.jabm.strategy.AbstractStrategy
      extended by net.sourceforge.jabm.strategy.AbstractRlStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, EventListener, Strategy
Direct Known Subclasses:
RlStrategy, RlStrategyWithState

public abstract class AbstractRlStrategy
extends AbstractStrategy
implements java.io.Serializable

See Also:
Serialized Form
 

Field Summary
protected  Strategy[] actions
           
protected  Strategy currentStrategy
           
protected  double[] initialPropensities
           
protected  org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory
           
 
Fields inherited from class net.sourceforge.jabm.strategy.AbstractStrategy
agent, scheduler
 
Constructor Summary
AbstractRlStrategy()
           
AbstractRlStrategy(Agent agent)
           
 
Method Summary
 double[] getInitialPropensities()
           
abstract  int getNumberOfActions()
           
 org.springframework.beans.factory.ObjectFactory<Strategy> getStrategyFactory()
           
 void initialise()
           
 void setStrategyFactory(org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory)
           
 void unsubscribeFromEvents()
          The strategy should call EventScheduler.removeListener() to unsubscribe from events when this method is called.
 
Methods inherited from class net.sourceforge.jabm.strategy.AbstractStrategy
clone, eventOccurred, execute, fireEvent, getAgent, getScheduler, onSimulationFinished, setAgent, setScheduler, subscribeToEvents, subscribeToEvents
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

protected Strategy[] actions

currentStrategy

protected Strategy currentStrategy

strategyFactory

protected transient org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory

initialPropensities

protected double[] initialPropensities
Constructor Detail

AbstractRlStrategy

public AbstractRlStrategy(Agent agent)

AbstractRlStrategy

public AbstractRlStrategy()
Method Detail

unsubscribeFromEvents

public void unsubscribeFromEvents()
Description copied from interface: Strategy
The strategy should call EventScheduler.removeListener() to unsubscribe from events when this method is called. This hook is used to clean-up, for example when the strategy is disposed of.

Specified by:
unsubscribeFromEvents in interface Strategy
Overrides:
unsubscribeFromEvents in class AbstractStrategy

getStrategyFactory

public org.springframework.beans.factory.ObjectFactory<Strategy> getStrategyFactory()

setStrategyFactory

public void setStrategyFactory(org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory)

getInitialPropensities

public double[] getInitialPropensities()

initialise

public void initialise()

getNumberOfActions

public abstract int getNumberOfActions()