10namespace modelchecker {
12template<
typename ValueType>
15 : regionResults(regionResults) {
16 auto overallArea = storm::utility::zero<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>();
18 overallArea += res.first.area();
23template<
typename ValueType>
26 : regionResults(
std::move(regionResults)) {
27 auto overallArea = storm::utility::zero<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>();
29 overallArea += res.first.area();
34template<
typename ValueType>
36 return std::make_unique<RegionCheckResult<ValueType>>(this->regionResults);
39template<
typename ValueType>
44template<
typename ValueType>
49template<
typename ValueType>
55template<
typename ValueType>
60template<
typename ValueType>
65template<
typename ValueType>
67 return illDefinedFraction;
70template<
typename ValueType>
72 writeCondensedToStream(out);
73 out <<
"\nRegion results: \n";
74 for (
auto const& res : this->regionResults) {
75 out << res.first.toString() <<
": \t" << res.second <<
'\n';
80template<
typename ValueType>
82 double satPercent = storm::utility::convertNumber<double>(satFraction) * 100.0;
83 double unsatPercent = storm::utility::convertNumber<double>(unsatFraction) * 100.0;
84 double illDefinedPercent = storm::utility::convertNumber<double>(illDefinedFraction) * 100.0;
85 auto oneHundred = storm::utility::convertNumber<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>(100.0);
86 auto one = storm::utility::convertNumber<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>(1.0);
87 out <<
" Fraction of satisfied area: " << satPercent <<
"%\n";
88 out <<
"Fraction of unsatisfied area: " << unsatPercent <<
"%\n";
89 if (illDefinedPercent > 0) {
90 out <<
"Fraction of ill-defined area: " << illDefinedPercent <<
"%\n";
92 out <<
" Unknown fraction: " << (100.0 - satPercent - unsatPercent - illDefinedPercent) <<
"%\n";
93 out <<
" Total number of regions: " << regionResults.size() <<
'\n';
94 std::map<storm::modelchecker::RegionResult, uint_fast64_t> counters;
95 for (
auto const& res : this->regionResults) {
96 ++counters[res.second];
98 for (
auto const& counter : counters) {
99 out << std::setw(28) << counter.first <<
": " << counter.second <<
'\n';
104template<
typename ValueType>
106 STORM_LOG_WARN(
"Writing illustration of region check result to a stream is not implemented.");
110template<
typename ValueType>
112 auto satArea = storm::utility::zero<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>();
113 auto unsatArea = storm::utility::zero<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>();
114 auto illDefinedArea = storm::utility::zero<typename storm::storage::ParameterRegion<ValueType>::CoefficientType>();
115 for (
auto const& res : this->regionResults) {
117 satArea += res.first.area();
119 unsatArea += res.first.area();
121 illDefinedArea += res.first.area();
124 satFraction = satArea / overallArea;
125 unsatFraction = unsatArea / overallArea;
126 illDefinedFraction = illDefinedArea / overallArea;
129template<
typename ValueType>
135#ifdef STORM_HAVE_CARL
storm::storage::ParameterRegion< ValueType >::CoefficientType const & getIllDefinedFraction() const
virtual std::ostream & writeCondensedToStream(std::ostream &out) const
virtual void initFractions(typename storm::storage::ParameterRegion< ValueType >::CoefficientType const &overallArea)
virtual std::ostream & writeIllustrationToStream(std::ostream &out) const
virtual std::ostream & writeToStream(std::ostream &out) const override
virtual bool isRegionRefinementCheckResult() const
std::vector< std::pair< storm::storage::ParameterRegion< ValueType >, storm::modelchecker::RegionResult > > const & getRegionResults() const
storm::storage::ParameterRegion< ValueType >::CoefficientType const & getSatFraction() const
storm::storage::ParameterRegion< ValueType >::CoefficientType const & getUnsatFraction() const
virtual bool isRegionCheckResult() const
RegionCheckResult(std::vector< std::pair< storm::storage::ParameterRegion< ValueType >, storm::modelchecker::RegionResult > > const ®ionResults)
virtual std::unique_ptr< CheckResult > clone() const override
virtual void filter(QualitativeCheckResult const &filter) override
Filters the current result wrt.
std::vector< std::pair< storm::storage::ParameterRegion< ValueType >, storm::modelchecker::RegionResult > > regionResults
storm::utility::parametric::CoefficientType< ParametricType >::type CoefficientType
#define STORM_LOG_WARN(message)
RegionResult
The results for a single Parameter Region.
@ AllSat
the formula is satisfied for all well-defined parameters in the given region
@ AllViolated
the formula is violated for all well-defined parameters in the given region
@ AllIllDefined
the formula is ill-defined for all parameters in the given region