21template<
typename StateType,
typename ValueType>
28template<
typename ValueType,
typename StateType = u
int32_t>
31template<
typename ValueType,
typename StateType = u
int32_t>
76 std::vector<StateType>
const& initialStateIndices = {},
77 std::vector<StateType>
const& deadlockStateIndices = {},
78 std::vector<StateType>
const& unexploredStateIndices = {})
override;
80 virtual std::shared_ptr<storm::storage::sparse::ChoiceOrigins>
generateChoiceOrigins(std::vector<boost::any>& dataForChoiceOrigins)
const override;
204 typedef std::vector<std::pair<uint64_t, storm::jani::Edge const*>> EdgeSetWithIndices;
205 typedef std::unordered_map<uint64_t, EdgeSetWithIndices> LocationsAndEdges;
206 typedef std::vector<std::pair<uint64_t, LocationsAndEdges>> AutomataAndEdges;
207 typedef std::pair<boost::optional<uint64_t>, AutomataAndEdges> OutputAndEdges;
209 typedef std::pair<uint64_t, EdgeSetWithIndices> AutomatonAndEdgeSet;
210 typedef std::vector<AutomatonAndEdgeSet> AutomataEdgeSets;
212 void expandSynchronizingEdgeCombination(AutomataEdgeSets
const& edgeCombination, uint64_t outputActionIndex,
CompressedState const&
state,
215 std::vector<EdgeSetWithIndices::const_iterator>
const& iteratorList,
222 void checkGlobalVariableWritesValid(AutomataEdgeSets
const& enabledEdges)
const;
227 std::vector<ValueType> evaluateRewardExpressions()
const;
232 void evaluateRewardExpressions(std::vector<ValueType>& result)
const;
237 void addEvaluatedRewardExpressions(std::vector<ValueType>& rewards, ValueType
const& factor)
const;
242 void buildRewardModelInformation();
247 void createSynchronizationInformation();
252 void checkValid()
const;
258 std::vector<std::reference_wrapper<storm::jani::Automaton const>> parallelAutomata;
261 std::vector<OutputAndEdges> edges;
264 std::vector<std::pair<std::string, storm::expressions::Expression>> rewardExpressions;
267 std::vector<storm::builder::RewardModelInformation> rewardModelInformation;
270 bool hasStateActionRewards;
273 bool evaluateRewardExpressionsAtEdges;
276 bool evaluateRewardExpressionsAtDestinations;
295 std::unique_ptr<JaniNextStateGeneratorScratchMemory<ValueType, StateType>> scratch;
storm::storage::FlatSet< uint_fast64_t > EdgeIndexSet
virtual ModelType getModelType() const override
static storm::jani::ModelFeatures getSupportedJaniFeatures()
Returns the jani features with which this builder can deal natively.
virtual std::shared_ptr< storm::storage::sparse::ChoiceOrigins > generateChoiceOrigins(std::vector< boost::any > &dataForChoiceOrigins) const override
virtual bool isDiscreteTimeModel() const override
virtual std::vector< StateType > getInitialStates(StateToIdCallback const &stateToIdCallback) override
JaniNextStateGenerator(storm::jani::Model const &model, NextStateGeneratorOptions const &options=NextStateGeneratorOptions())
virtual storm::builder::RewardModelInformation getRewardModelInformation(uint64_t const &index) const override
virtual StateBehavior< ValueType, StateType > const & expand(StateToIdCallback const &stateToIdCallback) override
virtual bool isDeterministicModel() const override
virtual bool isPartiallyObservable() const override
virtual std::size_t getNumberOfRewardModels() const override
static bool canHandle(storm::jani::Model const &model)
A quick check to detect whether the given model is not supported.
NextStateGenerator< ValueType, StateType >::StateToIdCallback StateToIdCallback
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
virtual void addStateValuation(storm::storage::sparse::state_type const ¤tStateIndex, storm::storage::sparse::Valuations &valuations) const override
Adds the valuation for the currently loaded state to the given builder.
virtual void unpackTransientVariableValuesIntoEvaluator(CompressedState const &state, storm::expressions::ExpressionEvaluator< ValueType > &evaluator) const override
Sets the values of all transient variables in the current state to the given evaluator.
virtual storm::storage::sparse::Valuations initializeStateValuations() const override
Initializes state valuations by adding the appropriate variables.
~JaniNextStateGenerator()
Declared (instead of implicitly defaulted) and defined in the .cpp file, because JaniNextStateGenerat...
NextStateGenerator(storm::expressions::ExpressionManager const &expressionManager, VariableInformation const &variableInformation, NextStateGeneratorOptions const &options, std::shared_ptr< ActionMask< ValueType, uint32_t > > const &=nullptr)
std::unique_ptr< storm::expressions::ExpressionEvaluator< BaseValueType > > evaluator
An evaluator used to evaluate expressions.
std::function< StateType(CompressedState const &)> StateToIdCallback
CompressedState const * state
The currently loaded state.
NextStateGeneratorOptions options
The options to be used for next-state generation.
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.
Provides access to valuations of variables for a set of entities (e.g.
storm::storage::BitVector CompressedState
storm::builder::BuilderOptions NextStateGeneratorOptions
storm::adapters::DereferenceIteratorAdapter< std::vector< std::shared_ptr< Assignment > > const > ConstAssignments
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.
constexpr bool IsIntervalType
Helper to check if a type is an interval.
The actual (private) implementation of JaniNextStateGeneratorScratchMemory, see the corresponding mem...