1#ifndef STORM_GENERATOR_PRISMNEXTSTATEGENERATOR_H_
2#define STORM_GENERATOR_PRISMNEXTSTATEGENERATOR_H_
11template<
typename StateType,
typename ValueType>
14template<
typename ValueType,
typename StateType = u
int32_t>
45 std::vector<StateType>
const& initialStateIndices = {},
46 std::vector<StateType>
const& deadlockStateIndices = {},
47 std::vector<StateType>
const& unexploredStateIndices = {})
override;
49 virtual std::shared_ptr<storm::storage::sparse::ChoiceOrigins>
generateChoiceOrigins(std::vector<boost::any>& dataForChoiceOrigins)
const override;
53 void checkValid()
const;
61 std::shared_ptr<ActionMask<ValueType, StateType>>
const&,
bool flag);
88 boost::optional<std::vector<std::vector<std::reference_wrapper<storm::prism::Command const>>>> getActiveCommandsByActionIndex(
128 storm::storage::BitVector evaluateObservationLabels(
CompressedState const&
state)
const override;
133 void generateSynchronizedDistribution(storm::storage::BitVector
const&
state, ValueType
const& probability, uint64_t position,
134 std::vector<std::vector<std::reference_wrapper<storm::prism::Command const>>::const_iterator>
const& iteratorList,
135 storm::generator::Distribution<StateType, ValueType>& distribution,
StateToIdCallback stateToIdCallback);
137 bool isCommandPotentiallySynchronizing(prism::Command
const& command)
const;
140 storm::prism::Program program;
143 std::vector<std::reference_wrapper<storm::prism::RewardModel const>> rewardModels;
146 bool hasStateActionRewards;
149 std::vector<storm::storage::PlayerIndex> moduleIndexToPlayerIndexMap;
150 std::map<uint_fast64_t, storm::storage::PlayerIndex> actionIndexToPlayerIndexMap;
Action masks are arguments you can give to the state generator that limit which states are generated.
NextStateGenerator(storm::expressions::ExpressionManager const &expressionManager, VariableInformation const &variableInformation, NextStateGeneratorOptions const &options, std::shared_ptr< ActionMask< ValueType, uint32_t > > const &=nullptr)
std::function< StateType(CompressedState const &)> StateToIdCallback
CompressedState const * state
NextStateGeneratorOptions options
storm::storage::FlatSet< uint_fast64_t > CommandSet
virtual bool isDeterministicModel() const override
virtual std::vector< StateType > getInitialStates(StateToIdCallback const &stateToIdCallback) override
virtual bool isPartiallyObservable() const override
NextStateGenerator< ValueType, StateType >::StateToIdCallback StateToIdCallback
virtual StateBehavior< ValueType, StateType > expand(StateToIdCallback const &stateToIdCallback) override
virtual ModelType getModelType() const override
virtual storm::models::sparse::StateLabeling label(storm::storage::sparse::StateStorage< StateType > const &stateStorage, std::vector< StateType > const &initialStateIndices={}, std::vector< StateType > const &deadlockStateIndices={}, std::vector< StateType > const &unexploredStateIndices={}) override
PrismNextStateGenerator(storm::prism::Program const &program, NextStateGeneratorOptions const &options=NextStateGeneratorOptions(), std::shared_ptr< ActionMask< ValueType, StateType > > const &=nullptr)
virtual bool isDiscreteTimeModel() const override
virtual std::size_t getNumberOfRewardModels() const override
virtual std::shared_ptr< storm::storage::sparse::ChoiceOrigins > generateChoiceOrigins(std::vector< boost::any > &dataForChoiceOrigins) const override
static bool canHandle(storm::prism::Program const &program)
A quick check to detect whether the given model is not supported.
bool evaluateBooleanExpressionInCurrentState(storm::expressions::Expression const &) const
virtual std::map< std::string, storm::storage::PlayerIndex > getPlayerNameToIndexMap() const override
virtual storm::builder::RewardModelInformation getRewardModelInformation(uint64_t const &index) const override
This class manages the labeling of the state space with a number of (atomic) labels.
storm::storage::BitVector CompressedState
storm::builder::BuilderOptions NextStateGeneratorOptions
boost::container::flat_set< Key, std::less< Key >, boost::container::new_allocator< Key > > FlatSet
Redefinition of flat_set was needed, because from Boost 1.70 on the default allocator is set to void.
nlohmann::basic_json< std::map, std::vector, std::string, bool, int64_t, uint64_t, ValueType > json