#include "storm/modelchecker/results/ParetoCurveCheckResult.h" #include "storm/adapters/RationalFunctionAdapter.h" #include "storm/utility/vector.h" namespace storm { namespace modelchecker { template ParetoCurveCheckResult::ParetoCurveCheckResult() { // Intentionally left empty. } template ParetoCurveCheckResult::ParetoCurveCheckResult(std::vector const& points, polytope_type const& underApproximation, polytope_type const& overApproximation) : points(points), underApproximation(underApproximation), overApproximation(overApproximation) { // Intentionally left empty. } template ParetoCurveCheckResult::ParetoCurveCheckResult(std::vector&& points, polytope_type&& underApproximation, polytope_type&& overApproximation) : points(points), underApproximation(underApproximation), overApproximation(overApproximation) { // Intentionally left empty. } template bool ParetoCurveCheckResult::isParetoCurveCheckResult() const { return true; } template std::vector::point_type> const& ParetoCurveCheckResult::getPoints() const { return points; } template bool ParetoCurveCheckResult::hasUnderApproximation() const { return bool(underApproximation); } template bool ParetoCurveCheckResult::hasOverApproximation() const { return bool(overApproximation); } template typename ParetoCurveCheckResult::polytope_type const& ParetoCurveCheckResult::getUnderApproximation() const { STORM_LOG_ASSERT(hasUnderApproximation(), "Requested under approx. of Pareto curve although it does not exist."); return underApproximation; } template typename ParetoCurveCheckResult::polytope_type const& ParetoCurveCheckResult::getOverApproximation() const { STORM_LOG_ASSERT(hasUnderApproximation(), "Requested over approx. of Pareto curve although it does not exist."); return overApproximation; } template std::ostream& ParetoCurveCheckResult::writeToStream(std::ostream& out) const { out << std::endl; if (hasUnderApproximation()) { out << "Underapproximation of achievable values: " << underApproximation->toString() << std::endl; } if (hasOverApproximation()) { out << "Overapproximation of achievable values: " << overApproximation->toString() << std::endl; } out << points.size() << " Pareto optimal points found:" << std::endl; for(auto const& p : points) { out << " ("; for(auto it = p.begin(); it != p.end(); ++it){ if(it != p.begin()){ out << ", "; } out << std::setw(10) << *it; } out << " )" << std::endl; } return out; } template class ParetoCurveCheckResult; #ifdef STORM_HAVE_CARL template class ParetoCurveCheckResult; #endif } }