STAMINA/STORM 0.1
Infinite state-space truncator which generates a probability within a window
Public Types | Public Member Functions | Protected Member Functions | List of all members
stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType > Class Template Reference
Inheritance diagram for stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType >:
stamina::builder::threads::ExplorationThread< StateType, RewardModelType, ValueType > stamina::builder::threads::BaseThread< StateType, RewardModelType, ValueType >

Public Types

typedef ExplorationThread< StateType, RewardModelType, ValueType >::StateAndProbability StateAndProbability
 

Public Member Functions

 IterativeExplorationThread (StaminaModelBuilder< ValueType, RewardModelType, StateType > *parent, uint8_t threadIndex, ControlThread< StateType, RewardModelType, ValueType > &controlThread, uint32_t stateSize, util::StateIndexArray< StateType, ProbabilityState< StateType > > *stateMap, std::shared_ptr< storm::generator::PrismNextStateGenerator< ValueType, StateType > > const &generator, std::function< StateType(CompressedState const &)> stateToIdCallback)
 
virtual void enqueueSuccessors (CompressedState &state) override
 
- Public Member Functions inherited from stamina::builder::threads::ExplorationThread< StateType, RewardModelType, ValueType >
 ExplorationThread (StaminaModelBuilder< ValueType, RewardModelType, StateType > *parent, uint8_t threadIndex, ControlThread< StateType, RewardModelType, ValueType > &controlThread, uint32_t stateSize, util::StateIndexArray< StateType, ProbabilityState< StateType > > *stateMap, std::shared_ptr< storm::generator::PrismNextStateGenerator< ValueType, StateType > > const &generator, std::function< StateType(CompressedState const &)> stateToIdCallback)
 
uint8_t getIndex ()
 
uint32_t getNumberOfOwnedStates ()
 
bool isIdling ()
 
void setIsCtmc (bool isCtmc)
 
void requestCrossExploration (CompressedState &state, double deltaPi)
 
void requestCrossExploration (StateType stateIndex, double deltaPi)
 
virtual void mainLoop () override
 
- Public Member Functions inherited from stamina::builder::threads::BaseThread< StateType, RewardModelType, ValueType >
 BaseThread (StaminaModelBuilder< ValueType, RewardModelType, StateType > *parent)
 
virtual void mainLoop ()=0
 
void startThread ()
 
const StaminaModelBuilder< ValueType, RewardModelType, StateType > * getParent ()
 
void join ()
 
void terminate ()
 

Protected Member Functions

virtual void exploreStates () override
 
virtual void exploreState (StateAndProbability &stateProbability) override
 
virtual void exploreStates ()=0
 
virtual void exploreState (StateAndProbability &stateProbability)=0
 
virtual void enqueueSuccessors (CompressedState &state)=0
 

Additional Inherited Members

- Protected Attributes inherited from stamina::builder::threads::ExplorationThread< StateType, RewardModelType, ValueType >
std::shared_mutex crossExplorationQueueMutex
 
std::deque< std::pair< CompressedState, double > > crossExplorationQueue
 
std::deque< StateAndProbabilitymainExplorationQueue
 
uint32_t numberOfOwnedStates
 
bool idling
 
ControlThread< StateType, RewardModelType, ValueType > & controlThread
 
util::StateIndexArray< StateType, ProbabilityState< StateType > > * stateMap
 
storm::storage::sparse::StateStorage< StateType > & stateStorage
 
std::shared_ptr< storm::generator::PrismNextStateGenerator< ValueType, StateType > > const & generator
 
std::deque< StateAndProbabilitystatesTerminatedLastIteration
 
std::function< StateType(CompressedState const &)> stateToIdCallback
 
std::deque< StateIndexAndThreadstatesToRequestCrossExploration
 
- Protected Attributes inherited from stamina::builder::threads::BaseThread< StateType, RewardModelType, ValueType >
bool finished
 

Constructor & Destructor Documentation

◆ IterativeExplorationThread()

template<typename StateType , typename RewardModelType , typename ValueType >
stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType >::IterativeExplorationThread ( StaminaModelBuilder< ValueType, RewardModelType, StateType > *  parent,
uint8_t  threadIndex,
ControlThread< StateType, RewardModelType, ValueType > &  controlThread,
uint32_t  stateSize,
util::StateIndexArray< StateType, ProbabilityState< StateType > > *  stateMap,
std::shared_ptr< storm::generator::PrismNextStateGenerator< ValueType, StateType > > const &  generator,
std::function< StateType(CompressedState const &)>  stateToIdCallback 
)

Constructor. Invokes super's constructor.

Parameters
parentThe model builder who owns this thread
threadIndexThe index of this thread

Member Function Documentation

◆ enqueueSuccessors()

template<typename StateType , typename RewardModelType , typename ValueType >
void stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType >::enqueueSuccessors ( CompressedState &  state)
overridevirtual

◆ exploreState()

template<typename StateType , typename RewardModelType , typename ValueType >
void stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType >::exploreState ( StateAndProbability stateProbability)
overrideprotectedvirtual

◆ exploreStates()

template<typename StateType , typename RewardModelType , typename ValueType >
void stamina::builder::threads::IterativeExplorationThread< StateType, RewardModelType, ValueType >::exploreStates
overrideprotectedvirtual

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