Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
OptimisticValueIterationHelper.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <functional>
5#include <memory>
6#include <optional>
7#include <vector>
8
12
15
16namespace storm::solver::helper {
17
22template<typename ValueType, bool TrivialRowGrouping>
24 public:
26
27 template<OptimizationDirection Dir, bool Relative>
28 SolverStatus OVI(std::pair<std::vector<ValueType>, std::vector<ValueType>>& vu, std::vector<ValueType> const& offsets, uint64_t& numIterations,
29 ValueType const& precision, ValueType const& guessValue, std::optional<ValueType> const& lowerBound = {},
30 std::optional<ValueType> const& upperBound = {},
31 std::function<SolverStatus(SolverStatus const&, std::vector<ValueType> const&)> const& iterationCallback = {}) const;
32
33 SolverStatus OVI(std::pair<std::vector<ValueType>, std::vector<ValueType>>& vu, std::vector<ValueType> const& offsets, uint64_t& numIterations,
34 bool relative, ValueType const& precision, std::optional<storm::OptimizationDirection> const& dir, ValueType const& guessValue,
35 std::optional<ValueType> const& lowerBound = {}, std::optional<ValueType> const& upperBound = {},
36 std::function<SolverStatus(SolverStatus const&, std::vector<ValueType> const&)> const& iterationCallback = {}) const;
37
38 SolverStatus OVI(std::vector<ValueType>& operand, std::vector<ValueType> const& offsets, uint64_t& numIterations, bool relative, ValueType const& precision,
39 std::optional<storm::OptimizationDirection> const& dir = {}, std::optional<ValueType> const& guessValue = {},
40 std::optional<ValueType> const& lowerBound = {}, std::optional<ValueType> const& upperBound = {},
41 std::function<SolverStatus(SolverStatus const&, std::vector<ValueType> const&)> const& iterationCallback = {},
43
44 SolverStatus OVI(std::vector<ValueType>& operand, std::vector<ValueType> const& offsets, bool relative, ValueType const& precision,
45 std::optional<storm::OptimizationDirection> const& dir = {}, std::optional<ValueType> const& guessValue = {},
46 std::optional<ValueType> const& lowerBound = {}, std::optional<ValueType> const& upperBound = {},
47 std::function<SolverStatus(SolverStatus const&, std::vector<ValueType> const&)> const& iterationCallback = {},
49
50 private:
51 template<storm::OptimizationDirection Dir, bool Relative>
52 SolverStatus GSVI(std::vector<ValueType>& operand, std::vector<ValueType> const& offsets, uint64_t& numIterations, ValueType const& precision,
53 std::function<SolverStatus(SolverStatus const&, std::vector<ValueType> const&)> const& iterationCallback = {}) const;
54
55 std::shared_ptr<ValueIterationOperator<ValueType, TrivialRowGrouping>> viOperator;
56};
57
58} // namespace storm::solver::helper
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
OptimisticValueIterationHelper(std::shared_ptr< ValueIterationOperator< ValueType, TrivialRowGrouping > > viOperator)
SolverStatus OVI(std::pair< std::vector< ValueType >, std::vector< ValueType > > &vu, std::vector< ValueType > const &offsets, uint64_t &numIterations, ValueType const &precision, ValueType const &guessValue, std::optional< ValueType > const &lowerBound={}, std::optional< ValueType > const &upperBound={}, std::function< SolverStatus(SolverStatus const &, std::vector< ValueType > const &)> const &iterationCallback={}) const
This class represents the Value Iteration Operator (also known as Bellman operator).
constexpr NullRefType NullRef
Definition OptionalRef.h:31