Browse Source

Bugfix for the dimensions of some data of parsed Markov automata.

Former-commit-id: ab11be9ec4
tempestpy_adaptions
dehnert 11 years ago
parent
commit
577e48f8bf
  1. 6
      src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.h
  2. 2
      src/models/MarkovAutomaton.h
  3. 3
      src/parser/MarkovAutomatonSparseTransitionParser.cpp

6
src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.h

@ -302,8 +302,8 @@ namespace storm {
// Finally, we are ready to create the SSP matrix and right-hand side of the SSP.
std::vector<ValueType> b;
typename storm::storage::SparseMatrixBuilder<ValueType> sspMatrixBuilder(0, 0, 0, true, numberOfStatesNotInMecs + mecDecomposition.size() + 1);
typename storm::storage::SparseMatrixBuilder<ValueType> sspMatrixBuilder(0, 0, 0, true, numberOfStatesNotInMecs + mecDecomposition.size());
// If the source state is not contained in any MEC, we copy its choices (and perform the necessary modifications).
uint_fast64_t currentChoice = 0;
for (auto state : statesNotContainedInAnyMec) {
@ -385,7 +385,7 @@ namespace storm {
}
// Finalize the matrix and solve the corresponding system of equations.
storm::storage::SparseMatrix<ValueType> sspMatrix = sspMatrixBuilder.build(currentChoice + 1);
storm::storage::SparseMatrix<ValueType> sspMatrix = sspMatrixBuilder.build(currentChoice);
std::vector<ValueType> x(numberOfStatesNotInMecs + mecDecomposition.size());
nondeterministicLinearEquationSolver->solveEquationSystem(min, sspMatrix, x, b);

2
src/models/MarkovAutomaton.h

@ -126,7 +126,7 @@ namespace storm {
//uint_fast64_t newNumberOfRows = this->getNumberOfChoices() - numberOfHybridStates;
// Create the matrix for the new transition relation and the corresponding nondeterministic choice vector.
storm::storage::SparseMatrixBuilder<T> newTransitionMatrixBuilder(0, 0, 0, true, this->getNumberOfStates() + 1);
storm::storage::SparseMatrixBuilder<T> newTransitionMatrixBuilder(0, 0, 0, true, this->getNumberOfStates());
// Now copy over all choices that need to be kept.
uint_fast64_t currentChoice = 0;

3
src/parser/MarkovAutomatonSparseTransitionParser.cpp

@ -257,9 +257,6 @@ namespace storm {
++currentChoice;
}
// Put a sentinel element at the end.
result.transitionMatrixBuilder.newRowGroup(currentChoice);
return result;
}

Loading…
Cancel
Save