Browse Source

Some fixes to make the branch compile with clang.

Former-commit-id: f9127a23c9
tempestpy_adaptions
dehnert 11 years ago
parent
commit
17d9df1ac7
  1. 2
      src/modelchecker/prctl/TopologicalValueIterationMdpPrctlModelChecker.h
  2. 12
      src/solver/TopologicalValueIterationNondeterministicLinearEquationSolver.cpp

2
src/modelchecker/prctl/TopologicalValueIterationMdpPrctlModelChecker.h

@ -39,7 +39,7 @@ public:
* constructed model checker will have the model of the given model checker as its associated model.
*/
explicit TopologicalValueIterationMdpPrctlModelChecker(storm::modelchecker::prctl::TopologicalValueIterationMdpPrctlModelChecker<Type> const& modelchecker)
: SparseMdpPrctlModelChecker<Type>(modelchecker), minimumOperatorStack() {
: SparseMdpPrctlModelChecker<Type>(modelchecker) {
// Intentionally left empty.
}

12
src/solver/TopologicalValueIterationNondeterministicLinearEquationSolver.cpp

@ -17,13 +17,13 @@ namespace storm {
storm::settings::Settings* settings = storm::settings::Settings::getInstance();
// Get appropriate settings.
maximalNumberOfIterations = settings->getOptionByLongName("maxiter").getArgument(0).getValueAsUnsignedInteger();
precision = settings->getOptionByLongName("precision").getArgument(0).getValueAsDouble();
relative = !settings->isSet("absolute");
this->maximalNumberOfIterations = settings->getOptionByLongName("maxiter").getArgument(0).getValueAsUnsignedInteger();
this->precision = settings->getOptionByLongName("precision").getArgument(0).getValueAsDouble();
this->relative = !settings->isSet("absolute");
}
template<typename ValueType>
TopologicalValueIterationNondeterministicLinearEquationSolver<ValueType>::TopologicalValueIterationNondeterministicLinearEquationSolver(double precision, uint_fast64_t maximalNumberOfIterations, bool relative) : NativeNondeterministicLinearEquationSolver(precision, maximalNumberOfIterations, relative) {
TopologicalValueIterationNondeterministicLinearEquationSolver<ValueType>::TopologicalValueIterationNondeterministicLinearEquationSolver(double precision, uint_fast64_t maximalNumberOfIterations, bool relative) : NativeNondeterministicLinearEquationSolver<ValueType>(precision, maximalNumberOfIterations, relative) {
// Intentionally left empty.
}
@ -80,7 +80,7 @@ namespace storm {
// For the current SCC, we need to perform value iteration until convergence.
localIterations = 0;
converged = false;
while (!converged && localIterations < maximalNumberOfIterations) {
while (!converged && localIterations < this->maximalNumberOfIterations) {
// Compute x' = A*x + b.
//A.multiplyWithVector(scc, nondeterministicChoiceIndices, *currentX, multiplyResult);
//storm::utility::addVectors(scc, nondeterministicChoiceIndices, multiplyResult, b);
@ -103,7 +103,7 @@ namespace storm {
// TODO: It seems that the equalModuloPrecision call that compares all values should have a higher
// running time. In fact, it is faster. This has to be investigated.
// converged = storm::utility::equalModuloPrecision(*currentX, *newX, scc, precision, relative);
converged = storm::utility::vector::equalModuloPrecision<ValueType>(*currentX, *newX, precision, relative);
converged = storm::utility::vector::equalModuloPrecision<ValueType>(*currentX, *newX, this->precision, this->relative);
// Update environment variables.
swap = currentX;

Loading…
Cancel
Save