From 5738701a2da7cf3355d81a8b5cc0abe7345819bd Mon Sep 17 00:00:00 2001 From: Lukas Posch Date: Tue, 2 Mar 2021 14:49:48 +0100 Subject: [PATCH] removed scheduler handling from next (except a warning) --- .../rpatl/helper/SparseSmgRpatlHelper.cpp | 15 ++------------- .../rpatl/helper/internal/GameViHelper.cpp | 17 +---------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp b/src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp index 079a193a6..350123670 100644 --- a/src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp +++ b/src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp @@ -87,15 +87,8 @@ namespace storm { template MDPSparseModelCheckingHelperReturnType SparseSmgRpatlHelper::computeNextProbabilities(Environment const& env, storm::solver::SolveGoal&& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& psiStates, bool qualitative, storm::storage::BitVector statesOfCoalition, bool produceScheduler, ModelCheckerHint const& hint) { - - auto solverEnv = env; - solverEnv.solver().minMax().setMethod(storm::solver::MinMaxMethod::ValueIteration, false); - - // Initialize the solution vector. std::vector x = std::vector(transitionMatrix.getRowGroupCount(), storm::utility::zero()); - - auto allStates = storm::storage::BitVector(transitionMatrix.getRowGroupCount(), true); - + storm::storage::BitVector allStates = storm::storage::BitVector(transitionMatrix.getRowGroupCount(), true); std::vector b = transitionMatrix.getConstrainedRowGroupSumVector(allStates, psiStates); storm::storage::BitVector clippedStatesOfCoalition(transitionMatrix.getRowGroupCount()); @@ -105,14 +98,10 @@ namespace storm { storm::modelchecker::helper::internal::GameViHelper viHelper(transitionMatrix, clippedStatesOfCoalition); std::unique_ptr> scheduler; if (produceScheduler) { - viHelper.setProduceScheduler(true); + STORM_LOG_WARN("Next formula does not expect that produceScheduler is set to true."); } viHelper.performNextIteration(env, x, b, goal.direction()); - - if (produceScheduler) { - scheduler = std::make_unique>(expandScheduler(viHelper.extractScheduler(), psiStates, ~allStates)); - } return MDPSparseModelCheckingHelperReturnType(std::move(x), std::move(scheduler)); } diff --git a/src/storm/modelchecker/rpatl/helper/internal/GameViHelper.cpp b/src/storm/modelchecker/rpatl/helper/internal/GameViHelper.cpp index e0c18d179..a19c1bc54 100644 --- a/src/storm/modelchecker/rpatl/helper/internal/GameViHelper.cpp +++ b/src/storm/modelchecker/rpatl/helper/internal/GameViHelper.cpp @@ -153,25 +153,10 @@ namespace storm { template void GameViHelper::performNextIteration(Environment const& env, std::vector& x, std::vector b, storm::solver::OptimizationDirection const dir) { prepareSolversAndMultipliersReachability(env); - ValueType precision = storm::utility::convertNumber(env.solver().game().getPrecision()); - uint64_t maxIter = env.solver().game().getMaximalNumberOfIterations(); _b = b; - _x1.assign(_transitionMatrix.getRowGroupCount(), storm::utility::zero()); _x2 = _x1; - - if (this->isProduceSchedulerSet()) { - if (!this->_producedOptimalChoices.is_initialized()) { - this->_producedOptimalChoices.emplace(); - } - this->_producedOptimalChoices->resize(this->_transitionMatrix.getRowGroupCount()); - } - - if (isProduceSchedulerSet()) { - performIterationStep(env, dir, &_producedOptimalChoices.get()); - } else - performIterationStep(env, dir); - + performIterationStep(env, dir); x = xNew(); }