Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparsePcaaQuery.h
Go to the documentation of this file.
1#ifndef STORM_MODELCHECKER_MULTIOBJECTIVE_PCAA_SPARSEPCAAQUERY_H_
2#define STORM_MODELCHECKER_MULTIOBJECTIVE_PCAA_SPARSEPCAAQUERY_H_
3
8
9namespace storm {
10
11class Environment;
12
13namespace modelchecker {
14namespace multiobjective {
15
16/*
17 * This class represents a query for the Pareto curve approximation algorithm (Pcaa).
18 * It implements the necessary computations for the different query types.
19 */
20template<class SparseModelType, typename GeometryValueType>
22 public:
23 // Typedefs for simple geometric objects
24 typedef std::vector<GeometryValueType> Point;
25 typedef std::vector<GeometryValueType> WeightVector;
26
27 virtual ~SparsePcaaQuery();
28
29 /*
30 * Invokes the computation and retrieves the result
31 */
32 virtual std::unique_ptr<CheckResult> check(Environment const& env) = 0;
33
34 /*
35 * Exports the current approximations and the currently processed points into respective .csv files located at the given directory.
36 * The polytopes are represented as the set of vertices.
37 * Note that the approximations will be intersected with a (sufficiently large) hyperrectangle in order to ensure that the polytopes are bounded
38 * This only works for 2 dimensional queries.
39 */
40 void exportPlotOfCurrentApproximation(Environment const& env) const;
41
42 protected:
43 /*
44 * Represents the information obtained in a single iteration of the algorithm
45 */
51
52 /*
53 * Creates a new query for the Pareto curve approximation algorithm (Pcaa)
54 * @param preprocessorResult the result from preprocessing
55 */
57
58 /*
59 * Returns a weight vector w that separates the under approximation from the given point p, i.e.,
60 * For each x in the under approximation, it holds that w*x <= w*p
61 *
62 * @param pointToBeSeparated the point that is to be seperated
63 */
64 WeightVector findSeparatingVector(Point const& pointToBeSeparated);
65
66 /*
67 * Refines the current result w.r.t. the given direction vector.
68 */
69 void performRefinementStep(Environment const& env, WeightVector&& direction);
70
71 /*
72 * Updates the overapproximation after a refinement step has been performed
73 *
74 * @note The last entry of this->refinementSteps should be the newest step whose information is not yet included in the approximation.
75 */
77
78 /*
79 * Updates the underapproximation after a refinement step has been performed
80 *
81 * @note The last entry of this->refinementSteps should be the newest step whose information is not yet included in the approximation.
82 */
84
85 /*
86 * Returns true iff the maximum number of refinement steps (as possibly specified in the settings) has been reached
87 */
88 bool maxStepsPerformed(Environment const& env) const;
89
90 SparseModelType const& originalModel;
92
93 std::vector<Objective<typename SparseModelType::ValueType>> objectives;
94
95 // The corresponding weight vector checker
96 std::unique_ptr<PcaaWeightVectorChecker<SparseModelType>> weightVectorChecker;
97
98 // The results in each iteration of the algorithm
99 std::vector<RefinementStep> refinementSteps;
100 // Overapproximation of the set of achievable values
101 std::shared_ptr<storm::storage::geometry::Polytope<GeometryValueType>> overApproximation;
102 // Underapproximation of the set of achievable values
103 std::shared_ptr<storm::storage::geometry::Polytope<GeometryValueType>> underApproximation;
104
105 // stores for each objective whether it still makes sense to check for this objective individually (i.e., with weight vector given by w_{i}>0 iff i=objIndex
106 // )
108};
109
110} // namespace multiobjective
111} // namespace modelchecker
112} // namespace storm
113
114#endif /* STORM_MODELCHECKER_MULTIOBJECTIVE_PCAA_SPARSEPCAAQUERY_H_ */
void performRefinementStep(Environment const &env, WeightVector &&direction)
virtual std::unique_ptr< CheckResult > check(Environment const &env)=0
std::shared_ptr< storm::storage::geometry::Polytope< GeometryValueType > > overApproximation
WeightVector findSeparatingVector(Point const &pointToBeSeparated)
std::unique_ptr< PcaaWeightVectorChecker< SparseModelType > > weightVectorChecker
bool maxStepsPerformed(Environment const &env) const
std::shared_ptr< storm::storage::geometry::Polytope< GeometryValueType > > underApproximation
void exportPlotOfCurrentApproximation(Environment const &env) const
storm::logic::MultiObjectiveFormula const & originalFormula
std::vector< Objective< typename SparseModelType::ValueType > > objectives
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
LabParser.cpp.
Definition cli.cpp:18