Storm
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
8
9namespace storm {
10namespace storage {
11template<typename ParametricType>
13 public:
17
19 ParameterRegion(Valuation const& lowerBoundaries, Valuation const& upperBoundaries);
20 ParameterRegion(Valuation&& lowerBoundaries, Valuation&& upperBoundaries);
24
25 virtual ~ParameterRegion() = default;
26
27 std::set<VariableType> const& getVariables() const;
28 std::multimap<CoefficientType, VariableType> const& getVariablesSorted() const;
29 CoefficientType const& getLowerBoundary(VariableType const& variable) const;
30 CoefficientType const& getLowerBoundary(const std::string varName) const;
31 CoefficientType const& getUpperBoundary(VariableType const& variable) const;
32 CoefficientType const& getUpperBoundary(const std::string varName) const;
33 CoefficientType getDifference(const std::string varName) const;
34 CoefficientType getDifference(VariableType const& variable) const;
35 Valuation const& getLowerBoundaries() const;
36 Valuation const& getUpperBoundaries() const;
37
47 std::vector<Valuation> getVerticesOfRegion(std::set<VariableType> const& consideredVariables) const;
48
52 Valuation getSomePoint() const;
53
58
62 CoefficientType area() const;
63
69 void split(Valuation const& splittingPoint, std::vector<ParameterRegion<ParametricType>>& regionVector) const;
70 void split(Valuation const& splittingPoint, std::vector<ParameterRegion<ParametricType>>& regionVector,
71 std::set<VariableType> const& consideredVariables) const;
72
74 Valuation getPoint(storm::solver::OptimizationDirection dir, std::set<VariableType> const& possibleMonotoneIncrParameters,
75 std::set<VariableType> const& monDecrParameters) const;
76
77 // returns the region as string in the format 0.3<=p<=0.4,0.2<=q<=0.5;
78 std::string toString(bool boundariesAsDouble = false) const;
79
81
84
85 private:
86 void init();
87
88 bool lastSplitMonotone = false;
89 uint_fast64_t splitThreshold;
90
91 Valuation lowerBoundaries;
92 Valuation upperBoundaries;
93 std::set<VariableType> variables;
94 std::multimap<CoefficientType, VariableType> sortedOnDifference;
95 CoefficientType parentBound;
96};
97
98template<typename ParametricType>
99std::ostream& operator<<(std::ostream& out, ParameterRegion<ParametricType> const& region);
100
101} // namespace storage
102} // 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
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
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.
void split(Valuation const &splittingPoint, std::vector< ParameterRegion< ParametricType > > &regionVector, std::set< VariableType > const &consideredVariables) 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::ostream & operator<<(std::ostream &out, ParameterRegion< ParametricType > const &region)
std::map< typename VariableType< FunctionType >::type, typename CoefficientType< FunctionType >::type > Valuation
Definition parametric.h:41
LabParser.cpp.
Definition cli.cpp:18