6namespace modelchecker {
7namespace exploration_detail {
9template<
typename StateType,
typename ValueType>
14 return std::make_pair(storm::utility::zero<ValueType>(), storm::utility::one<ValueType>());
16 return boundsPerState[index];
20template<
typename StateType,
typename ValueType>
25 return storm::utility::zero<ValueType>();
27 return getLowerBoundForRowGroup(index);
31template<
typename StateType,
typename ValueType>
33 return boundsPerState[rowGroup].first;
36template<
typename StateType,
typename ValueType>
41 return storm::utility::one<ValueType>();
43 return getUpperBoundForRowGroup(index);
47template<
typename StateType,
typename ValueType>
49 return boundsPerState[rowGroup].second;
52template<
typename StateType,
typename ValueType>
54 return boundsPerAction[action];
57template<
typename StateType,
typename ValueType>
59 return boundsPerAction[action].first;
62template<
typename StateType,
typename ValueType>
64 return boundsPerAction[action].second;
67template<
typename StateType,
typename ValueType>
69 if (direction == storm::OptimizationDirection::Maximize) {
70 return getUpperBoundForAction(action);
72 return getLowerBoundForAction(action);
76template<
typename StateType,
typename ValueType>
79 std::pair<ValueType, ValueType> bounds = getBoundsForState(state, explorationInformation);
80 return bounds.second - bounds.first;
83template<
typename StateType,
typename ValueType>
85 boundsPerState.push_back(vals);
88template<
typename StateType,
typename ValueType>
90 boundsPerAction.push_back(vals);
93template<
typename StateType,
typename ValueType>
95 ValueType
const& value) {
96 setLowerBoundForRowGroup(explorationInformation.
getRowGroup(state), value);
99template<
typename StateType,
typename ValueType>
101 boundsPerState[group].first = value;
104template<
typename StateType,
typename ValueType>
106 ValueType
const& value) {
107 setUpperBoundForRowGroup(explorationInformation.
getRowGroup(state), value);
110template<
typename StateType,
typename ValueType>
112 boundsPerState[group].second = value;
115template<
typename StateType,
typename ValueType>
117 boundsPerAction[action] = values;
120template<
typename StateType,
typename ValueType>
122 std::pair<ValueType, ValueType>
const& values) {
123 StateType
const& rowGroup = explorationInformation.
getRowGroup(state);
124 setBoundsForRowGroup(rowGroup, values);
127template<
typename StateType,
typename ValueType>
129 boundsPerState[rowGroup] = values;
132template<
typename StateType,
typename ValueType>
135 ValueType
const& newLowerValue) {
136 StateType
const& rowGroup = explorationInformation.
getRowGroup(state);
137 if (boundsPerState[rowGroup].first < newLowerValue) {
138 boundsPerState[rowGroup].first = newLowerValue;
144template<
typename StateType,
typename ValueType>
147 ValueType
const& newUpperValue) {
148 StateType
const& rowGroup = explorationInformation.
getRowGroup(state);
149 if (newUpperValue < boundsPerState[rowGroup].second) {
150 boundsPerState[rowGroup].second = newUpperValue;
void setLowerBoundForRowGroup(StateType const &group, ValueType const &value)
ValueType const & getLowerBoundForRowGroup(StateType const &rowGroup) const
ValueType getDifferenceOfStateBounds(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
void setBoundsForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, std::pair< ValueType, ValueType > const &values)
std::pair< ValueType, ValueType > getBoundsForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
void setBoundsForAction(ActionType const &action, std::pair< ValueType, ValueType > const &values)
ValueType const & getUpperBoundForRowGroup(StateType const &rowGroup) const
std::pair< ValueType, ValueType > const & getBoundsForAction(ActionType const &action) const
bool setLowerBoundOfStateIfGreaterThanOld(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &newLowerValue)
void initializeBoundsForNextState(std::pair< ValueType, ValueType > const &vals=std::pair< ValueType, ValueType >(storm::utility::zero< ValueType >(), storm::utility::one< ValueType >()))
ValueType getLowerBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
bool setUpperBoundOfStateIfLessThanOld(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &newUpperValue)
ValueType const & getBoundForAction(storm::OptimizationDirection const &direction, ActionType const &action) const
void setBoundsForRowGroup(StateType const &rowGroup, std::pair< ValueType, ValueType > const &values)
void initializeBoundsForNextAction(std::pair< ValueType, ValueType > const &vals=std::pair< ValueType, ValueType >(storm::utility::zero< ValueType >(), storm::utility::one< ValueType >()))
ValueType getUpperBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
ValueType const & getLowerBoundForAction(ActionType const &action) const
void setUpperBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &value)
ValueType const & getUpperBoundForAction(ActionType const &action) const
void setLowerBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &value)
void setUpperBoundForRowGroup(StateType const &group, ValueType const &value)