13template<
typename ValueType>
67 STORM_LOG_ASSERT(dependency->containsDependentEvent(this->id()),
"Dependency " << *dependency <<
" has no dependent BE " << *
this <<
".");
68 STORM_LOG_ASSERT(std::find(mIngoingDependencies.begin(), mIngoingDependencies.end(), dependency) == mIngoingDependencies.end(),
69 "Ingoing Dependency " << dependency <<
" already present.");
70 mIngoingDependencies.push_back(dependency);
78 return !mIngoingDependencies.empty();
86 return mIngoingDependencies.size();
94 return mIngoingDependencies;
97 void extendSubDft(std::set<size_t>& elemsInSubtree, std::vector<size_t>
const& parentsOfSubRoot,
bool blockParents,
bool sparesAsLeaves)
const override;
115 std::stringstream stream;
121 std::vector<std::shared_ptr<DFTDependency<ValueType>>> mIngoingDependencies;
void beNoLongerFailable(size_t id)
Abstract base class for basic events (BEs) in DFTs.
size_t nrIngoingDependencies() const
Return the number of ingoing dependencies.
void addIngoingDependency(std::shared_ptr< DFTDependency< ValueType > > const &dependency)
Add dependency which can trigger this BE.
virtual std::string toString() const override
Print information about element to string.
virtual ValueType getUnreliability(ValueType time) const =0
Return the unreliability of the BE up to the given time point.
std::vector< std::shared_ptr< DFTDependency< ValueType > > > const & ingoingDependencies() const
Return ingoing dependencies.
bool isBasicElement() const override
Checks whether the element is a basic element.
virtual storm::dft::storage::elements::BEType beType() const =0
Get type of BE (constant, exponential, etc.).
storm::dft::storage::elements::DFTElementType type() const override
Get type.
DFTBE(size_t id, std::string const &name)
Constructor.
void extendSubDft(std::set< size_t > &elemsInSubtree, std::vector< size_t > const &parentsOfSubRoot, bool blockParents, bool sparesAsLeaves) const override
Helper to the independent subtree computation.
bool hasIngoingDependencies() const
Return whether the BE has ingoing dependencies.
bool checkDontCareAnymore(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const override
virtual bool canFail() const =0
Return whether the BE can fail.
size_t nrChildren() const override
Get number of children.
bool isStaticElement() const override
Check whether the element is static, ie a BE or a static gate (AND, OR, VOT).
virtual std::string distributionString() const =0
Print information about failure distribution to string.
Dependency gate with probability p.
Abstract base class for DFT elements.
virtual size_t id() const
Get id.
virtual std::string const & name() const
Get name.
#define STORM_LOG_ASSERT(cond, message)
DFTElementType
Element types in a DFT.