diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 874010c6d..180f91cf8 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -211,10 +211,16 @@ namespace storm { std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::selectSolver(MatrixType&& matrix) const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); - STORM_LOG_THROW(method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic, storm::exceptions::InvalidSettingsException, "For this data type only value iteration, policy iteration, and acyclic value iteration are available."); - IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; - iterativeSolverSettings.setSolutionMethod(method); - return std::make_unique>(std::forward(matrix), std::make_unique>(), iterativeSolverSettings); + if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { + IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; + iterativeSolverSettings.setSolutionMethod(method); + result = std::make_unique>(std::forward(matrix), std::make_unique>(), iterativeSolverSettings); + } else if (method == MinMaxMethod::LinearProgramming) { + result = std::make_unique>(std::forward(matrix), std::make_unique>(), std::make_unique>()); + } else { + STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "The selected method is not available for this data type."); + } + return result; } #endif template class MinMaxLinearEquationSolver;