Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Objective.h
Go to the documentation of this file.
1#pragma once
2
3#include <boost/optional.hpp>
4
5#include "storm/logic/Bound.h"
10
11namespace storm {
12namespace modelchecker {
13namespace multiobjective {
14template<typename ValueType>
15struct Objective {
16 // the original input formula
17 std::shared_ptr<storm::logic::Formula const> originalFormula;
18
19 // The preprocessed (simplified) formula
20 std::shared_ptr<storm::logic::OperatorFormula const> formula;
21
22 // True iff the complementary event is considered.
23 // E.g. if we consider P<1-t [F !"safe"] instead of P>=t [ G "safe"]
25
26 // Limitations for the quantitative objective value (e.g. 0 <= value <= 1 for probabilities).
27 // Can be used to guide the underlying solver
28 boost::optional<ValueType> lowerResultBound, upperResultBound;
29
30 ValueType clipResult(ValueType const& value) const {
32 if (lowerResultBound && value < *lowerResultBound) {
33 return *lowerResultBound;
34 } else if (upperResultBound && value > *upperResultBound) {
35 return *upperResultBound;
36 } else {
37 return value;
38 }
39 }
40
41 void printToStream(std::ostream& out) const {
42 out << "Original: " << *originalFormula;
43 out << " \t";
44 out << "Preprocessed: " << *formula;
46 out << " (Complementary event)";
47 }
48 out << " \t";
49 out << "result bounds: ";
51 out << "[" << *lowerResultBound << ", " << *upperResultBound << "]";
52 } else if (lowerResultBound) {
53 out << ">=" << *lowerResultBound;
54 } else if (upperResultBound) {
55 out << "<=" << *upperResultBound;
56 } else {
57 out << " -none- ";
58 }
59 }
60};
61} // namespace multiobjective
62} // namespace modelchecker
63} // namespace storm
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
boost::optional< ValueType > upperResultBound
Definition Objective.h:28
boost::optional< ValueType > lowerResultBound
Definition Objective.h:28
std::shared_ptr< storm::logic::Formula const > originalFormula
Definition Objective.h:17
void printToStream(std::ostream &out) const
Definition Objective.h:41
ValueType clipResult(ValueType const &value) const
Definition Objective.h:30
std::shared_ptr< storm::logic::OperatorFormula const > formula
Definition Objective.h:20