@ -38,7 +38,7 @@ namespace storm {
namespace helper {
template < typename ValueType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeBoundedUntilProbabilities ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeBoundedUntilProbabilities ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
std : : vector < ValueType > result ( transitionMatrix . getRowGroupCount ( ) , storm : : utility : : zero < ValueType > ( ) ) ;
// Determine the states that have 0 probability of reaching the target states.
@ -46,7 +46,7 @@ namespace storm {
if ( hint . isExplicitModelCheckerHint ( ) & & hint . template asExplicitModelCheckerHint < ValueType > ( ) . getComputeOnlyMaybeStates ( ) ) {
maybeStates = hint . template asExplicitModelCheckerHint < ValueType > ( ) . getMaybeStates ( ) ;
} else {
if ( dir = = OptimizationDirection : : Minimize ) {
if ( goal . minimize ( ) ) {
maybeStates = storm : : utility : : graph : : performProbGreater0A ( transitionMatrix , transitionMatrix . getRowGroupIndices ( ) , backwardTransitions , phiStates , psiStates , true , stepBound ) ;
} else {
maybeStates = storm : : utility : : graph : : performProbGreater0E ( backwardTransitions , phiStates , psiStates , true , stepBound ) ;
@ -63,8 +63,9 @@ namespace storm {
// Create the vector with which to multiply.
std : : vector < ValueType > subresult ( maybeStates . getNumberOfSetBits ( ) ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = minMaxLinearEquationSolverFactory . create ( std : : move ( submatrix ) ) ;
solver - > repeatedMultiply ( dir , subresult , & b , stepBound ) ;
goal . restrictRelevantValues ( maybeStates ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( std : : move ( goal ) , minMaxLinearEquationSolverFactory , std : : move ( submatrix ) ) ;
solver - > repeatedMultiply ( subresult , & b , stepBound ) ;
// Set the values of the resulting vector accordingly.
storm : : utility : : vector : : setVectorValues ( result , maybeStates , subresult ) ;
@ -315,10 +316,13 @@ namespace storm {
} ;
template < typename ValueType >
MaybeStateResult < ValueType > computeValuesForMaybeStates ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & submatrix , std : : vector < ValueType > const & b , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , SparseMdpHintType < ValueType > & hint ) {
MaybeStateResult < ValueType > computeValuesForMaybeStates ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > & & submatrix , std : : vector < ValueType > const & b , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , SparseMdpHintType < ValueType > & hint ) {
// Initialize the solution vector.
std : : vector < ValueType > x = hint . hasValueHint ( ) ? std : : move ( hint . getValueHint ( ) ) : std : : vector < ValueType > ( submatrix . getRowGroupCount ( ) , hint . hasLowerResultBound ( ) ? hint . getLowerResultBound ( ) : storm : : utility : : zero < ValueType > ( ) ) ;
// Set up the solver.
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( goal , minMaxLinearEquationSolverFactory , submatrix ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( std : : move ( goal ) , minMaxLinearEquationSolverFactory , std : : move ( s ubmatrix ) ) ;
solver - > setRequirementsChecked ( ) ;
if ( hint . hasLowerResultBound ( ) ) {
solver - > setLowerBound ( hint . getLowerResultBound ( ) ) ;
@ -334,9 +338,6 @@ namespace storm {
}
solver - > setTrackScheduler ( produceScheduler ) ;
// Initialize the solution vector.
std : : vector < ValueType > x = hint . hasValueHint ( ) ? std : : move ( hint . getValueHint ( ) ) : std : : vector < ValueType > ( submatrix . getRowGroupCount ( ) , hint . hasLowerResultBound ( ) ? hint . getLowerResultBound ( ) : storm : : utility : : zero < ValueType > ( ) ) ;
// Solve the corresponding system of equations.
solver - > solveEquations ( x , b ) ;
@ -390,7 +391,7 @@ namespace storm {
}
template < typename ValueType >
QualitativeStateSetsUntilProbabilities computeQualitativeStateSetsUntilProbabilities ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates ) {
QualitativeStateSetsUntilProbabilities computeQualitativeStateSetsUntilProbabilities ( storm : : solver : : SolveGoal < ValueType > const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates ) {
QualitativeStateSetsUntilProbabilities result ;
// Get all states that have probability 0 and 1 of satisfying the until-formula.
@ -411,7 +412,7 @@ namespace storm {
}
template < typename ValueType >
QualitativeStateSetsUntilProbabilities getQualitativeStateSetsUntilProbabilities ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , ModelCheckerHint const & hint ) {
QualitativeStateSetsUntilProbabilities getQualitativeStateSetsUntilProbabilities ( storm : : solver : : SolveGoal < ValueType > const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , ModelCheckerHint const & hint ) {
if ( hint . isExplicitModelCheckerHint ( ) & & hint . template asExplicitModelCheckerHint < ValueType > ( ) . getComputeOnlyMaybeStates ( ) ) {
return getQualitativeStateSetsUntilProbabilitiesFromHint < ValueType > ( hint ) ;
} else {
@ -430,7 +431,7 @@ namespace storm {
}
template < typename ValueType >
void extendScheduler ( storm : : storage : : Scheduler < ValueType > & scheduler , storm : : solver : : SolveGoal const & goal , QualitativeStateSetsUntilProbabilities const & qualitativeStateSets , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates ) {
void extendScheduler ( storm : : storage : : Scheduler < ValueType > & scheduler , storm : : solver : : SolveGoal < ValueType > const & goal , QualitativeStateSetsUntilProbabilities const & qualitativeStateSets , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates ) {
// Finally, if we need to produce a scheduler, we also need to figure out the parts of the scheduler for
// the states with probability 1 or 0 (depending on whether we maximize or minimize).
@ -676,7 +677,7 @@ namespace storm {
}
template < typename ValueType >
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeUntilProbabilities ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeUntilProbabilities ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
STORM_LOG_THROW ( ! qualitative | | ! produceScheduler , storm : : exceptions : : InvalidSettingsException , " Cannot produce scheduler when performing qualitative model checking only. " ) ;
// Prepare resulting vector.
@ -723,7 +724,8 @@ namespace storm {
}
// Now compute the results for the maybe states.
MaybeStateResult < ValueType > resultForMaybeStates = computeValuesForMaybeStates ( goal , submatrix , b , produceScheduler , minMaxLinearEquationSolverFactory , hintInformation ) ;
goal . restrictRelevantValues ( qualitativeStateSets . maybeStates ) ;
MaybeStateResult < ValueType > resultForMaybeStates = computeValuesForMaybeStates ( std : : move ( goal ) , std : : move ( submatrix ) , b , produceScheduler , minMaxLinearEquationSolverFactory , hintInformation ) ;
// If we eliminated end components, we need to extract the result differently.
if ( ecInformation & & ecInformation . get ( ) . eliminatedEndComponents ) {
@ -752,13 +754,7 @@ namespace storm {
}
template < typename ValueType >
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeUntilProbabilities ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & phiStates , storm : : storage : : BitVector const & psiStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
storm : : solver : : SolveGoal goal ( dir ) ;
return std : : move ( computeUntilProbabilities ( goal , transitionMatrix , backwardTransitions , phiStates , psiStates , qualitative , produceScheduler , minMaxLinearEquationSolverFactory , hint ) ) ;
}
template < typename ValueType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeGloballyProbabilities ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & psiStates , bool qualitative , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , bool useMecBasedTechnique ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeGloballyProbabilities ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & psiStates , bool qualitative , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , bool useMecBasedTechnique ) {
if ( useMecBasedTechnique ) {
storm : : storage : : MaximalEndComponentDecomposition < ValueType > mecDecomposition ( transitionMatrix , backwardTransitions , psiStates ) ;
storm : : storage : : BitVector statesInPsiMecs ( transitionMatrix . getRowGroupCount ( ) ) ;
@ -768,9 +764,10 @@ namespace storm {
}
}
return std : : move ( computeUntilProbabilities ( dir , transitionMatrix , backwardTransitions , psiStates , statesInPsiMecs , qualitative , false , minMaxLinearEquationSolverFactory ) . values ) ;
return std : : move ( computeUntilProbabilities ( std : : move ( goal ) , transitionMatrix , backwardTransitions , psiStates , statesInPsiMecs , qualitative , false , minMaxLinearEquationSolverFactory ) . values ) ;
} else {
std : : vector < ValueType > result = computeUntilProbabilities ( dir = = OptimizationDirection : : Minimize ? OptimizationDirection : : Maximize : OptimizationDirection : : Minimize , transitionMatrix , backwardTransitions , storm : : storage : : BitVector ( transitionMatrix . getRowGroupCount ( ) , true ) , ~ psiStates , qualitative , false , minMaxLinearEquationSolverFactory ) . values ;
goal . oneMinus ( ) ;
std : : vector < ValueType > result = computeUntilProbabilities ( std : : move ( goal ) , transitionMatrix , backwardTransitions , storm : : storage : : BitVector ( transitionMatrix . getRowGroupCount ( ) , true ) , ~ psiStates , qualitative , false , minMaxLinearEquationSolverFactory ) . values ;
for ( auto & element : result ) {
element = storm : : utility : : one < ValueType > ( ) - element ;
}
@ -780,7 +777,7 @@ namespace storm {
template < typename ValueType >
template < typename RewardModelType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeInstantaneousRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , RewardModelType const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeInstantaneousRewards ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , RewardModelType const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
// Only compute the result if the model has a state-based reward this->getModel().
STORM_LOG_THROW ( rewardModel . hasStateRewards ( ) , storm : : exceptions : : InvalidPropertyException , " Missing reward model for formula. Skipping formula. " ) ;
@ -788,15 +785,15 @@ namespace storm {
// Initialize result to state rewards of the this->getModel().
std : : vector < ValueType > result ( rewardModel . getStateRewardVector ( ) ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = minMaxLinearEquationSolverFactory . create ( transitionMatrix ) ;
solver - > repeatedMultiply ( dir , result , nullptr , stepCount ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( std : : move ( goal ) , minMaxLinearEquationSolverFactory , transitionMatrix ) ;
solver - > repeatedMultiply ( result , nullptr , stepCount ) ;
return result ;
}
template < typename ValueType >
template < typename RewardModelType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeCumulativeRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , RewardModelType const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeCumulativeRewards ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , RewardModelType const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
// Only compute the result if the model has at least one reward this->getModel().
STORM_LOG_THROW ( ! rewardModel . empty ( ) , storm : : exceptions : : InvalidPropertyException , " Missing reward model for formula. Skipping formula. " ) ;
@ -807,30 +804,18 @@ namespace storm {
// Initialize result to the zero vector.
std : : vector < ValueType > result ( transitionMatrix . getRowGroupCount ( ) , storm : : utility : : zero < ValueType > ( ) ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = minMaxLinearEquationSolverFactory . create ( transitionMatrix ) ;
solver - > repeatedMultiply ( dir , result , & totalRewardVector , stepBound ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( std : : move ( goal ) , minMaxLinearEquationSolverFactory , transitionMatrix ) ;
solver - > repeatedMultiply ( result , & totalRewardVector , stepBound ) ;
return result ;
}
template < typename ValueType >
template < typename RewardModelType >
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , RewardModelType const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewards ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , RewardModelType const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
// Only compute the result if the model has at least one reward this->getModel().
STORM_LOG_THROW ( ! rewardModel . empty ( ) , storm : : exceptions : : InvalidPropertyException , " Missing reward model for formula. Skipping formula. " ) ;
return computeReachabilityRewardsHelper ( storm : : solver : : SolveGoal ( dir ) , transitionMatrix , backwardTransitions ,
[ & rewardModel ] ( uint_fast64_t rowCount , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : BitVector const & maybeStates ) {
return rewardModel . getTotalRewardVector ( rowCount , transitionMatrix , maybeStates ) ;
} ,
targetStates , qualitative , produceScheduler , minMaxLinearEquationSolverFactory , hint ) ;
}
template < typename ValueType >
template < typename RewardModelType >
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewards ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , RewardModelType const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
// Only compute the result if the model has at least one reward this->getModel().
STORM_LOG_THROW ( ! rewardModel . empty ( ) , storm : : exceptions : : InvalidPropertyException , " Missing reward model for formula. Skipping formula. " ) ;
return computeReachabilityRewardsHelper ( goal , transitionMatrix , backwardTransitions ,
return computeReachabilityRewardsHelper ( std : : move ( goal ) , transitionMatrix , backwardTransitions ,
[ & rewardModel ] ( uint_fast64_t rowCount , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : BitVector const & maybeStates ) {
return rewardModel . getTotalRewardVector ( rowCount , transitionMatrix , maybeStates ) ;
} ,
@ -839,10 +824,10 @@ namespace storm {
# ifdef STORM_HAVE_CARL
template < typename ValueType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : Interval > const & intervalRewardModel , bool lowerBoundOfIntervals , storm : : storage : : BitVector const & targetStates , bool qualitative , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewards ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : Interval > const & intervalRewardModel , bool lowerBoundOfIntervals , storm : : storage : : BitVector const & targetStates , bool qualitative , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
// Only compute the result if the reward model is not empty.
STORM_LOG_THROW ( ! intervalRewardModel . empty ( ) , storm : : exceptions : : InvalidPropertyException , " Missing reward model for formula. Skipping formula. " ) ;
return computeReachabilityRewardsHelper ( storm : : solver : : SolveGoal ( dir ) , transitionMatrix , backwardTransitions , \
return computeReachabilityRewardsHelper ( std : : move ( goal ) , transitionMatrix , backwardTransitions , \
[ & ] ( uint_fast64_t rowCount , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : BitVector const & maybeStates ) {
std : : vector < ValueType > result ;
result . reserve ( rowCount ) ;
@ -856,7 +841,7 @@ namespace storm {
}
template < >
std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeReachabilityRewards ( OptimizationDirection , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & , storm : : models : : sparse : : StandardRewardModel < storm : : Interval > const & , bool , storm : : storage : : BitVector const & , bool , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & ) {
std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeReachabilityRewards ( storm : : solver : : SolveGoal < storm : : RationalNumber > & & , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & , storm : : models : : sparse : : StandardRewardModel < storm : : Interval > const & , bool , storm : : storage : : BitVector const & , bool , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & ) {
STORM_LOG_THROW ( false , storm : : exceptions : : IllegalFunctionCallException , " Computing reachability rewards is unsupported for this data type. " ) ;
}
# endif
@ -875,7 +860,7 @@ namespace storm {
}
template < typename ValueType >
QualitativeStateSetsReachabilityRewards computeQualitativeStateSetsReachabilityRewards ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates ) {
QualitativeStateSetsReachabilityRewards computeQualitativeStateSetsReachabilityRewards ( storm : : solver : : SolveGoal < ValueType > const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates ) {
QualitativeStateSetsReachabilityRewards result ;
storm : : storage : : BitVector trueStates ( transitionMatrix . getRowGroupCount ( ) , true ) ;
if ( goal . minimize ( ) ) {
@ -892,7 +877,7 @@ namespace storm {
}
template < typename ValueType >
QualitativeStateSetsReachabilityRewards getQualitativeStateSetsReachabilityRewards ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates , ModelCheckerHint const & hint ) {
QualitativeStateSetsReachabilityRewards getQualitativeStateSetsReachabilityRewards ( storm : : solver : : SolveGoal < ValueType > const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates , ModelCheckerHint const & hint ) {
if ( hint . isExplicitModelCheckerHint ( ) & & hint . template asExplicitModelCheckerHint < ValueType > ( ) . getComputeOnlyMaybeStates ( ) ) {
return getQualitativeStateSetsReachabilityRewardsFromHint < ValueType > ( hint , targetStates ) ;
} else {
@ -901,7 +886,7 @@ namespace storm {
}
template < typename ValueType >
void extendScheduler ( storm : : storage : : Scheduler < ValueType > & scheduler , storm : : solver : : SolveGoal const & goal , QualitativeStateSetsReachabilityRewards const & qualitativeStateSets , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : BitVector const & targetStates ) {
void extendScheduler ( storm : : storage : : Scheduler < ValueType > & scheduler , storm : : solver : : SolveGoal < ValueType > const & goal , QualitativeStateSetsReachabilityRewards const & qualitativeStateSets , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : BitVector const & targetStates ) {
// Finally, if we need to produce a scheduler, we also need to figure out the parts of the scheduler for
// the states with reward infinity. Moreover, we have to set some arbitrary choice for the remaining states
// to obtain a fully defined scheduler.
@ -1027,7 +1012,7 @@ namespace storm {
}
template < typename ValueType >
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewardsHelper ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , std : : function < std : : vector < ValueType > ( uint_fast64_t , storm : : storage : : SparseMatrix < ValueType > const & , storm : : storage : : BitVector const & ) > const & totalStateRewardVectorGetter , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
MDPSparseModelCheckingHelperReturnType < ValueType > SparseMdpPrctlHelper < ValueType > : : computeReachabilityRewardsHelper ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , std : : function < std : : vector < ValueType > ( uint_fast64_t , storm : : storage : : SparseMatrix < ValueType > const & , storm : : storage : : BitVector const & ) > const & totalStateRewardVectorGetter , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) {
// Prepare resulting vector.
std : : vector < ValueType > result ( transitionMatrix . getRowGroupCount ( ) , storm : : utility : : zero < ValueType > ( ) ) ;
@ -1091,7 +1076,8 @@ namespace storm {
}
// Now compute the results for the maybe states.
MaybeStateResult < ValueType > resultForMaybeStates = computeValuesForMaybeStates ( goal , submatrix , b , produceScheduler , minMaxLinearEquationSolverFactory , hintInformation ) ;
goal . restrictRelevantValues ( qualitativeStateSets . maybeStates ) ;
MaybeStateResult < ValueType > resultForMaybeStates = computeValuesForMaybeStates ( std : : move ( goal ) , std : : move ( submatrix ) , b , produceScheduler , minMaxLinearEquationSolverFactory , hintInformation ) ;
// If we eliminated end components, we need to extract the result differently.
if ( ecInformation & & ecInformation . get ( ) . eliminatedEndComponents ) {
@ -1119,7 +1105,7 @@ namespace storm {
}
template < typename ValueType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeLongRunAverageProbabilities ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & psiStates , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeLongRunAverageProbabilities ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & psiStates , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
// If there are no goal states, we avoid the computation and directly return zero.
if ( psiStates . empty ( ) ) {
@ -1136,12 +1122,12 @@ namespace storm {
std : : vector < ValueType > stateRewards ( psiStates . size ( ) , storm : : utility : : zero < ValueType > ( ) ) ;
storm : : utility : : vector : : setVectorValues ( stateRewards , psiStates , storm : : utility : : one < ValueType > ( ) ) ;
storm : : models : : sparse : : StandardRewardModel < ValueType > rewardModel ( std : : move ( stateRewards ) ) ;
return computeLongRunAverageRewards ( dir , transitionMatrix , backwardTransitions , rewardModel , minMaxLinearEquationSolverFactory ) ;
return computeLongRunAverageRewards ( std : : move ( goal ) , transitionMatrix , backwardTransitions , rewardModel , minMaxLinearEquationSolverFactory ) ;
}
template < typename ValueType >
template < typename RewardModelType >
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeLongRunAverageRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , RewardModelType const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : vector < ValueType > SparseMdpPrctlHelper < ValueType > : : computeLongRunAverageRewards ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , RewardModelType const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
uint64_t numberOfStates = transitionMatrix . getRowGroupCount ( ) ;
@ -1160,7 +1146,7 @@ namespace storm {
for ( uint_fast64_t currentMecIndex = 0 ; currentMecIndex < mecDecomposition . size ( ) ; + + currentMecIndex ) {
storm : : storage : : MaximalEndComponent const & mec = mecDecomposition [ currentMecIndex ] ;
lraValuesForEndComponents [ currentMecIndex ] = computeLraForMaximalEndComponent ( dir , transitionMatrix , rewardModel , mec , minMaxLinearEquationSolverFactory ) ;
lraValuesForEndComponents [ currentMecIndex ] = computeLraForMaximalEndComponent ( goal . direction ( ) , transitionMatrix , rewardModel , mec , minMaxLinearEquationSolverFactory ) ;
// Gather information for later use.
for ( auto const & stateChoicesPair : mec ) {
@ -1270,9 +1256,10 @@ namespace storm {
STORM_LOG_THROW ( requirements . empty ( ) , storm : : exceptions : : UncheckedRequirementException , " Cannot establish requirements for solver. " ) ;
std : : vector < ValueType > sspResult ( numberOfSspStates ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = minMaxLinearEquationSolverFactory . create ( std : : move ( sspMatrix ) ) ;
goal . restrictRelevantValues ( statesNotContainedInAnyMec ) ;
std : : unique_ptr < storm : : solver : : MinMaxLinearEquationSolver < ValueType > > solver = storm : : solver : : configureMinMaxLinearEquationSolver ( std : : move ( goal ) , minMaxLinearEquationSolverFactory , sspMatrix ) ;
solver - > setRequirementsChecked ( ) ;
solver - > solveEquations ( dir , sspResult , b ) ;
solver - > solveEquations ( sspResult , b ) ;
// Prepare result vector.
std : : vector < ValueType > result ( numberOfStates , zero ) ;
@ -1458,14 +1445,14 @@ namespace storm {
}
template < typename ValueType >
std : : unique_ptr < CheckResult > SparseMdpPrctlHelper < ValueType > : : computeConditionalProbabilities ( OptimizationDirection dir , storm : : storage : : sparse : : state_type initialState , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates , storm : : storage : : BitVector const & conditionStates , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : unique_ptr < CheckResult > SparseMdpPrctlHelper < ValueType > : : computeConditionalProbabilities ( storm : : solver : : SolveGoal < ValueType > & & goal , storm : : storage : : SparseMatrix < ValueType > const & transitionMatrix , storm : : storage : : SparseMatrix < ValueType > const & backwardTransitions , storm : : storage : : BitVector const & targetStates , storm : : storage : : BitVector const & conditionStates , storm : : solver : : MinMaxLinearEquationSolverFactory < ValueType > const & minMaxLinearEquationSolverFactory ) {
std : : chrono : : high_resolution_clock : : time_point start = std : : chrono : : high_resolution_clock : : now ( ) ;
// For the max-case, we can simply take the given target states. For the min-case, however, we need to
// find the MECs of non-target states and make them the new target states.
storm : : storage : : BitVector fixedTargetStates ;
if ( dir = = OptimizationDirection : : Maximize ) {
if ( ! goal . minimize ( ) ) {
fixedTargetStates = targetStates ;
} else {
fixedTargetStates = storm : : storage : : BitVector ( targetStates . size ( ) ) ;
@ -1484,8 +1471,9 @@ namespace storm {
fixedTargetStates = storm : : utility : : graph : : performProb1A ( transitionMatrix , transitionMatrix . getRowGroupIndices ( ) , backwardTransitions , allStates , fixedTargetStates ) ;
// We solve the max-case and later adjust the result if the optimization direction was to minimize.
storm : : storage : : BitVector initialStatesBitVector ( transitionMatrix . getRowGroupCount ( ) ) ;
initialStatesBitVector . set ( initialState ) ;
storm : : storage : : BitVector initialStatesBitVector = goal . relevantValues ( ) ;
STORM_LOG_THROW ( initialStatesBitVector . getNumberOfSetBits ( ) = = 1 , storm : : exceptions : : NotSupportedException , " Computing conditional probabilities in MDPs is only supported for models with exactly one initial state. " ) ;
storm : : storage : : sparse : : state_type initialState = * initialStatesBitVector . begin ( ) ;
// Extend the condition states by computing all states that have probability 1 to go to a condition state
// under *all* schedulers.
@ -1589,8 +1577,14 @@ namespace storm {
storm : : storage : : SparseMatrix < ValueType > newTransitionMatrix = builder . build ( ) ;
STORM_LOG_DEBUG ( " Transformed model has " < < newTransitionMatrix . getRowGroupCount ( ) < < " states and " < < newTransitionMatrix . getNonzeroEntryCount ( ) < < " transitions. " ) ;
storm : : storage : : SparseMatrix < ValueType > newBackwardTransitions = newTransitionMatrix . transpose ( true ) ;
storm : : solver : : OptimizationDirection dir = goal . direction ( ) ;
if ( goal . minimize ( ) ) {
goal . oneMinus ( ) ;
}
std : : chrono : : high_resolution_clock : : time_point conditionalStart = std : : chrono : : high_resolution_clock : : now ( ) ;
std : : vector < ValueType > goalProbabilities = std : : move ( computeUntilProbabilities ( OptimizationDirection : : Maximize , newTransitionMatrix , newBackwardTransitions , storm : : storage : : BitVector ( newFailState + 1 , true ) , newGoalStates , false , false , minMaxLinearEquationSolverFactory ) . values ) ;
std : : vector < ValueType > goalProbabilities = std : : move ( computeUntilProbabilities ( std : : move ( goal ) , newTransitionMatrix , newBackwardTransitions , storm : : storage : : BitVector ( newFailState + 1 , true ) , newGoalStates , false , false , minMaxLinearEquationSolverFactory ) . values ) ;
std : : chrono : : high_resolution_clock : : time_point conditionalEnd = std : : chrono : : high_resolution_clock : : now ( ) ;
STORM_LOG_DEBUG ( " Computed conditional probabilities in transformed model in " < < std : : chrono : : duration_cast < std : : chrono : : milliseconds > ( conditionalEnd - conditionalStart ) . count ( ) < < " ms. " ) ;
@ -1598,22 +1592,20 @@ namespace storm {
}
template class SparseMdpPrctlHelper < double > ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeInstantaneousRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeCumulativeRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template MDPSparseModelCheckingHelperReturnType < double > SparseMdpPrctlHelper < double > : : computeReachabilityRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : storage : : SparseMatrix < double > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template MDPSparseModelCheckingHelperReturnType < double > SparseMdpPrctlHelper < double > : : computeReachabilityRewards ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : storage : : SparseMatrix < double > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeLongRunAverageRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : storage : : SparseMatrix < double > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeInstantaneousRewards ( storm : : solver : : SolveGoal < double > & & goal , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeCumulativeRewards ( storm : : solver : : SolveGoal < double > & & goal , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template MDPSparseModelCheckingHelperReturnType < double > SparseMdpPrctlHelper < double > : : computeReachabilityRewards ( storm : : solver : : SolveGoal < double > & & goal , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : storage : : SparseMatrix < double > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template std : : vector < double > SparseMdpPrctlHelper < double > : : computeLongRunAverageRewards ( storm : : solver : : SolveGoal < double > & & goal , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : storage : : SparseMatrix < double > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template double SparseMdpPrctlHelper < double > : : computeLraForMaximalEndComponent ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template double SparseMdpPrctlHelper < double > : : computeLraForMaximalEndComponentVI ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec , storm : : solver : : MinMaxLinearEquationSolverFactory < double > const & minMaxLinearEquationSolverFactory ) ;
template double SparseMdpPrctlHelper < double > : : computeLraForMaximalEndComponentLP ( OptimizationDirection dir , storm : : storage : : SparseMatrix < double > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < double > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec ) ;
# ifdef STORM_HAVE_CARL
template class SparseMdpPrctlHelper < storm : : RationalNumber > ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeInstantaneousRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeCumulativeRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template MDPSparseModelCheckingHelperReturnType < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeReachabilityRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template MDPSparseModelCheckingHelperReturnType < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeReachabilityRewards ( storm : : solver : : SolveGoal const & goal , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeLongRunAverageRewards ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeInstantaneousRewards ( storm : : solver : : SolveGoal < storm : : RationalNumber > & & goal , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , uint_fast64_t stepCount , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeCumulativeRewards ( storm : : solver : : SolveGoal < storm : : RationalNumber > & & goal , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , uint_fast64_t stepBound , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template MDPSparseModelCheckingHelperReturnType < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeReachabilityRewards ( storm : : solver : : SolveGoal < storm : : RationalNumber > & & goal , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : BitVector const & targetStates , bool qualitative , bool produceScheduler , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory , ModelCheckerHint const & hint ) ;
template std : : vector < storm : : RationalNumber > SparseMdpPrctlHelper < storm : : RationalNumber > : : computeLongRunAverageRewards ( storm : : solver : : SolveGoal < storm : : RationalNumber > & & goal , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & backwardTransitions , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template storm : : RationalNumber SparseMdpPrctlHelper < storm : : RationalNumber > : : computeLraForMaximalEndComponent ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template storm : : RationalNumber SparseMdpPrctlHelper < storm : : RationalNumber > : : computeLraForMaximalEndComponentVI ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec , storm : : solver : : MinMaxLinearEquationSolverFactory < storm : : RationalNumber > const & minMaxLinearEquationSolverFactory ) ;
template storm : : RationalNumber SparseMdpPrctlHelper < storm : : RationalNumber > : : computeLraForMaximalEndComponentLP ( OptimizationDirection dir , storm : : storage : : SparseMatrix < storm : : RationalNumber > const & transitionMatrix , storm : : models : : sparse : : StandardRewardModel < storm : : RationalNumber > const & rewardModel , storm : : storage : : MaximalEndComponent const & mec ) ;
xxxxxxxxxx