@ -124,23 +124,29 @@ namespace storm {
template < typename ValueType >
template < typename ValueType >
bool IterativeMinMaxLinearEquationSolver < ValueType > : : internalSolveEquations ( OptimizationDirection dir , std : : vector < ValueType > & x , std : : vector < ValueType > const & b ) const {
bool IterativeMinMaxLinearEquationSolver < ValueType > : : internalSolveEquations ( OptimizationDirection dir , std : : vector < ValueType > & x , std : : vector < ValueType > const & b ) const {
bool result = false ;
switch ( this - > getSettings ( ) . getSolutionMethod ( ) ) {
switch ( this - > getSettings ( ) . getSolutionMethod ( ) ) {
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : ValueIteration :
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : ValueIteration :
if ( this - > getSettings ( ) . getForceSoundness ( ) ) {
if ( this - > getSettings ( ) . getForceSoundness ( ) ) {
return solveEquationsSoundValueIteration ( dir , x , b ) ;
result = solveEquationsSoundValueIteration ( dir , x , b ) ;
} else {
} else {
return solveEquationsValueIteration ( dir , x , b ) ;
result = solveEquationsValueIteration ( dir , x , b ) ;
}
}
break ;
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : PolicyIteration :
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : PolicyIteration :
return solveEquationsPolicyIteration ( dir , x , b ) ;
result = solveEquationsPolicyIteration ( dir , x , b ) ;
break ;
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : Acyclic :
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : Acyclic :
return solveEquationsAcyclic ( dir , x , b ) ;
result = solveEquationsAcyclic ( dir , x , b ) ;
break ;
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : RationalSearch :
case IterativeMinMaxLinearEquationSolverSettings < ValueType > : : SolutionMethod : : RationalSearch :
return solveEquationsRationalSearch ( dir , x , b ) ;
result = solveEquationsRationalSearch ( dir , x , b ) ;
break ;
default :
default :
STORM_LOG_THROW ( false , storm : : exceptions : : InvalidSettingsException , " This solver does not implement the selected solution method " ) ;
STORM_LOG_THROW ( false , storm : : exceptions : : InvalidSettingsException , " This solver does not implement the selected solution method " ) ;
}
}
return false ;
return result ;
}
}
template < typename ValueType >
template < typename ValueType >