Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ImportanceFunction.cpp
Go to the documentation of this file.
2
3namespace storm::dft {
4namespace simulator {
5
6template<typename ValueType>
8
9template<typename ValueType>
11
12template<typename ValueType>
14 size_t count = 0;
15 for (auto be : this->dft.getBasicElements()) {
16 if (state->hasFailed(be->id())) {
17 ++count;
18 }
19 }
20 return count;
21}
22
23template<typename ValueType>
25 return std::make_pair(0, this->dft.nrBasicElements());
26}
27
30
31} // namespace simulator
32} // namespace storm::dft
Importance function based on counting the number of currently failed BEs.
double getImportance(typename ImportanceFunction< ValueType >::DFTStatePointer state) const override
Get the importance for a given state.
BECountImportanceFunction(storm::dft::storage::DFT< ValueType > const &dft)
Constructor.
std::pair< double, double > getImportanceRange() const override
Get the lower and upper bounds of possible importance values computed by this importance function.
Abstract class for importance functions.
std::shared_ptr< storm::dft::storage::DFTState< ValueType > > DFTStatePointer
ImportanceFunction(storm::dft::storage::DFT< ValueType > const &dft)
Constructor.
Represents a Dynamic Fault Tree.
Definition DFT.h:52