19using namespace stateelimination;
22template<
typename ValueType>
27template<
typename ValueType>
32template<
typename ValueType>
37template<
typename ValueType>
44template<
typename ValueType>
46 localA = std::make_unique<storm::storage::SparseMatrix<ValueType>>(std::move(A));
47 this->A = localA.get();
51template<
typename ValueType>
53 std::vector<ValueType>
const& b)
const {
58 STORM_LOG_INFO(
"Solving linear equation system (" << x.size() <<
" rows) with elimination");
70 boost::optional<std::vector<uint_fast64_t>> distanceBasedPriorities;
85 std::shared_ptr<StatePriorityQueue> priorityQueue =
86 createStatePriorityQueue<ValueType>(distanceBasedPriorities, flexibleMatrix, flexibleBackwardTransitions, b,
storm::storage::BitVector(x.size(),
true));
92 while (priorityQueue->hasNext()) {
93 auto state = priorityQueue->pop();
100template<
typename ValueType>
105template<
typename ValueType>
107 return this->A->getRowCount();
110template<
typename ValueType>
111uint64_t EliminationLinearEquationSolver<ValueType>::getMatrixColumnCount()
const {
112 return this->A->getColumnCount();
115template<
typename ValueType>
117 return std::make_unique<storm::solver::EliminationLinearEquationSolver<ValueType>>();
120template<
typename ValueType>
122 return std::make_unique<EliminationLinearEquationSolverFactory<ValueType>>(*this);
128#ifdef STORM_HAVE_CARL
EliminationOrder
An enum that contains all available state elimination orders.
virtual std::unique_ptr< storm::solver::LinearEquationSolver< ValueType > > create(Environment const &env) const override
Creates an equation solver with the current settings, but without a matrix.
virtual std::unique_ptr< LinearEquationSolverFactory< ValueType > > clone() const override
Creates a copy of this factory.
A class that uses gaussian elimination to implement the LinearEquationSolver interface.
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const override
Retrieves the format in which this solver expects to solve equations.
virtual void setMatrix(storm::storage::SparseMatrix< ValueType > const &A) override
virtual bool internalSolveEquations(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const override
EliminationLinearEquationSolver()
void eliminateState(storm::storage::sparse::state_type state, bool removeForwardTransitions)
A bit vector that is internally represented as a vector of 64-bit values.
The flexible sparse matrix is used during state elimination.
A class that holds a possibly non-square matrix in the compressed row storage format.
storm::storage::SparseMatrix< value_type > transpose(bool joinGroups=false, bool keepZeros=false) const
Transposes the matrix.
#define STORM_LOG_INFO(message)
SettingsType const & getModule()
Get module.
LinearEquationSolverProblemFormat
storm::storage::BitVector getBsccCover(storm::storage::SparseMatrix< T > const &transitionMatrix)
Retrieves a set of states that covers als BSCCs of the system in the sense that for every BSCC exactl...
bool eliminationOrderNeedsForwardDistances(storm::settings::modules::EliminationSettings::EliminationOrder const &order)
bool eliminationOrderNeedsDistances(storm::settings::modules::EliminationSettings::EliminationOrder const &order)
std::vector< uint_fast64_t > getDistanceBasedPriorities(storm::storage::SparseMatrix< ValueType > const &transitionMatrix, storm::storage::SparseMatrix< ValueType > const &transitionMatrixTransposed, storm::storage::BitVector const &initialStates, std::vector< ValueType > const &oneStepProbabilities, bool forward, bool reverse)
bool eliminationOrderNeedsReversedDistances(storm::settings::modules::EliminationSettings::EliminationOrder const &order)