Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
TransitionReward.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_TRANSITIONREWARD_H_
2#define STORM_STORAGE_PRISM_TRANSITIONREWARD_H_
3
4#include <map>
5
8
9namespace storm {
10namespace storage {
11namespace expressions {
12class Variable;
13}
14} // namespace storage
15} // namespace storm
16
17namespace storm {
18namespace prism {
20 public:
35 TransitionReward(uint_fast64_t actionIndex, std::string const& actionName, storm::expressions::Expression const& sourceStatePredicateExpression,
36 storm::expressions::Expression const& targetStatePredicateExpression, storm::expressions::Expression const& rewardValueExpression,
37 std::string const& filename = "", uint_fast64_t lineNumber = 0);
38
39 // Create default implementations of constructors/assignment.
40 TransitionReward() = default;
41 TransitionReward(TransitionReward const& other) = default;
45
51 std::string const& getActionName() const;
52
58 uint_fast64_t getActionIndex() const;
59
66
73
80
86 bool isLabeled() const;
87
94 TransitionReward substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
95
96 friend std::ostream& operator<<(std::ostream& stream, TransitionReward const& transitionReward);
97
98 private:
99 // The index of the action name.
100 uint_fast64_t actionIndex;
101
102 // The name of the command this transition-based reward is attached to.
103 std::string actionName;
104
105 // A flag that stores whether the transition reward has an action label.
106 bool labeled;
107
108 // A predicate that needs to be satisfied in the source state of transitions that can earn the reward.
109 storm::expressions::Expression sourceStatePredicateExpression;
110
111 // A predicate that needs to be satisfied in the target state of transitions that can earn the reward.
112 storm::expressions::Expression targetStatePredicateExpression;
113
114 // The expression specifying the value of the reward obtained along the transitions.
115 storm::expressions::Expression rewardValueExpression;
116};
117
118} // namespace prism
119} // namespace storm
120
121#endif /* STORM_STORAGE_PRISM_TRANSITIONREWARD_H_ */
TransitionReward substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the transition reward according to the given map.
uint_fast64_t getActionIndex() const
Retrieves the action index of the action associated with this transition reward (if any).
TransitionReward(TransitionReward &&other)=default
storm::expressions::Expression const & getRewardValueExpression() const
Retrieves the reward value expression associated with this state reward.
storm::expressions::Expression const & getSourceStatePredicateExpression() const
Retrieves the source state predicate expression that is associated with this state reward.
TransitionReward & operator=(TransitionReward const &other)=default
friend std::ostream & operator<<(std::ostream &stream, TransitionReward const &transitionReward)
TransitionReward & operator=(TransitionReward &&other)=default
bool isLabeled() const
Retrieves whether the transition reward has an action label.
storm::expressions::Expression const & getTargetStatePredicateExpression() const
Retrieves the target state predicate expression that is associated with this state reward.
TransitionReward(TransitionReward const &other)=default
std::string const & getActionName() const
Retrieves the action name that is associated with this transition reward.
LabParser.cpp.