|
|
@ -426,7 +426,7 @@ namespace storm { |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
SparseMdpHintType<ValueType> computeHints(Environment const& env, SolutionType const& type, ModelCheckerHint const& hint, storm::OptimizationDirection const& dir, storm::storage::SparseMatrix<ValueType> const& transitionMatrix, storm::storage::SparseMatrix<ValueType> const& backwardTransitions, storm::storage::BitVector const& maybeStates, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& targetStates, boost::optional<storm::storage::BitVector> const& selectedChoices = boost::none) { |
|
|
|
SparseMdpHintType<ValueType> computeHints(Environment const& env, SolutionType const& type, ModelCheckerHint const& hint, storm::OptimizationDirection const& dir, storm::storage::SparseMatrix<ValueType> const& transitionMatrix, storm::storage::SparseMatrix<ValueType> const& backwardTransitions, storm::storage::BitVector const& maybeStates, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& targetStates, bool produceScheduler, boost::optional<storm::storage::BitVector> const& selectedChoices = boost::none) { |
|
|
|
SparseMdpHintType<ValueType> result; |
|
|
|
|
|
|
|
// The solution to the min-max equation system is unique if we minimize until probabilities or
|
|
|
@ -438,7 +438,7 @@ namespace storm { |
|
|
|
// Check for requirements of the solver.
|
|
|
|
bool hasSchedulerHint = hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint<ValueType>().hasSchedulerHint(); |
|
|
|
storm::solver::GeneralMinMaxLinearEquationSolverFactory<ValueType> minMaxLinearEquationSolverFactory; |
|
|
|
storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(env, result.uniqueSolution, dir, hasSchedulerHint); |
|
|
|
storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(env, result.uniqueSolution, dir, hasSchedulerHint, produceScheduler); |
|
|
|
if (requirements.hasEnabledRequirement()) { |
|
|
|
// If the solver still requires no end-components, we have to eliminate them later.
|
|
|
|
if (requirements.noEndComponents()) { |
|
|
@ -737,7 +737,7 @@ namespace storm { |
|
|
|
// In this case we have have to compute the remaining probabilities.
|
|
|
|
|
|
|
|
// Obtain proper hint information either from the provided hint or from requirements of the solver.
|
|
|
|
SparseMdpHintType<ValueType> hintInformation = computeHints(env, SolutionType::UntilProbabilities, hint, goal.direction(), transitionMatrix, backwardTransitions, qualitativeStateSets.maybeStates, phiStates, qualitativeStateSets.statesWithProbability1); |
|
|
|
SparseMdpHintType<ValueType> hintInformation = computeHints(env, SolutionType::UntilProbabilities, hint, goal.direction(), transitionMatrix, backwardTransitions, qualitativeStateSets.maybeStates, phiStates, qualitativeStateSets.statesWithProbability1, produceScheduler); |
|
|
|
|
|
|
|
// Declare the components of the equation system we will solve.
|
|
|
|
storm::storage::SparseMatrix<ValueType> submatrix; |
|
|
@ -1222,7 +1222,7 @@ namespace storm { |
|
|
|
} |
|
|
|
|
|
|
|
// Obtain proper hint information either from the provided hint or from requirements of the solver.
|
|
|
|
SparseMdpHintType<ValueType> hintInformation = computeHints(env, SolutionType::ExpectedRewards, hint, goal.direction(), transitionMatrix, backwardTransitions, qualitativeStateSets.maybeStates, ~qualitativeStateSets.rewardZeroStates, qualitativeStateSets.rewardZeroStates, selectedChoices); |
|
|
|
SparseMdpHintType<ValueType> hintInformation = computeHints(env, SolutionType::ExpectedRewards, hint, goal.direction(), transitionMatrix, backwardTransitions, qualitativeStateSets.maybeStates, ~qualitativeStateSets.rewardZeroStates, qualitativeStateSets.rewardZeroStates, produceScheduler, selectedChoices); |
|
|
|
|
|
|
|
// Declare the components of the equation system we will solve.
|
|
|
|
storm::storage::SparseMatrix<ValueType> submatrix; |