Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseCbAchievabilityQuery.h
Go to the documentation of this file.
1#pragma once
2
4
7
8namespace storm {
9namespace modelchecker {
10namespace multiobjective {
11
12/*
13 * This class represents an achievability query for the constraint based approach (using SMT or LP solvers).
14 */
15template<class SparseModelType>
16class SparseCbAchievabilityQuery : public SparseCbQuery<SparseModelType> {
17 public:
18 typedef typename SparseModelType::ValueType ValueType;
19
21
22 virtual ~SparseCbAchievabilityQuery() = default;
23
24 /*
25 * Invokes the computation and retrieves the result
26 */
27 virtual std::unique_ptr<CheckResult> check(Environment const& env) override;
28
29 private:
30 /*
31 * Returns whether the given thresholds are achievable.
32 */
33 bool checkAchievability();
34
35 /*
36 * Adds variable y_i for each choice i and z_j for each possible bottom state j and asserts that for every solution of the
37 * constraint system there is a scheduler under which
38 * * if choice i yields reward for an expected value objective, then y_i is the expected number of times choice i is taken.
39 * * z_j/(z_j + Sum_{i in Choices(j)} y_i) is a lower bound for the probability that starting from j no more reward is collected
40 */
41 void initializeConstraintSystem();
42
43 // Adds the thresholds of the objective values
44 void addObjectiveConstraints();
45
46 // Returns the action based rewards for the given reward model name.
47 std::vector<ValueType> getActionBasedExpectedRewards(std::string const& rewardModelName) const;
48
49 std::vector<storm::expressions::Variable> expectedChoiceVariables;
50 std::vector<storm::expressions::Variable> bottomStateVariables;
51
52 std::unique_ptr<storm::solver::SmtSolver> solver;
53};
54
55} // namespace multiobjective
56} // namespace modelchecker
57} // namespace storm
virtual std::unique_ptr< CheckResult > check(Environment const &env) override
LabParser.cpp.
Definition cli.cpp:18