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 |
| void | Analyze()<br>Analyzes the fault tree and performs computations. |
| const ProductContainer & | products() const |
| bool | has_products() const |
| std::shared_ptr< Pdag > | pdag() |
| const ProductSummary * | last_product_summary() const |
| bool | adaptive_mode_used() const |
| double | adaptive_target_probability() const |
| void | initiating_event_frequency(double frequency)<br>Sets the initiating event frequency to be applied during analysis. |
Protected Functions
| Name | |
|---|---|
| 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 |
| double | analysis_time() const |
Protected Functions inherited from scram::core::Analysis
| Name | |
|---|---|
| Settings & | settings() |
| void | AddWarning(std::string msg)<br>Appends a warning message to the analysis warnings. |
| void | AddAnalysisTime(double time)<br>Adds time to the total analysis time. |
Detailed Description
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
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
virtual ~FaultTreeAnalysis() =defaultfunction top_event
inline const mef::Gate & top_event() constReturn: The top gate that is passed to the analysis.
function Analyze
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
inline const ProductContainer & products() constReturn: A collection of Boolean products as the analysis results.
Precondition: The analysis is done.
function has_products
inline bool has_products() constReturn: true if products were generated and stored.
function pdag
inline std::shared_ptr< Pdag > pdag()function last_product_summary
inline const ProductSummary * last_product_summary() constfunction adaptive_mode_used
inline bool adaptive_mode_used() constfunction adaptive_target_probability
inline double adaptive_target_probability() constfunction initiating_event_frequency
inline void initiating_event_frequency(
double frequency
)Sets the initiating event frequency to be applied during analysis.
Parameters:
- frequency The initiating event frequency (default 1.0).
Precondition: Must be called before Analyze().
Protected Functions Documentation
function graph
inline Pdag * graph() constReturn: Pointer to the PDAG representing the fault tree.
Updated on 2026-01-09 at 21:59:11 +0000
