16template<
typename ValueType>
18 std::stringstream stream;
23 stream <<
dft.getElement(*it)->name();
26 stream <<
", " <<
dft.getElement(*it)->name();
34 bool staticElements,
bool fullyStatic,
bool singleBE)
37 "Representative " + std::to_string(
representative) +
" must be contained in module.");
42 std::set<size_t> allElements =
elements;
43 for (
auto const& submodule : submodules) {
44 allElements.merge(submodule.getAllElements());
49template<
typename ValueType>
52 std::unordered_set<std::string> depInConflict;
54 auto const tmpElement =
dft.getElement(
id);
55 builder.cloneElement(tmpElement);
57 if (tmpElement->isDependency() &&
dft.isDependencyInConflict(tmpElement->id())) {
58 depInConflict.insert(tmpElement->name());
64 for (
size_t id : subdft.getDependencies()) {
66 if (depInConflict.find(subdft.getElement(
id)->name()) == depInConflict.end()) {
67 subdft.setDependencyNotInConflict(
id);
73template<
typename ValueType>
75 std::stringstream stream;
77 std::string subIndentation = indentation +
" ";
79 stream <<
"\n" << subIndentation <<
"Sub-module " << submodule.toString(
dft, subIndentation);
Represents a Dynamic Fault Tree.
DftIndependentModule(size_t representative, std::set< size_t > const &elements, std::set< DftIndependentModule > const &submodules, bool staticElements, bool fullyStatic, bool singleBE)
Constructor.
std::string toString(storm::dft::storage::DFT< ValueType > const &dft, std::string const &indentation="") const
Get string representation of module.
std::set< size_t > getAllElements() const
Returns all elements contained in the module (including sub-modules).
storm::dft::storage::DFT< ValueType > getSubtree(storm::dft::storage::DFT< ValueType > const &dft) const
Create subtree corresponding to module.
std::set< size_t > elements
size_t getRepresentative() const
Get representative (top element of subtree).
DftModule(size_t representative, std::set< size_t > const &elements)
Constructor.
std::string toString(storm::dft::storage::DFT< ValueType > const &dft) const
Get string representation of module.
#define STORM_LOG_ASSERT(cond, message)