16template<storm::dd::DdType DdType,
typename ValueType>
21template<storm::dd::DdType DdType,
typename ValueType>
24 std::set<storm::expressions::Variable>
const& columnMetaVariables,
25 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
30template<storm::dd::DdType DdType,
typename ValueType>
33 std::set<storm::expressions::Variable>
const& columnMetaVariables,
34 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
36 rowMetaVariables(rowMetaVariables),
37 columnMetaVariables(columnMetaVariables),
38 rowColumnMetaVariablePairs(rowColumnMetaVariablePairs) {
42template<storm::dd::DdType DdType,
typename ValueType>
48 for (uint_fast64_t i = 0; i < n; ++i) {
49 xCopy = xCopy.
swapVariables(this->rowColumnMetaVariablePairs);
59template<storm::dd::DdType DdType,
typename ValueType>
61 return LinearEquationSolverProblemFormat::EquationSystem;
64template<storm::dd::DdType DdType,
typename ValueType>
70template<storm::dd::DdType DdType,
typename ValueType>
75template<storm::dd::DdType DdType,
typename ValueType>
78 std::set<storm::expressions::Variable>
const& columnMetaVariables,
79 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs) {
80 this->setAllRows(allRows);
81 this->rowMetaVariables = rowMetaVariables;
82 this->columnMetaVariables = columnMetaVariables;
83 this->rowColumnMetaVariablePairs = rowColumnMetaVariablePairs;
86template<storm::dd::DdType DdType,
typename ValueType>
89 std::set<storm::expressions::Variable>
const& rowMetaVariables, std::set<storm::expressions::Variable>
const& columnMetaVariables,
90 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
const {
91 std::unique_ptr<storm::solver::SymbolicLinearEquationSolver<DdType, ValueType>> solver =
92 this->create(env, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs);
97template<storm::dd::DdType DdType,
typename ValueType>
100 std::set<storm::expressions::Variable>
const& columnMetaVariables,
101 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
const {
102 std::unique_ptr<storm::solver::SymbolicLinearEquationSolver<DdType, ValueType>> solver = this->create(env);
103 solver->setData(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs);
107template<storm::dd::DdType DdType,
typename ValueType>
112template<storm::dd::DdType DdType,
typename ValueType>
118std::unique_ptr<storm::solver::SymbolicLinearEquationSolver<storm::dd::DdType::Sylvan, storm::RationalFunction>>
123 if (type != EquationSolverType::Elimination) {
124 type = EquationSolverType::Elimination;
125 STORM_LOG_INFO(
"The selected equation solver is not available in the parametric dd engine. Falling back to " << toString(type) <<
" solver.");
129 case EquationSolverType::Elimination:
130 return std::make_unique<SymbolicEliminationLinearEquationSolver<storm::dd::DdType::Sylvan, storm::RationalFunction>>();
132 STORM_LOG_THROW(
false, storm::exceptions::InvalidEnvironmentException,
"Unknown solver type.");
137template<storm::dd::DdType DdType,
typename ValueType>
143 if (type != EquationSolverType::Native && type != EquationSolverType::Elimination) {
144 type = EquationSolverType::Native;
145 STORM_LOG_INFO(
"The selected equation solver is not available in the dd engine. Falling back to " << toString(type) <<
" solver.");
149 case EquationSolverType::Native:
150 return std::make_unique<SymbolicNativeLinearEquationSolver<DdType, ValueType>>();
151 case EquationSolverType::Elimination:
152 return std::make_unique<SymbolicEliminationLinearEquationSolver<DdType, ValueType>>();
154 STORM_LOG_THROW(
false, storm::exceptions::InvalidEnvironmentException,
"Unknown solver type.");
SolverEnvironment & solver()
storm::solver::EquationSolverType const & getLinearEquationSolverType() const
Add< LibraryType, ValueType > swapVariables(std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &metaVariablePairs) const
Swaps the given pairs of meta variables in the ADD.
Add< LibraryType, ValueType > multiplyMatrix(Add< LibraryType, ValueType > const &otherMatrix, std::set< storm::expressions::Variable > const &summationMetaVariables) const
Multiplies the current ADD (representing a matrix) with the given matrix by summing over the given me...
LinearEquationSolverRequirements getRequirements(Environment const &env) const
LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const
An interface that represents an abstract symbolic linear equation solver.
SymbolicLinearEquationSolver()
void setMatrix(storm::dd::Add< DdType, ValueType > const &newA)
#define STORM_LOG_INFO(message)
#define STORM_LOG_THROW(cond, exception, message)
LinearEquationSolverProblemFormat