Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateActionReward.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
7
8namespace storm {
9namespace storage {
10namespace expressions {
11class Variable;
12}
13} // namespace storage
14} // namespace storm
15
16namespace storm {
17namespace prism {
19 public:
32 StateActionReward(uint_fast64_t actionIndex, std::string const& actionName, storm::expressions::Expression const& statePredicateExpression,
33 storm::expressions::Expression const& rewardValueExpression, std::string const& filename = "", uint_fast64_t lineNumber = 0);
34
35 // Create default implementations of constructors/assignment.
36 StateActionReward() = default;
37 StateActionReward(StateActionReward const& other) = default;
41
47 std::string const& getActionName() const;
48
54 uint_fast64_t getActionIndex() const;
55
62
69
75 bool isLabeled() const;
76
83 StateActionReward substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
84
85 friend std::ostream& operator<<(std::ostream& stream, StateActionReward const& stateActionReward);
86
87 private:
88 // The index of the action name.
89 uint_fast64_t actionIndex;
90
91 // The name of the command this transition-based reward is attached to.
92 std::string actionName;
93
94 // A flag that stores whether the transition reward has an action label.
95 bool labeled;
96
97 // A predicate that needs to be satisfied by states for the reward to be obtained (by taking
98 // a corresponding command transition).
99 storm::expressions::Expression statePredicateExpression;
100
101 // The expression specifying the value of the reward obtained along the transitions.
102 storm::expressions::Expression rewardValueExpression;
103};
104
105} // namespace prism
106} // namespace storm
LocatedInformation(std::string const &filename, uint_fast64_t lineNumber)
Constructs a located information with the given filename and line number.
StateActionReward(StateActionReward const &other)=default
StateActionReward & operator=(StateActionReward &&other)=default
StateActionReward(StateActionReward &&other)=default
std::string const & getActionName() const
Retrieves the action name that is associated with this transition reward.
storm::expressions::Expression const & getRewardValueExpression() const
Retrieves the reward value expression associated with this state reward.
friend std::ostream & operator<<(std::ostream &stream, StateActionReward const &stateActionReward)
storm::expressions::Expression const & getStatePredicateExpression() const
Retrieves the state predicate expression that is associated with this state reward.
bool isLabeled() const
Retrieves whether the transition reward has an action label.
uint_fast64_t getActionIndex() const
Retrieves the action index of the action associated with this transition reward (if any).
StateActionReward & operator=(StateActionReward const &other)=default
StateActionReward(uint_fast64_t actionIndex, std::string const &actionName, storm::expressions::Expression const &statePredicateExpression, storm::expressions::Expression const &rewardValueExpression, std::string const &filename="", uint_fast64_t lineNumber=0)
Creates a transition reward for the transitions with the given name emanating from states satisfying ...
StateActionReward substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the transition reward according to the given map.