Storm
1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BELogNormal.cpp
Go to the documentation of this file.
1
#include "
BELogNormal.h
"
2
3
#include <boost/math/distributions/lognormal.hpp>
4
5
#include "
storm/adapters/RationalFunctionAdapter.h
"
6
#include "
storm/exceptions/NotSupportedException.h
"
7
8
namespace
storm::dft
{
9
namespace
storage {
10
namespace
elements {
11
12
template
<>
13
double
BELogNormal<double>::getUnreliability
(
double
time)
const
{
14
// Compute via boost as no closed form formula exists
15
// TODO: initialize once if performance is an issue
16
boost::math::lognormal_distribution<double> distribution(this->mean(), this->standardDeviation());
17
return
boost::math::cdf(distribution, time);
18
}
19
20
template
<
typename
ValueType>
21
ValueType
BELogNormal<ValueType>::getUnreliability
(ValueType time)
const
{
22
STORM_LOG_THROW
(
false
, storm::exceptions::NotSupportedException,
"Computing cumulative failure probability not supported for this data type."
);
23
}
24
25
// Explicitly instantiate the class.
26
template
class
BELogNormal<double>
;
27
template
class
BELogNormal<RationalFunction>
;
28
29
}
// namespace elements
30
}
// namespace storage
31
}
// namespace storm::dft
BELogNormal.h
NotSupportedException.h
RationalFunctionAdapter.h
storm::dft::storage::elements::BELogNormal
BE with log-normal failure distribution.
Definition
BELogNormal.h:13
storm::dft::storage::elements::BELogNormal::getUnreliability
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
Definition
BELogNormal.cpp:21
STORM_LOG_THROW
#define STORM_LOG_THROW(cond, exception, message)
Definition
macros.h:30
storm::dft
Definition
SFTBDDPropertyFormulaAdapter.h:17
src
storm-dft
storage
elements
BELogNormal.cpp
Generated by
1.9.8