Skip to content

scram::core::FaultTreeAnalysis

Fault tree analysis functionality. More...

#include <fault_tree_analysis.h>

Inherits from scram::core::Analysis, boost::noncopyable

Inherited by scram::core::FaultTreeAnalyzer< Algorithm >

Public Functions

Name
FaultTreeAnalysis(const mef::Gate & root, const Settings & settings, const mef::Model * model =nullptr)<br>Traverses a valid fault tree from the root gate to collect databases of events, gates, and other members of the fault tree.
virtual~FaultTreeAnalysis() =default
const mef::Gate &top_event() const
voidAnalyze()<br>Analyzes the fault tree and performs computations.
const ProductContainer &products() const

Protected Functions

Name
const Pdag *graph() const

Additional inherited members

Public Functions inherited from scram::core::Analysis

Name
Analysis(Settings settings)
virtual~Analysis() =0<br>Abstract class.
const Settings &settings() const
const std::string &warnings() const
doubleanalysis_time() const
voidAddAnalysisTime(double time)<br>Adds time to the total analysis time.
voidAddWarning(std::string msg)<br>Appends a warning message to the analysis warnings.
Settings &settings()

Detailed Description

cpp
class scram::core::FaultTreeAnalysis;

Fault tree analysis functionality.

Warning: Run analysis only once. One analysis per FaultTreeAnalysis object.

The analysis must be done on a validated and fully initialized fault trees. After initialization of the analysis, the fault tree under analysis should not change; otherwise, the success of the analysis is not guaranteed, and the results may be invalid. After the requested analysis is done, the fault tree can be changed without restrictions. However, other analyses may rely on unchanged fault tree to use the results of this fault tree analysis.

To conduct a new analysis on the changed fault tree, a new FaultTreeAnalysis object must be created. In general, rerunning the same analysis twice will mess up the analysis and corrupt the previous results.

Public Functions Documentation

function FaultTreeAnalysis

cpp
FaultTreeAnalysis(
    const mef::Gate & root,
    const Settings & settings,
    const mef::Model * model =nullptr
)

Traverses a valid fault tree from the root gate to collect databases of events, gates, and other members of the fault tree.

Parameters:

  • root The top event of the fault tree to analyze.
  • settings Analysis settings for all calculations.
  • model The Model containing substitutions if any.

Note: It is assumed that analysis is done only once.

Warning: If the fault tree structure is changed, this analysis does not incorporate the changed structure. Moreover, the analysis results may get corrupted.

The passed fault tree must be pre-validated without cycles, and its events must be fully initialized.

function ~FaultTreeAnalysis

cpp
virtual ~FaultTreeAnalysis() =default

function top_event

cpp
inline const mef::Gate & top_event() const

Return: The top gate that is passed to the analysis.

function Analyze

cpp
void Analyze()

Analyzes the fault tree and performs computations.

Note: This function is expected to be called only once.

Warning:

  • If the original fault tree is invalid, this function will not throw or indicate any errors. The behavior is undefined for invalid fault trees.
  • If the fault tree structure has changed since the construction of the analysis, the analysis will be invalid or fail.

This function must be called only after initializing the fault tree with or without its probabilities.

function products

cpp
inline const ProductContainer & products() const

Return: A collection of Boolean products as the analysis results.

Precondition: The analysis is done.

Protected Functions Documentation

function graph

cpp
inline const Pdag * graph() const

Return: Pointer to the PDAG representing the fault tree.


Updated on 2025-11-11 at 16:51:08 +0000