Storm
A Modern Probabilistic Model Checker
|
#include <RewardModel.h>
Public Member Functions | |
RewardModel (std::string const &rewardModelName, std::vector< storm::prism::StateReward > const &stateRewards, std::vector< storm::prism::StateActionReward > const &stateActionRewards, std::vector< storm::prism::TransitionReward > const &transitionRewards, std::string const &filename="", uint_fast64_t lineNumber=0) | |
Creates a reward model with the given name, state and transition rewards. | |
RewardModel ()=default | |
RewardModel (RewardModel const &other)=default | |
RewardModel & | operator= (RewardModel const &other)=default |
RewardModel (RewardModel &&other)=default | |
RewardModel & | operator= (RewardModel &&other)=default |
std::string const & | getName () const |
Retrieves the name of the reward model. | |
bool | empty () const |
Checks whether the reward model is empty, i.e. | |
bool | hasStateRewards () const |
Retrieves whether there are any state rewards. | |
std::vector< storm::prism::StateReward > const & | getStateRewards () const |
Retrieves all state rewards associated with this reward model. | |
bool | hasStateActionRewards () const |
Retrieves whether there are any state-action rewards. | |
std::vector< storm::prism::StateActionReward > const & | getStateActionRewards () const |
Retrieves all state-action rewards associated with this reward model. | |
bool | hasTransitionRewards () const |
Retrieves whether there are any transition rewards. | |
std::vector< storm::prism::TransitionReward > const & | getTransitionRewards () const |
Retrieves all transition rewards associated with this reward model. | |
RewardModel | substitute (std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const |
Substitutes all variables in the reward model according to the given map. | |
RewardModel | labelUnlabelledCommands (std::vector< std::pair< uint64_t, std::string > > const &newActionNames) const |
bool | containsVariablesOnlyInRewardValueExpressions (std::set< storm::expressions::Variable > const &undefinedConstantVariables) const |
Checks whether any of the given variables only appear in the expressions defining the reward value. | |
RewardModel | restrictActionRelatedRewards (storm::storage::FlatSet< uint_fast64_t > const &actionIndicesToKeep) const |
Restricts all action-related rewards of the reward model to the ones with an action index in the provided set. | |
![]() | |
LocatedInformation (std::string const &filename, uint_fast64_t lineNumber) | |
Constructs a located information with the given filename and line number. | |
LocatedInformation ()=default | |
LocatedInformation (LocatedInformation const &other)=default | |
LocatedInformation & | operator= (LocatedInformation const &other)=default |
LocatedInformation (LocatedInformation &&other)=default | |
LocatedInformation & | operator= (LocatedInformation &&other)=default |
std::string const & | getFilename () const |
Retrieves the name of the file in which the information was found. | |
void | setFilename (std::string const &filename) |
Sets the filename of this information. | |
uint_fast64_t | getLineNumber () const |
Retrieves the line number in which the information was found. | |
void | setLineNumber (uint_fast64_t lineNumber) |
Sets the line number of this information. | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, RewardModel const &rewardModel) |
Definition at line 16 of file RewardModel.h.
storm::prism::RewardModel::RewardModel | ( | std::string const & | rewardModelName, |
std::vector< storm::prism::StateReward > const & | stateRewards, | ||
std::vector< storm::prism::StateActionReward > const & | stateActionRewards, | ||
std::vector< storm::prism::TransitionReward > const & | transitionRewards, | ||
std::string const & | filename = "" , |
||
uint_fast64_t | lineNumber = 0 |
||
) |
Creates a reward model with the given name, state and transition rewards.
rewardModelName | The name of the reward model. |
stateRewards | A vector of state-based rewards. |
stateActionRewards | A vector of state-action-based rewards. |
transitionRewards | A vector of transition-based rewards. |
filename | The filename in which the reward model is defined. |
lineNumber | The line number in which the reward model is defined. |
Definition at line 5 of file RewardModel.cpp.
|
default |
|
default |
|
default |
bool storm::prism::RewardModel::containsVariablesOnlyInRewardValueExpressions | ( | std::set< storm::expressions::Variable > const & | undefinedConstantVariables | ) | const |
Checks whether any of the given variables only appear in the expressions defining the reward value.
undefinedConstantVariables | A set of variables that may only appear in the expressions defining the reward values. |
Definition at line 69 of file RewardModel.cpp.
bool storm::prism::RewardModel::empty | ( | ) | const |
Checks whether the reward model is empty, i.e.
contains no state or transition rewards.
Definition at line 20 of file RewardModel.cpp.
std::string const & storm::prism::RewardModel::getName | ( | ) | const |
Retrieves the name of the reward model.
Definition at line 16 of file RewardModel.cpp.
std::vector< storm::prism::StateActionReward > const & storm::prism::RewardModel::getStateActionRewards | ( | ) | const |
Retrieves all state-action rewards associated with this reward model.
Definition at line 36 of file RewardModel.cpp.
std::vector< storm::prism::StateReward > const & storm::prism::RewardModel::getStateRewards | ( | ) | const |
Retrieves all state rewards associated with this reward model.
Definition at line 28 of file RewardModel.cpp.
std::vector< storm::prism::TransitionReward > const & storm::prism::RewardModel::getTransitionRewards | ( | ) | const |
Retrieves all transition rewards associated with this reward model.
Definition at line 44 of file RewardModel.cpp.
bool storm::prism::RewardModel::hasStateActionRewards | ( | ) | const |
Retrieves whether there are any state-action rewards.
Definition at line 32 of file RewardModel.cpp.
bool storm::prism::RewardModel::hasStateRewards | ( | ) | const |
Retrieves whether there are any state rewards.
Definition at line 24 of file RewardModel.cpp.
bool storm::prism::RewardModel::hasTransitionRewards | ( | ) | const |
Retrieves whether there are any transition rewards.
Definition at line 40 of file RewardModel.cpp.
RewardModel storm::prism::RewardModel::labelUnlabelledCommands | ( | std::vector< std::pair< uint64_t, std::string > > const & | newActionNames | ) | const |
Definition at line 109 of file RewardModel.cpp.
|
default |
|
default |
RewardModel storm::prism::RewardModel::restrictActionRelatedRewards | ( | storm::storage::FlatSet< uint_fast64_t > const & | actionIndicesToKeep | ) | const |
Restricts all action-related rewards of the reward model to the ones with an action index in the provided set.
actionIndicesToKeep | The set of action indices to keep. |
Definition at line 91 of file RewardModel.cpp.
RewardModel storm::prism::RewardModel::substitute | ( | std::map< storm::expressions::Variable, storm::expressions::Expression > const & | substitution | ) | const |
Substitutes all variables in the reward model according to the given map.
substitution | The substitution to perform. |
Definition at line 48 of file RewardModel.cpp.
|
friend |
Definition at line 129 of file RewardModel.cpp.