|
|
@ -7,7 +7,7 @@ namespace storm { |
|
|
|
namespace storage { |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
DFTState<ValueType>::DFTState(DFT<ValueType> const& dft, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) : mStatus(dft.stateBitVectorSize()), mId(id), failableElements(dft.nrElements()), mPseudoState(false), mDft(dft), mStateGenerationInfo(stateGenerationInfo) { |
|
|
|
DFTState<ValueType>::DFTState(DFT<ValueType> const& dft, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) : mStatus(dft.stateBitVectorSize()), mId(id), failableElements(dft.nrElements()), indexRelevant(0), mPseudoState(false), mDft(dft), mStateGenerationInfo(stateGenerationInfo) { |
|
|
|
// TODO: use construct()
|
|
|
|
|
|
|
|
// Initialize uses
|
|
|
@ -33,7 +33,7 @@ namespace storm { |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
DFTState<ValueType>::DFTState(storm::storage::BitVector const& status, DFT<ValueType> const& dft, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) : mStatus(status), mId(id), failableElements(dft.nrElements()), mPseudoState(true), mDft(dft), mStateGenerationInfo(stateGenerationInfo) { |
|
|
|
DFTState<ValueType>::DFTState(storm::storage::BitVector const& status, DFT<ValueType> const& dft, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) : mStatus(status), mId(id), failableElements(dft.nrElements()), indexRelevant(0), mPseudoState(true), mDft(dft), mStateGenerationInfo(stateGenerationInfo) { |
|
|
|
// Intentionally left empty
|
|
|
|
} |
|
|
|
|
|
|
@ -470,6 +470,22 @@ namespace storm { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
bool DFTState<ValueType>::hasOperationalRelevantEvent() { |
|
|
|
// Iterate over remaining relevant events
|
|
|
|
// All events with index < indexRelevant are already failed
|
|
|
|
while (indexRelevant < mDft.getRelevantEvents().size()) { |
|
|
|
if (isOperational(mDft.getRelevantEvents()[indexRelevant])) { |
|
|
|
// Relevant event is still operational
|
|
|
|
return true; |
|
|
|
} else { |
|
|
|
// Consider next relevant event
|
|
|
|
++indexRelevant; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
bool DFTState<ValueType>::claimNew(size_t spareId, size_t currentlyUses, std::vector<std::shared_ptr<DFTElement<ValueType>>> const& children) { |
|
|
|
auto it = children.begin(); |
|
|
|