29template<
typename ValueType,
typename StateType = u
int32_t>
30class NextStateGenerator;
36template<
typename ValueType,
typename StateType = u
int32_t>
55template<
typename ValueType,
typename StateType = u
int32_t>
66template<
typename ValueType,
typename StateType>
119 std::vector<StateType>
const& initialStateIndices = {},
120 std::vector<StateType>
const& deadlockStateIndices = {},
121 std::vector<StateType>
const& unexploredStateIndices = {}) = 0;
127 virtual std::shared_ptr<storm::storage::sparse::ChoiceOrigins>
generateChoiceOrigins(std::vector<boost::any>& dataForChoiceOrigins)
const;
134 void remapStateIds(std::function<StateType(StateType
const&)>
const& remapping);
148 std::vector<StateType>
const& initialStateIndices, std::vector<StateType>
const& deadlockStateIndices,
149 std::vector<StateType>
const& unexploredStateIndices,
150 std::vector<std::pair<std::string, storm::expressions::Expression>> labelsAndExpressions);
184 std::unique_ptr<storm::expressions::ExpressionEvaluator<BaseValueType>>
evaluator;
204 std::shared_ptr<ActionMask<ValueType, StateType>>
actionMask;
This class is responsible for managing a set of typed variables and all expressions using these varia...
A simple implementation of the valuation interface.
Action masks are arguments you can give to the state generator that limit which states are generated.
virtual ~ActionMask()=default
virtual bool query(storm::generator::NextStateGenerator< ValueType, StateType > const &generator, uint64_t actionIndex)=0
This method is called to check whether an action should be expanded.
virtual std::shared_ptr< storm::storage::sparse::ChoiceOrigins > generateChoiceOrigins(std::vector< boost::any > &dataForChoiceOrigins) const
NextStateGenerator(storm::expressions::ExpressionManager const &expressionManager, VariableInformation const &variableInformation, NextStateGeneratorOptions const &options, std::shared_ptr< ActionMask< ValueType, StateType > > const &=nullptr)
virtual std::map< std::string, storm::storage::PlayerIndex > getPlayerNameToIndexMap() const
std::shared_ptr< storm::expressions::ExpressionManager const > expressionManager
virtual storm::storage::sparse::StateValuations makeObservationValuation() const
Adds the valuation for the currently loaded state.
bool isSpecialLabel(std::string const &label) const
Checks if the input label has a special purpose (e.g.
std::unique_ptr< storm::expressions::ExpressionEvaluator< BaseValueType > > evaluator
std::shared_ptr< ActionMask< ValueType, StateType > > actionMask
virtual ~NextStateGenerator()
NextStateGenerator(storm::expressions::ExpressionManager const &expressionManager, NextStateGeneratorOptions const &options, std::shared_ptr< ActionMask< ValueType, StateType > > const &=nullptr)
Creates a new next state generator.
virtual storm::storage::BitVector evaluateObservationLabels(CompressedState const &state) const =0
void initializeSpecialStates()
Initializes the out-of-bounds state and states with overlapping guards.
std::string stateToString(CompressedState const &state) const
virtual storm::storage::sparse::StateValuationsBuilder initializeStateValuationsBuilder() const
Initializes a builder for state valuations by adding the appropriate variables.
storm::utility::ConstantsComparator< ValueType > comparator
std::function< StateType(CompressedState const &)> StateToIdCallback
void postprocess(StateBehavior< ValueType, StateType > &result)
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, std::vector< std::pair< std::string, storm::expressions::Expression > > labelsAndExpressions)
Creates the state labeling for the given states using the provided labels and expressions.
boost::optional< std::vector< uint64_t > > overlappingGuardStates
CompressedState const * state
uint32_t observabilityClass(CompressedState const &state) const
virtual void extendStateInformation(storm::json< BaseValueType > &stateInfo) const
virtual ModelType getModelType() const =0
NextStateGeneratorOptions const & getOptions() const
std::vector< std::pair< storm::expressions::Expression, bool > > terminalStates
storm::expressions::SimpleValuation currentStateToSimpleValuation() const
CompressedState outOfBoundsState
virtual bool isDiscreteTimeModel() const =0
storm::storage::BitVector mask
storm::json< ValueType > currentStateToJson(bool onlyObservable=false) const
void load(CompressedState const &state)
virtual storm::storage::sparse::StateValuationsBuilder initializeObservationValuationsBuilder() const
bool satisfies(storm::expressions::Expression const &expression) const
std::unordered_map< storm::storage::BitVector, uint32_t > observabilityMap
virtual std::vector< StateType > getInitialStates(StateToIdCallback const &stateToIdCallback)=0
virtual storm::builder::RewardModelInformation getRewardModelInformation(uint64_t const &index) const =0
virtual void addStateValuation(storm::storage::sparse::state_type const ¤tStateIndex, storm::storage::sparse::StateValuationsBuilder &valuationsBuilder) const
Adds the valuation for the currently loaded state to the given builder.
NextStateGeneratorOptions options
void remapStateIds(std::function< StateType(StateType const &)> const &remapping)
Performs a remapping of all values stored by applying the given remapping.
storm::IntervalBaseType< ValueType > BaseValueType
uint64_t getStateSize() const
VariableInformation const & getVariableInformation() const
virtual bool isPartiallyObservable() const =0
virtual bool isDeterministicModel() const =0
virtual std::size_t getNumberOfRewardModels() const =0
virtual void unpackTransientVariableValuesIntoEvaluator(CompressedState const &state, storm::expressions::ExpressionEvaluator< BaseValueType > &evaluator) const
Sets the values of all transient variables in the current state to the given evaluator.
virtual StateBehavior< ValueType, StateType > expand(StateToIdCallback const &stateToIdCallback)=0
VariableInformation variableInformation
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={})=0
StateValuationFunctionMask(std::function< bool(storm::expressions::SimpleValuation const &, uint64_t)> const &f)
virtual ~StateValuationFunctionMask()=default
bool query(storm::generator::NextStateGenerator< ValueType, StateType > const &generator, uint64_t actionIndex) override
This class manages the labeling of the state space with a number of (atomic) labels.
A bit vector that is internally represented as a vector of 64-bit values.
storm::storage::BitVector CompressedState
storm::builder::BuilderOptions NextStateGeneratorOptions
nlohmann::basic_json< std::map, std::vector, std::string, bool, int64_t, uint64_t, ValueType > json
typename detail::IntervalMetaProgrammingHelper< ValueType >::BaseType IntervalBaseType
Helper to access the type in which interval boundaries are stored.