Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BEWeibull.cpp
Go to the documentation of this file.
1#include "BEWeibull.h"
2
4
5namespace storm::dft {
6namespace storage {
7namespace elements {
8
9template<>
10double BEWeibull<double>::getUnreliability(double time) const {
11 // 1 - e^(-(t / lambda)^k)
12 // where lambda is the rate and k the shape
13 return 1 - exp(-std::pow(time / this->rate(), this->shape()));
14}
15
16template<typename ValueType>
17ValueType BEWeibull<ValueType>::getUnreliability(ValueType time) const {
18 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing cumulative failure probability not supported for this data type.");
19}
20
21// Explicitly instantiate the class.
22template class BEWeibull<double>;
23template class BEWeibull<RationalFunction>;
24
25} // namespace elements
26} // namespace storage
27} // namespace storm::dft
BE with Weibull failure distribution.
Definition BEWeibull.h:13
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
Definition BEWeibull.cpp:17
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30