diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 0ddd5b5fe..70d2de0c1 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -255,6 +255,11 @@ namespace storm { // Start by copying the requirements of the linear equation solver. MinMaxLinearEquationSolverRequirements requirements(this->linearEquationSolverFactory->getRequirements()); + // In case we perform value iteration and need to retrieve a scheduler, end components are forbidden + if (this->getSettings().getSolutionMethod() == IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::ValueIteration && isTrackSchedulerSet()) { + requirements.requireNoEndComponents(); + } + // Guide requirements by whether or not we force soundness. if (this->getSettings().getForceSoundness()) { // Only add requirements for value iteration here as the policy iteration requirements are indifferent diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp index 2f360f513..0369d301d 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp @@ -108,6 +108,21 @@ namespace storm { StandardMinMaxLinearEquationSolver::clearCache(); } + + template + MinMaxLinearEquationSolverRequirements LpMinMaxLinearEquationSolver::getRequirements(EquationSystemType const& equationSystemType, boost::optional const& direction) const { + + MinMaxLinearEquationSolverRequirements requirements; + + // In case we need to retrieve a scheduler, end components are forbidden + if (isTrackSchedulerSet()) { + requirements.requireNoEndComponents(); + } + + return requirements; + } + + template LpMinMaxLinearEquationSolverFactory::LpMinMaxLinearEquationSolverFactory(bool trackScheduler) : StandardMinMaxLinearEquationSolverFactory(MinMaxMethodSelection::LinearProgramming, trackScheduler), lpSolverFactory(std::make_unique>()) { // Intentionally left empty diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.h b/src/storm/solver/LpMinMaxLinearEquationSolver.h index a31ac710b..3e5af458f 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.h +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.h @@ -18,6 +18,8 @@ namespace storm { virtual void clearCache() const override; + virtual MinMaxLinearEquationSolverRequirements getRequirements(EquationSystemType const& equationSystemType, boost::optional const& direction = boost::none) const override; + private: std::unique_ptr> lpSolverFactory; };