Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Bounds.h
Go to the documentation of this file.
1#pragma once
2
3#include <utility>
4#include <vector>
5
7
9
10namespace storm {
11namespace modelchecker {
12namespace exploration_detail {
13
14template<typename StateType, typename ValueType>
16
17template<typename StateType, typename ValueType>
18class Bounds {
19 public:
20 typedef StateType ActionType;
21
22 std::pair<ValueType, ValueType> getBoundsForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation) const;
23
24 ValueType getLowerBoundForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation) const;
25
26 ValueType const& getLowerBoundForRowGroup(StateType const& rowGroup) const;
27
28 ValueType getUpperBoundForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation) const;
29
30 ValueType const& getUpperBoundForRowGroup(StateType const& rowGroup) const;
31
32 std::pair<ValueType, ValueType> const& getBoundsForAction(ActionType const& action) const;
33
34 ValueType const& getLowerBoundForAction(ActionType const& action) const;
35
36 ValueType const& getUpperBoundForAction(ActionType const& action) const;
37
38 ValueType const& getBoundForAction(storm::OptimizationDirection const& direction, ActionType const& action) const;
39
40 ValueType getDifferenceOfStateBounds(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation) const;
41
42 void initializeBoundsForNextState(std::pair<ValueType, ValueType> const& vals = std::pair<ValueType, ValueType>(storm::utility::zero<ValueType>(),
44
45 void initializeBoundsForNextAction(std::pair<ValueType, ValueType> const& vals = std::pair<ValueType, ValueType>(storm::utility::zero<ValueType>(),
47
48 void setLowerBoundForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation, ValueType const& value);
49
50 void setLowerBoundForRowGroup(StateType const& group, ValueType const& value);
51
52 void setUpperBoundForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation, ValueType const& value);
53
54 void setUpperBoundForRowGroup(StateType const& group, ValueType const& value);
55
56 void setBoundsForAction(ActionType const& action, std::pair<ValueType, ValueType> const& values);
57
58 void setBoundsForState(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation,
59 std::pair<ValueType, ValueType> const& values);
60
61 void setBoundsForRowGroup(StateType const& rowGroup, std::pair<ValueType, ValueType> const& values);
62
63 bool setLowerBoundOfStateIfGreaterThanOld(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation,
64 ValueType const& newLowerValue);
65
66 bool setUpperBoundOfStateIfLessThanOld(StateType const& state, ExplorationInformation<StateType, ValueType> const& explorationInformation,
67 ValueType const& newUpperValue);
68
69 private:
70 std::vector<std::pair<ValueType, ValueType>> boundsPerState;
71 std::vector<std::pair<ValueType, ValueType>> boundsPerAction;
72};
73
74} // namespace exploration_detail
75} // namespace modelchecker
76} // namespace storm
void setLowerBoundForRowGroup(StateType const &group, ValueType const &value)
Definition Bounds.cpp:100
ValueType const & getLowerBoundForRowGroup(StateType const &rowGroup) const
Definition Bounds.cpp:32
ValueType getDifferenceOfStateBounds(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
Definition Bounds.cpp:77
void setBoundsForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, std::pair< ValueType, ValueType > const &values)
Definition Bounds.cpp:121
std::pair< ValueType, ValueType > getBoundsForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
Definition Bounds.cpp:10
void setBoundsForAction(ActionType const &action, std::pair< ValueType, ValueType > const &values)
Definition Bounds.cpp:116
ValueType const & getUpperBoundForRowGroup(StateType const &rowGroup) const
Definition Bounds.cpp:48
std::pair< ValueType, ValueType > const & getBoundsForAction(ActionType const &action) const
Definition Bounds.cpp:53
bool setLowerBoundOfStateIfGreaterThanOld(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &newLowerValue)
Definition Bounds.cpp:133
void initializeBoundsForNextState(std::pair< ValueType, ValueType > const &vals=std::pair< ValueType, ValueType >(storm::utility::zero< ValueType >(), storm::utility::one< ValueType >()))
Definition Bounds.cpp:84
ValueType getLowerBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
Definition Bounds.cpp:21
bool setUpperBoundOfStateIfLessThanOld(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &newUpperValue)
Definition Bounds.cpp:145
ValueType const & getBoundForAction(storm::OptimizationDirection const &direction, ActionType const &action) const
Definition Bounds.cpp:68
void setBoundsForRowGroup(StateType const &rowGroup, std::pair< ValueType, ValueType > const &values)
Definition Bounds.cpp:128
void initializeBoundsForNextAction(std::pair< ValueType, ValueType > const &vals=std::pair< ValueType, ValueType >(storm::utility::zero< ValueType >(), storm::utility::one< ValueType >()))
Definition Bounds.cpp:89
ValueType getUpperBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
Definition Bounds.cpp:37
ValueType const & getLowerBoundForAction(ActionType const &action) const
Definition Bounds.cpp:58
void setUpperBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &value)
Definition Bounds.cpp:105
ValueType const & getUpperBoundForAction(ActionType const &action) const
Definition Bounds.cpp:63
void setLowerBoundForState(StateType const &state, ExplorationInformation< StateType, ValueType > const &explorationInformation, ValueType const &value)
Definition Bounds.cpp:94
void setUpperBoundForRowGroup(StateType const &group, ValueType const &value)
Definition Bounds.cpp:111
ValueType zero()
Definition constants.cpp:24
ValueType one()
Definition constants.cpp:19
solver::OptimizationDirection OptimizationDirection