Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ParameterRegion.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
7#include "storm/adapters/RationalFunctionAdapter.h" // TODO: use forward header
9
10namespace storm {
11namespace storage {
12template<typename ParametricType>
14 public:
18
20 ParameterRegion(Valuation const& lowerBoundaries, Valuation const& upperBoundaries);
21 ParameterRegion(Valuation&& lowerBoundaries, Valuation&& upperBoundaries);
25
26 virtual ~ParameterRegion() = default;
27
28 std::set<VariableType> const& getVariables() const;
29 std::multimap<CoefficientType, VariableType> const& getVariablesSorted() const;
30 CoefficientType const& getLowerBoundary(VariableType const& variable) const;
31 CoefficientType const& getLowerBoundary(const std::string varName) const;
32 CoefficientType const& getUpperBoundary(VariableType const& variable) const;
33 CoefficientType const& getUpperBoundary(const std::string varName) const;
34 CoefficientType getDifference(const std::string varName) const;
35 CoefficientType getDifference(VariableType const& variable) const;
36 CoefficientType getCenter(const std::string varName) const;
37 CoefficientType getCenter(VariableType const& variable) const;
38 Valuation const& getLowerBoundaries() const;
39 Valuation const& getUpperBoundaries() const;
40
50 std::vector<Valuation> getVerticesOfRegion(std::set<VariableType> const& consideredVariables) const;
51
55 Valuation getSomePoint() const;
56
61
65 CoefficientType area() const;
66
70 bool contains(Valuation const& point) const;
71
77 void split(Valuation const& splittingPoint, std::vector<ParameterRegion<ParametricType>>& regionVector) const;
78 void split(Valuation const& splittingPoint, std::vector<ParameterRegion<ParametricType>>& regionVector, std::set<VariableType> const& consideredVariables,
79 std::set<VariableType> const& discreteVariables) const;
80
82 Valuation getPoint(storm::solver::OptimizationDirection dir, std::set<VariableType> const& possibleMonotoneIncrParameters,
83 std::set<VariableType> const& monDecrParameters) const;
84
85 // returns the region as string in the format 0.3<=p<=0.4,0.2<=q<=0.5;
86 std::string toString(bool boundariesAsDouble = false) const;
87
89
92
93 private:
94 void init();
95
96 bool lastSplitMonotone = false;
97 uint_fast64_t splitThreshold;
98
99 Valuation lowerBoundaries;
100 Valuation upperBoundaries;
101 std::set<VariableType> variables;
102 std::multimap<CoefficientType, VariableType> sortedOnDifference;
103 CoefficientType parentBound;
104};
105
106template<typename ParametricType>
107std::ostream& operator<<(std::ostream& out, ParameterRegion<ParametricType> const& region);
108
109} // namespace storage
110} // namespace storm
storm::utility::parametric::CoefficientType< ParametricType >::type CoefficientType
std::set< VariableType > const & getVariables() const
Valuation getCenterPoint() const
Returns the center point of this region.
virtual ~ParameterRegion()=default
CoefficientType area() const
Returns the area of this region.
void setBoundParent(CoefficientType bound)
ParameterRegion(ParameterRegion< ParametricType > &&other)=default
std::string toString(bool boundariesAsDouble=false) const
void split(Valuation const &splittingPoint, std::vector< ParameterRegion< ParametricType > > &regionVector, std::set< VariableType > const &consideredVariables, std::set< VariableType > const &discreteVariables) const
storm::utility::parametric::Valuation< ParametricType > Valuation
Valuation const & getLowerBoundaries() const
CoefficientType getDifference(const std::string varName) const
storm::utility::parametric::VariableType< ParametricType >::type VariableType
Valuation getPoint(storm::solver::OptimizationDirection dir, storm::analysis::MonotonicityResult< VariableType > &monRes) const
bool contains(Valuation const &point) const
Returns whether the given point is in this region.
ParameterRegion(ParameterRegion< ParametricType > const &other)=default
CoefficientType const & getLowerBoundary(VariableType const &variable) const
void split(Valuation const &splittingPoint, std::vector< ParameterRegion< ParametricType > > &regionVector) const
Splits the region at the given point and inserts the resulting subregions at the end of the given vec...
bool isSubRegion(ParameterRegion< ParametricType > region)
CoefficientType const & getUpperBoundary(VariableType const &variable) const
ParameterRegion< ParametricType > & operator=(ParameterRegion< ParametricType > const &other)=default
Valuation getSomePoint() const
Returns some point that lies within this region.
CoefficientType getCenter(const std::string varName) const
Valuation const & getUpperBoundaries() const
std::multimap< CoefficientType, VariableType > const & getVariablesSorted() const
std::vector< Valuation > getVerticesOfRegion(std::set< VariableType > const &consideredVariables) const
Returns a vector of all possible combinations of lower and upper bounds of the given variables.
std::map< typename VariableType< FunctionType >::type, typename CoefficientType< FunctionType >::type > Valuation
Definition parametric.h:43