Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BeliefExplorationBounds.cpp
Go to the documentation of this file.
2
4
5namespace storm {
6namespace pomdp {
7namespace storage {
8
9template<typename ValueType>
10ValueType PreprocessingPomdpValueBounds<ValueType>::getLowerBound(uint64_t scheduler_id, uint64_t const& state) {
11 STORM_LOG_ASSERT(!lower.empty(), "requested a lower bound but none were available");
12 return lower[scheduler_id][state];
13}
14
15template<typename ValueType>
16ValueType PreprocessingPomdpValueBounds<ValueType>::getUpperBound(uint64_t scheduler_id, uint64_t const& state) {
17 STORM_LOG_ASSERT(!upper.empty(), "requested an upper bound but none were available");
18 return upper[scheduler_id][state];
19}
20
21template<typename ValueType>
23 STORM_LOG_ASSERT(!lower.empty(), "requested a lower bound but none were available");
24 auto it = lower.begin();
25 ValueType result = (*it)[state];
26 for (++it; it != lower.end(); ++it) {
27 result = std::max(result, (*it)[state]);
28 }
29 return result;
30}
31
32template<typename ValueType>
34 STORM_LOG_ASSERT(!upper.empty(), "requested an upper bound but none were available");
35 auto it = upper.begin();
36 ValueType result = (*it)[state];
37 for (++it; it != upper.end(); ++it) {
38 result = std::min(result, (*it)[state]);
39 }
40 return result;
41}
42
43template<typename ValueType>
45 STORM_LOG_ASSERT(!values.empty(), "requested an extreme bound but none were available");
46 return values[state];
47}
48
51
52template struct ExtremePOMDPValueBound<double>;
54} // namespace storage
55} // namespace pomdp
56} // namespace storm
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
Struct to store the extreme bound values needed for the reward correction values when clipping is use...
ValueType getValueForState(uint64_t const &state)
Get the extreme bound value for a given state.
Struct for storing precomputed values bounding the actual values on the POMDP.
ValueType getLowerBound(uint64_t scheduler_id, uint64_t const &state)
Picks the precomputed lower bound for a given scheduler index and state of the POMDP.
ValueType getHighestLowerBound(uint64_t const &state)
Picks the largest precomputed lower bound for a given state of the POMDP.
ValueType getSmallestUpperBound(uint64_t const &state)
Picks the smallest precomputed upper bound for a given state of the POMDP.
ValueType getUpperBound(uint64_t scheduler_id, uint64_t const &state)
Picks the precomputed upper bound for a given scheduler index and state of the POMDP.