45 if (this->getParameterSpace().getVariables().size() == 2) {
47 auto x = *this->getParameterSpace().getVariables().begin();
48 auto y = *(this->getParameterSpace().getVariables().rbegin());
50 uint_fast64_t
const sizeX = 128;
51 uint_fast64_t
const sizeY = 64;
53 out <<
"Region refinement Check result (visualization):\n";
54 out <<
" \t x-axis: " << x <<
" \t y-axis: " << y <<
" \t S=safe, [ ]=unsafe, -=ambiguous \n";
55 for (uint_fast64_t i = 0; i < sizeX + 2; ++i) {
60 CoefficientType deltaX =
61 (getParameterSpace().getUpperBoundary(x) - getParameterSpace().getLowerBoundary(x)) / storm::utility::convertNumber<CoefficientType>(sizeX);
62 CoefficientType deltaY =
63 (getParameterSpace().getUpperBoundary(y) - getParameterSpace().getLowerBoundary(y)) / storm::utility::convertNumber<CoefficientType>(sizeY);
64 CoefficientType printedRegionArea = deltaX * deltaY;
65 for (CoefficientType yUpper = getParameterSpace().getUpperBoundary(y); yUpper != getParameterSpace().getLowerBoundary(y); yUpper -= deltaY) {
66 CoefficientType yLower = yUpper - deltaY;
68 for (CoefficientType xLower = getParameterSpace().getLowerBoundary(x); xLower != getParameterSpace().getUpperBoundary(x); xLower += deltaX) {
69 CoefficientType xUpper = xLower + deltaX;
70 bool currRegionSafe =
false;
71 bool currRegionUnSafe =
false;
72 bool currRegionComplete =
false;
73 CoefficientType coveredArea = storm::utility::zero<CoefficientType>();
74 for (
auto const& r : this->getRegionResults()) {
78 CoefficientType interesctionSizeY = std::min(yUpper, r.first.getUpperBoundary(y)) - std::max(yLower, r.first.getLowerBoundary(y));
79 interesctionSizeY = std::max(interesctionSizeY, storm::utility::zero<CoefficientType>());
80 CoefficientType interesctionSizeX = std::min(xUpper, r.first.getUpperBoundary(x)) - std::max(xLower, r.first.getLowerBoundary(x));
81 interesctionSizeX = std::max(interesctionSizeX, storm::utility::zero<CoefficientType>());
82 CoefficientType instersectionArea = interesctionSizeY * interesctionSizeX;
86 coveredArea += instersectionArea;
87 if (currRegionSafe && currRegionUnSafe) {
90 if (coveredArea == printedRegionArea) {
91 currRegionComplete =
true;
96 if (currRegionComplete && currRegionSafe && !currRegionUnSafe) {
98 }
else if (currRegionComplete && currRegionUnSafe && !currRegionSafe) {
106 for (uint_fast64_t i = 0; i < sizeX + 2; ++i) {
111 STORM_LOG_WARN(
"Writing illustration of region check result to a stream is only implemented for two parameters.");