Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BeliefExplorationBounds.cpp
Go to the documentation of this file.
3
4namespace storm {
5namespace pomdp {
6namespace storage {
7
8template<typename ValueType>
9ValueType PreprocessingPomdpValueBounds<ValueType>::getLowerBound(uint64_t scheduler_id, uint64_t const& state) {
10 STORM_LOG_ASSERT(!lower.empty(), "requested a lower bound but none were available");
11 return lower[scheduler_id][state];
12}
13
14template<typename ValueType>
15ValueType PreprocessingPomdpValueBounds<ValueType>::getUpperBound(uint64_t scheduler_id, uint64_t const& state) {
16 STORM_LOG_ASSERT(!upper.empty(), "requested an upper bound but none were available");
17 return upper[scheduler_id][state];
18}
19
20template<typename ValueType>
22 STORM_LOG_ASSERT(!lower.empty(), "requested a lower bound but none were available");
23 auto it = lower.begin();
24 ValueType result = (*it)[state];
25 for (++it; it != lower.end(); ++it) {
26 result = std::max(result, (*it)[state]);
27 }
28 return result;
29}
30
31template<typename ValueType>
33 STORM_LOG_ASSERT(!upper.empty(), "requested an upper bound but none were available");
34 auto it = upper.begin();
35 ValueType result = (*it)[state];
36 for (++it; it != upper.end(); ++it) {
37 result = std::min(result, (*it)[state]);
38 }
39 return result;
40}
41
42template<typename ValueType>
44 STORM_LOG_ASSERT(!values.empty(), "requested an extreme bound but none were available");
45 return values[state];
46}
47
50
51template struct ExtremePOMDPValueBound<double>;
53} // namespace storage
54} // namespace pomdp
55} // namespace storm
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
LabParser.cpp.
Definition cli.cpp:18
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.