Browse Source

Updated extendSpareModule()

tempestpy_adaptions
Matthias Volk 6 years ago
parent
commit
c7d2db4260
  1. 5
      src/storm-dft/storage/dft/elements/DFTDependency.h
  2. 4
      src/storm-dft/storage/dft/elements/DFTGate.h
  3. 8
      src/storm-dft/storage/dft/elements/DFTRestriction.h

5
src/storm-dft/storage/dft/elements/DFTDependency.h

@ -65,7 +65,10 @@ namespace storm {
DFTDependency<ValueType> const& otherDEP= static_cast<DFTDependency<ValueType> const&>(other);
return (mProbability == otherDEP.mProbability);
}
virtual void extendSpareModule(std::set<size_t>& elementsInSpareModule) const override {
// Do nothing
}
virtual std::vector<size_t> independentUnit() const override {
std::set<size_t> unit = {this->mId};

4
src/storm-dft/storage/dft/elements/DFTGate.h

@ -49,8 +49,8 @@ namespace storm {
virtual void extendSpareModule(std::set<size_t>& elementsInSpareModule) const override {
if (!this->isSpareGate()) {
DFTElement<ValueType>::extendSpareModule(elementsInSpareModule);
for( auto const& child : mChildren) {
if(elementsInSpareModule.count(child->id()) == 0) {
for (auto const& child : mChildren) {
if (elementsInSpareModule.count(child->id()) == 0) {
elementsInSpareModule.insert(child->id());
child->extendSpareModule(elementsInSpareModule);
}

8
src/storm-dft/storage/dft/elements/DFTRestriction.h

@ -54,13 +54,7 @@ namespace storm {
virtual void checkFailsafe(storm::storage::DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const = 0;
virtual void extendSpareModule(std::set<size_t>& elementsInSpareModule) const override {
DFTElement<ValueType>::extendSpareModule(elementsInSpareModule);
for(auto const& child : mChildren) {
if(elementsInSpareModule.count(child->id()) == 0) {
elementsInSpareModule.insert(child->id());
child->extendSpareModule(elementsInSpareModule);
}
}
// Do nothing
}
virtual std::vector<size_t> independentUnit() const override {

Loading…
Cancel
Save