|
@ -227,7 +227,7 @@ namespace storm { |
|
|
|
|
|
|
|
|
// Update environment variables.
|
|
|
// Update environment variables.
|
|
|
++iterations; |
|
|
++iterations; |
|
|
status = updateStatusIfNotConverged(status, x, iterations, maxIter); |
|
|
|
|
|
|
|
|
status = this->updateStatus(status, x, SolverGuarantee::None, iterations, maxIter); |
|
|
} while (status == SolverStatus::InProgress); |
|
|
} while (status == SolverStatus::InProgress); |
|
|
|
|
|
|
|
|
this->reportStatus(status, iterations); |
|
|
this->reportStatus(status, iterations); |
|
@ -327,7 +327,7 @@ namespace storm { |
|
|
// Update environment variables.
|
|
|
// Update environment variables.
|
|
|
std::swap(currentX, newX); |
|
|
std::swap(currentX, newX); |
|
|
++iterations; |
|
|
++iterations; |
|
|
status = updateStatusIfNotConverged(status, *currentX, iterations, maxIter); |
|
|
|
|
|
|
|
|
status = this->updateStatus(status, *currentX, SolverGuarantee::None, iterations, maxIter); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this->reportStatus(status, iterations); |
|
|
this->reportStatus(status, iterations); |
|
@ -560,20 +560,6 @@ namespace storm { |
|
|
return this->player2Matrix.getRowGroupCount(); |
|
|
return this->player2Matrix.getRowGroupCount(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
|
|
SolverStatus StandardGameSolver<ValueType>::updateStatusIfNotConverged(SolverStatus status, std::vector<ValueType> const& x, uint64_t iterations, uint64_t maximalNumberOfIterations) const { |
|
|
|
|
|
if (status != SolverStatus::Converged) { |
|
|
|
|
|
if (this->hasCustomTerminationCondition() && this->getTerminationCondition().terminateNow(x)) { |
|
|
|
|
|
status = SolverStatus::TerminatedEarly; |
|
|
|
|
|
} else if (iterations >= maximalNumberOfIterations) { |
|
|
|
|
|
status = SolverStatus::MaximalIterationsExceeded; |
|
|
|
|
|
} else if (storm::utility::resources::isTerminate()) { |
|
|
|
|
|
status = SolverStatus::Aborted; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return status; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
template<typename ValueType> |
|
|
void StandardGameSolver<ValueType>::clearCache() const { |
|
|
void StandardGameSolver<ValueType>::clearCache() const { |
|
|
multiplierPlayer2Matrix.reset(); |
|
|
multiplierPlayer2Matrix.reset(); |
|
|