15    for (
size_t i = 0; i < dft.nrElements(); ++i) {
 
   16        std::shared_ptr<storm::dft::storage::elements::DFTElement<ParametricType> 
const> element = dft.getElement(i);
 
   17        switch (element->type()) {
 
   20                auto be = std::static_pointer_cast<storm::dft::storage::elements::DFTBE<ParametricType> 
const>(element);
 
   21                switch (be->beType()) {
 
   23                        auto beConst = std::static_pointer_cast<storm::dft::storage::elements::BEConst<ParametricType> 
const>(element);
 
   28                        auto beProb = std::static_pointer_cast<storm::dft::storage::elements::BEProbability<ParametricType> 
const>(element);
 
   29                        ConstantType activeFailureProbability = instantiate_helper(beProb->activeFailureProbability(), valuation);
 
   30                        ConstantType dormancyFactor = instantiate_helper(beProb->dormancyFactor(), valuation);
 
   35                        auto beExp = std::static_pointer_cast<storm::dft::storage::elements::BEExponential<ParametricType> 
const>(element);
 
   36                        ConstantType activeFailureRate = instantiate_helper(beExp->activeFailureRate(), valuation);
 
   37                        ConstantType dormancyFactor = instantiate_helper(beExp->dormancyFactor(), valuation);
 
   42                        auto beErlang = std::static_pointer_cast<storm::dft::storage::elements::BEErlang<ParametricType> 
const>(element);
 
   43                        ConstantType activeFailureRate = instantiate_helper(beErlang->activeFailureRate(), valuation);
 
   44                        ConstantType dormancyFactor = instantiate_helper(beErlang->dormancyFactor(), valuation);
 
   45                        builder.
addBasicElementErlang(beErlang->name(), activeFailureRate, beErlang->phases(), dormancyFactor);
 
   49                        auto beWeibull = std::static_pointer_cast<storm::dft::storage::elements::BEWeibull<ParametricType> 
const>(element);
 
   50                        ConstantType shape = instantiate_helper(beWeibull->shape(), valuation);
 
   51                        ConstantType rate = instantiate_helper(beWeibull->rate(), valuation);
 
   56                        auto beLogNormal = std::static_pointer_cast<storm::dft::storage::elements::BELogNormal<ParametricType> 
const>(element);
 
   57                        ConstantType mean = instantiate_helper(beLogNormal->mean(), valuation);
 
   58                        ConstantType stddev = instantiate_helper(beLogNormal->standardDeviation(), valuation);
 
   63                        auto beSamples = std::static_pointer_cast<storm::dft::storage::elements::BESamples<ParametricType> 
const>(element);
 
   64                        std::map<ConstantType, ConstantType> activeSamples{};
 
   65                        for (
auto &[time, prob] : beSamples->activeSamples()) {
 
   66                            ConstantType timeInst = instantiate_helper(time, valuation);
 
   67                            ConstantType probInst = instantiate_helper(prob, valuation);
 
   68                            activeSamples[timeInst] = probInst;
 
   74                        STORM_LOG_THROW(
false, storm::exceptions::NotImplementedException, 
"BE type '" << be->beType() << 
"' not known.");
 
   81                builder.
addAndGate(element->name(), getChildrenVector(element));
 
   84                builder.
addOrGate(element->name(), getChildrenVector(element));
 
   87                auto vot = std::static_pointer_cast<storm::dft::storage::elements::DFTVot<ParametricType> 
const>(element);
 
   88                builder.
addVotingGate(vot->name(), vot->threshold(), getChildrenVector(vot));
 
   92                auto pand = std::static_pointer_cast<storm::dft::storage::elements::DFTPand<ParametricType> 
const>(element);
 
   93                builder.
addPandGate(pand->name(), getChildrenVector(pand), pand->isInclusive());
 
   97                auto por = std::static_pointer_cast<storm::dft::storage::elements::DFTPor<ParametricType> 
const>(element);
 
   98                builder.
addPorGate(por->name(), getChildrenVector(por), por->isInclusive());
 
  102                builder.
addSpareGate(element->name(), getChildrenVector(element));
 
  108                builder.
addMutex(element->name(), getChildrenVector(element));
 
  111                auto dependency = std::static_pointer_cast<storm::dft::storage::elements::DFTDependency<ParametricType> 
const>(element);
 
  113                ConstantType probability = instantiate_helper(dependency->probability(), valuation);
 
  114                std::vector<std::string> children = {dependency->triggerEvent()->name()};
 
  115                for (
auto const &depEvent : dependency->dependentEvents()) {
 
  116                    children.push_back(depEvent->name());
 
  118                builder.
addPdep(dependency->name(), children, probability);
 
  122                STORM_LOG_THROW(
false, storm::exceptions::NotImplementedException, 
"DFT type '" << element->type() << 
"' not known.");
 
  127    builder.
setTopLevel(dft.getTopLevelElement()->name());
 
  128    return std::make_shared<storm::dft::storage::DFT<ConstantType>>(builder.
build());