Storm
A Modern Probabilistic Model Checker
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BELogNormal.h
Go to the documentation of this file.
1#pragma once
2
3#include "DFTBE.h"
4
5namespace storm::dft {
6namespace storage {
7namespace elements {
8
12template<typename ValueType>
13class BELogNormal : public DFTBE<ValueType> {
14 public:
22 BELogNormal(size_t id, std::string const& name, ValueType mean, ValueType standardDeviation)
23 : DFTBE<ValueType>(id, name), mMean(mean), mStdDev(standardDeviation) {
24 // Intentionally empty
25 }
26
27 std::shared_ptr<DFTElement<ValueType>> clone() const override {
28 return std::shared_ptr<DFTElement<ValueType>>(new BELogNormal<ValueType>(this->id(), this->name(), this->mean(), this->standardDeviation()));
29 }
30
34
35 bool canFail() const override {
36 return true;
37 }
38
43 ValueType const& mean() const {
44 return mMean;
45 }
46
51 ValueType const& standardDeviation() const {
52 return mStdDev;
53 }
54
55 ValueType getUnreliability(ValueType time) const override;
56
57 std::string distributionString() const override {
58 std::stringstream stream;
59 stream << "log-normal " << this->mean() << ", " << this->standardDeviation();
60 return stream.str();
61 }
62
63 private:
64 ValueType mMean;
65 ValueType mStdDev;
66};
67
68} // namespace elements
69} // namespace storage
70} // namespace storm::dft
BE with log-normal failure distribution.
Definition BELogNormal.h:13
ValueType const & mean() const
Return mean value parameter.
Definition BELogNormal.h:43
std::string distributionString() const override
Print information about failure distribution to string.
Definition BELogNormal.h:57
BELogNormal(size_t id, std::string const &name, ValueType mean, ValueType standardDeviation)
Constructor.
Definition BELogNormal.h:22
std::shared_ptr< DFTElement< ValueType > > clone() const override
Create a shallow copy of the element.
Definition BELogNormal.h:27
bool canFail() const override
Return whether the BE can fail.
Definition BELogNormal.h:35
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
ValueType const & standardDeviation() const
Return standard deviation parameter.
Definition BELogNormal.h:51
storm::dft::storage::elements::BEType beType() const override
Get type of BE (constant, exponential, etc.).
Definition BELogNormal.h:31
Abstract base class for basic events (BEs) in DFTs.
Definition DFTBE.h:14
virtual size_t id() const
Get id.
Definition DFTElement.h:73
virtual std::string const & name() const
Get name.
Definition DFTElement.h:89