8#ifndef STAMINA_BUILDER_THREADS_EXPLORATIONTHREAD_H
9#define STAMINA_BUILDER_THREADS_EXPLORATIONTHREAD_H
11#include "BaseThread.h"
12#include "ControlThread.h"
14#include "util/StateIndexArray.h"
15#include "builder/ProbabilityState.h"
21 template <
typename StateType,
typename RewardModelType,
typename ValueType>
26 CompressedState & state;
32 CompressedState & state;
51 , std::shared_ptr<storm::generator::PrismNextStateGenerator<ValueType, StateType>>
const& generator
52 , std::function<StateType (CompressedState
const&)> stateToIdCallback
55 uint32_t getNumberOfOwnedStates();
57 void setIsCtmc(
bool isCtmc);
73 virtual void exploreStates() = 0;
75 virtual void enqueueSuccessors(CompressedState & state) = 0;
77 std::shared_mutex crossExplorationQueueMutex;
78 std::deque<std::pair<CompressedState, double>> crossExplorationQueue;
79 std::deque<StateAndProbability> mainExplorationQueue;
80 uint32_t numberOfOwnedStates;
84 storm::storage::sparse::StateStorage<StateType> & stateStorage;
85 std::shared_ptr<storm::generator::PrismNextStateGenerator<ValueType, StateType>>
const& generator;
86 std::deque<StateAndProbability> statesTerminatedLastIteration;
87 std::function<StateType (CompressedState
const&)> stateToIdCallback;
89 std::deque<StateIndexAndThread> statesToRequestCrossExploration;
91 const uint8_t threadIndex;
Definition: ProbabilityState.h:11
Definition: BaseThread.h:28
Definition: ControlThread.h:30
Definition: ExplorationThread.h:22
void requestCrossExploration(CompressedState &state, double deltaPi)
Definition: ExplorationThread.cpp:55
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)
Definition: ExplorationThread.cpp:10
virtual void mainLoop() override
Definition: ExplorationThread.cpp:65
Definition: StateIndexArray.h:27
Definition: ExplicitTruncatedModelBuilder.cpp:40
Definition: ExplorationThread.h:25
Definition: ExplorationThread.h:31