Browse Source

Ensure failable dependencies are only added once

tempestpy_adaptions
Matthias Volk 6 years ago
parent
commit
53fa42f279
  1. 6
      src/storm-dft/storage/dft/DFTState.cpp

6
src/storm-dft/storage/dft/DFTState.cpp

@ -202,8 +202,10 @@ namespace storm {
assert(dependency->dependentEvents().size() == 1); assert(dependency->dependentEvents().size() == 1);
if (getElementState(dependency->dependentEvents()[0]->id()) == DFTElementState::Operational) { if (getElementState(dependency->dependentEvents()[0]->id()) == DFTElementState::Operational) {
STORM_LOG_ASSERT(!isFailsafe(dependency->dependentEvents()[0]->id()), "Dependent event is failsafe."); STORM_LOG_ASSERT(!isFailsafe(dependency->dependentEvents()[0]->id()), "Dependent event is failsafe.");
mFailableDependencies.push_back(dependency->id());
STORM_LOG_TRACE("New dependency failure: " << dependency->toString());
if (std::find(mFailableDependencies.begin(), mFailableDependencies.end(), dependency->id()) == mFailableDependencies.end()) {
mFailableDependencies.push_back(dependency->id());
STORM_LOG_TRACE("New dependency failure: " << dependency->toString());
}
} }
} }
return nrFailableDependencies() > 0; return nrFailableDependencies() > 0;

Loading…
Cancel
Save