16template<storm::dd::DdType DdType,
typename ValueType>
21template<storm::dd::DdType DdType,
typename ValueType>
30template<storm::dd::DdType DdType,
typename ValueType>
42template<storm::dd::DdType DdType,
typename ValueType>
48 for (uint_fast64_t i = 0; i < n; ++i) {
59template<storm::dd::DdType DdType,
typename ValueType>
64template<storm::dd::DdType DdType,
typename ValueType>
70template<storm::dd::DdType DdType,
typename ValueType>
75template<storm::dd::DdType DdType,
typename ValueType>
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 =
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>
109 return this->
create(env)->getEquationProblemFormat(env);
112template<storm::dd::DdType DdType,
typename ValueType>
114 return this->
create(env)->getRequirements(env);
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.
virtual std::unique_ptr< storm::solver::SymbolicLinearEquationSolver< DdType, ValueType > > create(Environment const &env) const override
storm::dd::Bdd< DdType > allRows
SymbolicEquationSolver()=default
void setAllRows(storm::dd::Bdd< DdType > const &allRows)
std::unique_ptr< storm::solver::SymbolicLinearEquationSolver< DdType, ValueType > > create(Environment const &env, storm::dd::Bdd< DdType > const &allRows, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs) const
LinearEquationSolverRequirements getRequirements(Environment const &env) const
LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const
An interface that represents an abstract symbolic linear equation solver.
virtual void setData(storm::dd::Bdd< DdType > const &allRows, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs)
std::set< storm::expressions::Variable > columnMetaVariables
storm::dd::Add< DdType, ValueType > A
std::set< storm::expressions::Variable > rowMetaVariables
virtual storm::dd::Add< DdType, ValueType > multiply(storm::dd::Add< DdType, ValueType > const &x, storm::dd::Add< DdType, ValueType > const *b=nullptr, uint_fast64_t n=1) const
Performs repeated matrix-vector multiplication, using x[0] = x and x[i + 1] = A*x[i] + b.
std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > rowColumnMetaVariablePairs
SymbolicLinearEquationSolver()
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const
Retrieves the format in which this solver expects to solve equations.
void setMatrix(storm::dd::Add< DdType, ValueType > const &newA)
virtual LinearEquationSolverRequirements getRequirements(Environment const &env) const
Retrieves the requirements of the solver under the current settings.
#define STORM_LOG_INFO(message)
#define STORM_LOG_THROW(cond, exception, message)
LinearEquationSolverProblemFormat
std::string toString(GurobiSolverMethod const &method)
Yields a string representation of the GurobiSolverMethod.