12template<
typename ValueType>
24 :
DFTBE<ValueType>(
id,
name), mActiveFailureRate(failureRate), mPassiveFailureRate(
dormancyFactor * failureRate), mTransient(transient) {
25 STORM_LOG_ASSERT(!storm::utility::isZero<ValueType>(failureRate),
"Exponential failure rate should not be zero.");
28 std::shared_ptr<DFTElement<ValueType>>
clone()
const override {
29 return std::shared_ptr<DFTElement<ValueType>>(
42 return mActiveFailureRate;
50 return mPassiveFailureRate;
86 std::stringstream stream;
92 ValueType mActiveFailureRate;
93 ValueType mPassiveFailureRate;
BE with exponential failure distribution.
std::string distributionString() const override
Print information about failure distribution to string.
std::shared_ptr< DFTElement< ValueType > > clone() const override
Create a shallow copy of the element.
ValueType const & passiveFailureRate() const
Return failure rate in passive state.
ValueType const & activeFailureRate() const
Return failure rate in active state.
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
bool canFail() const override
Return whether the BE can fail.
bool isColdBasicElement() const
Return whether the BE is a cold BE, i.e., passive failure rate = 0.
BEExponential(size_t id, std::string const &name, ValueType failureRate, ValueType dormancyFactor, bool transient=false)
Constructor.
storm::dft::storage::elements::BEType beType() const override
Get type of BE (constant, exponential, etc.).
bool isTransient() const
Return whether the BE experiences transient failures.
ValueType dormancyFactor() const
Return dormancy factor given by passive_failure_rate / active_failure_rate.
Abstract base class for basic events (BEs) in DFTs.
virtual size_t id() const
Get id.
virtual std::string const & name() const
Get name.
#define STORM_LOG_ASSERT(cond, message)
bool isZero(ValueType const &a)