scram::core::RiskAnalysis
Main system that performs analyses.
#include <risk_analysis.h>
Inherits from scram::core::Analysis, boost::noncopyable
Public Classes
| Name | |
|---|---|
| struct | Context <br>Provides the optional context of the analysis. |
| struct | EtaResult <br>The analysis results grouped by an event-tree. |
| struct | Result <br>The analysis results binding to the unique analysis target. |
| struct | RuntimeMetrics <br>Captures high-level runtime diagnostics for the overall analysis pass. |
Public Functions
| Name | |
|---|---|
| RiskAnalysis(mef::Model * model, const Settings & settings) | |
| const mef::Model & | model() const |
| void | Analyze()<br>Analyzes the model and performs computations specified in the settings. |
| const std::vector< Result > & | results() const |
| const std::vector< EtaResult > & | event_tree_results() const |
| void | set_runtime_metrics(RuntimeMetrics metrics)<br>Stores runtime diagnostics for later reporting. |
| const std::optional< RuntimeMetrics > & | runtime_metrics() 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. |
Public Functions Documentation
function RiskAnalysis
RiskAnalysis(
mef::Model * model,
const Settings & settings
)Parameters:
- model An analysis model with fault trees, events, etc.
- settings Analysis settings for the given model.
Note: The model is not const because mission time and event-tree walk context are manipulated. However, at the end of analysis, everything is reset.
function model
inline const mef::Model & model() constReturn: The model under analysis.
function Analyze
void Analyze()Analyzes the model and performs computations specified in the settings.
Note: This function must be called only after full initialization of the model with or without its probabilities.
Precondition: The analysis is performed only once.
function results
inline const std::vector< Result > & results() constReturn: The results of the analysis.
function event_tree_results
inline const std::vector< EtaResult > & event_tree_results() constReturn: The results of the event tree analysis.
function set_runtime_metrics
void set_runtime_metrics(
RuntimeMetrics metrics
)Stores runtime diagnostics for later reporting.
function runtime_metrics
inline const std::optional< RuntimeMetrics > & runtime_metrics() constReturn: Stored runtime diagnostics, if any.
Updated on 2026-01-09 at 21:59:11 +0000
