Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
AcyclicMinMaxLinearEquationSolver.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
7
8namespace storm {
9
10class Environment;
11
12namespace solver {
13
18template<typename ValueType>
20 public:
24
26
27 virtual void clearCache() const override;
28
30 boost::optional<storm::solver::OptimizationDirection> const& direction = boost::none,
31 bool const& hasInitialScheduler = false) const override;
32
33 protected:
34 virtual bool internalSolveEquations(storm::Environment const& env, OptimizationDirection d, std::vector<ValueType>& x,
35 std::vector<ValueType> const& b) const override;
36
37 private:
38 // cached multiplier either with original matrix or ordered matrix
39 mutable std::unique_ptr<storm::solver::Multiplier<ValueType>> multiplier;
40 // cached matrix for the multiplier (only if different from original matrix)
41 mutable boost::optional<storm::storage::SparseMatrix<ValueType>> orderedMatrix;
42 // cached row group ordering (only if not identity)
43 mutable boost::optional<std::vector<uint64_t>> rowGroupOrdering; // A.rowGroupCount() entries
44 // can be used if the entries in 'b' need to be reordered
45 mutable boost::optional<std::vector<ValueType>> auxiliaryRowVector; // A.rowCount() entries
46 // can be used if the entries in 'x' need to be reordered
47 mutable boost::optional<std::vector<ValueType>> auxiliaryRowGroupVector; // A.rowGroupCount() entries
48 // can be used if the performed scheduler choices need to be reordered
49 mutable boost::optional<std::vector<uint64_t>> auxiliaryRowGroupIndexVector; // A.rowGroupCount() entries
50 // contains factors applied to scale the entries of the 'b' vector
51 mutable std::vector<std::pair<uint64_t, ValueType>> bFactors;
52};
53} // namespace solver
54} // namespace storm
This solver can be used on equation systems that are known to be acyclic.
virtual bool internalSolveEquations(storm::Environment const &env, OptimizationDirection d, std::vector< ValueType > &x, std::vector< ValueType > const &b) const override
virtual MinMaxLinearEquationSolverRequirements getRequirements(Environment const &env, boost::optional< storm::solver::OptimizationDirection > const &direction=boost::none, bool const &hasInitialScheduler=false) const override
Retrieves the requirements of this solver for solving equations with the current settings.
virtual void clearCache() const override
Clears the currently cached data that has been stored during previous calls of the solver.
OptimizationDirectionSetting direction
The optimization direction to use for calls to functions that do not provide it explicitly....
bool hasInitialScheduler() const
Returns true iff an initial scheduler is set.
storm::storage::SparseMatrix< ValueType > const * A
A class that holds a possibly non-square matrix in the compressed row storage format.
LabParser.cpp.
Definition cli.cpp:18