Browse Source

Fixed bug with wrong row in case of nondeterminism

Former-commit-id: 24d7bd672c
main
Mavo 8 years ago
parent
commit
3d083a1719
  1. 2
      src/builder/DftExplorationHeuristic.cpp
  2. 4
      src/builder/ExplicitDFTModelBuilderApprox.cpp

2
src/builder/DftExplorationHeuristic.cpp

@ -44,9 +44,7 @@ namespace storm {
template<typename ValueType>
void DFTExplorationHeuristic<ValueType>::setHeuristicValues(size_t depth, ValueType rate, ValueType exitRate) {
std::cout << "Set priority: " << depth << ", old: " << this->depth << std::endl;
this->depth = depth;
// TODO Matthias: update rates and exitRates as well
this->rate = rate;
this->exitRate = exitRate;
}

4
src/builder/ExplicitDFTModelBuilderApprox.cpp

@ -412,7 +412,7 @@ namespace storm {
void ExplicitDFTModelBuilderApprox<ValueType, StateType>::changeMatrixLowerBound(storm::storage::SparseMatrix<ValueType> & matrix) const {
// Set lower bound for skipped states
for (auto it = skippedStates.begin(); it != skippedStates.end(); ++it) {
auto matrixEntry = matrix.getRow(it->first).begin();
auto matrixEntry = matrix.getRow(it->first, 0).begin();
STORM_LOG_ASSERT(matrixEntry->getColumn() == failedStateId, "Transition has wrong target state.");
// Get the lower bound by considering the failure of the BE with the highest rate
// The list is sorted by rate, therefore we consider the first BE for the highest failure rate
@ -424,7 +424,7 @@ namespace storm {
void ExplicitDFTModelBuilderApprox<ValueType, StateType>::changeMatrixUpperBound(storm::storage::SparseMatrix<ValueType> & matrix) const {
// Set uppper bound for skipped states
for (auto it = skippedStates.begin(); it != skippedStates.end(); ++it) {
auto matrixEntry = matrix.getRow(it->first).begin();
auto matrixEntry = matrix.getRow(it->first, 0).begin();
STORM_LOG_ASSERT(matrixEntry->getColumn() == failedStateId, "Transition has wrong target state.");
// Get the upper bound by considering the failure of all BEs
// The used formula for the rate is 1/( 1/a + 1/b + ...)

Loading…
Cancel
Save