Browse Source

Failed spares set use index to own id

Former-commit-id: e4da5bd5d8
tempestpy_adaptions
Mavo 9 years ago
parent
commit
2e8460548b
  1. 10
      src/storage/dft/DFT.cpp
  2. 4
      src/storage/dft/DFTElements.h

10
src/storage/dft/DFT.cpp

@ -263,10 +263,10 @@ namespace storm {
stream << "\t** " << storm::storage::toChar(state->getElementState(elem->id()));
if(elem->isSpareGate()) {
size_t useId = state->uses(elem->id());
if(state->isActive(useId)) {
stream << " actively ";
if(useId == elem->id() || state->isActive(useId)) {
stream << "actively ";
}
stream << " using " << useId;
stream << "using " << useId;
}
}
stream << std::endl;
@ -287,8 +287,8 @@ namespace storm {
if(elem->isSpareGate()) {
stream << "[";
size_t useId = state->uses(elem->id());
if(state->isActive(useId)) {
stream << " actively ";
if(useId == elem->id() || state->isActive(useId)) {
stream << "actively ";
}
stream << "using " << useId << "]";
}

4
src/storage/dft/DFTElements.h

@ -412,12 +412,12 @@ namespace storm {
}
/**
* Finish failed/failsafe spare gate by activating the children and setting the useIndex to zero.
* Finish failed/failsafe spare gate by activating the children and setting the useIndex to the spare id.
* This prevents multiple fail states with different usages or activations.
* @param state The current state.
*/
void finalizeSpare(DFTState<ValueType>& state) const {
state.setUses(this->mId, 0);
state.setUses(this->mId, this->mId);
for (auto child : this->children()) {
if (!state.isActive(child->id())) {
state.activate(child->id());

Loading…
Cancel
Save