Contenido principal

createFailureModel

R2026b

Create failure model in fault tree document

Since R2026b

Description

failureModel = createFailureModel(faultTreeDocument) creates a constant failure model in the fault tree document faultTreeDocument.

example

failureModel = createFailureModel(faultTreeDocument,Type=value) creates a failure model of the type value.

example

Examples

collapse all

Create a fault tree document in the Safety Analysis Manager.

myTreeDoc = safetyAnalysisMgr.newDocument("fault-tree");

Add a constant failure model to the fault tree document.

myFailureModel = createFailureModel(myTreeDoc);

Create a fault tree document in the Safety Analysis Manager and retrieve the FaultTree object.

myTreeDoc = safetyAnalysisMgr.newDocument("fault-tree");
myFaultTree = myTreeDoc.FaultTrees(1);

Get the top-level gate and add two basic events to the gate.

myTopGate = myFaultTree.Gates(1);
event1 = createEvent(myTopGate);
event2 = createEvent(myTopGate);

Add a rate failure model to the fault tree document.

myFailureModel = createFailureModel(myTreeDoc,Type="rate");

Specify the parameter values of the failure model by retrieving the failure model parameters. Assign a value of 0.02 to Lambda and to a value of 0.01 to Mu.

myParameters = myFailureModel.Parameters;
myParameters.Lambda.Value = 0.02;
myParameters.Mu.Value = 0.01;

Assign the failure model to the FailureModel property of event1.

event1.FailureModel = myFailureModel;

Input Arguments

collapse all

Fault tree document in the Safety Analysis Manager, specified as a FaultTreeDocument object.

Type of failure model, specified as one of these options:

ValueDescription
"constant"Create a constant failure model. The failure probability and failure frequency are independent and constant. Only basic and undeveloped events can use this failure model type.
"rate"Create a rate failure model. The failure probability has an exponential relationship with the evaluation time, the failure rate is constant, and the failure is repairable. The failure model calculates the frequency from the failure probability and failure rate. Only basic and undeveloped events can use this failure model type.
"time-at-risk"Create a time at risk failure model. The failure probability has an exponential relationship with a specified exposure time, and the failure rate is constant. The failure model calculates the frequency from the failure probability and failure rate. Only basic and undeveloped events can use this failure model type.
"mttf"Create a mean time to failure (MTTF) failure model. The model calculates a failure probability and failure rate by using a mean time to failure (MTTF) and an MTTR. MTTF and MTTR are constant. The failure model calculates the frequency from the failure probability and failure rate. Only basic and undeveloped events can use this failure model type.
"dormant"Create a dormant failure model. The failure rate is constant, however the failure is not known until the failed artifact is tested. Testing occurs at a fixed interval. The failure model calculates the frequency from the failure probability and failure rate. Only basic and undeveloped events can use this failure model type.
"logical"Create a logical failure model. The failure is active or inactive. The failure does not have a rate or frequency.

This argument value is case insensitive. For more information on the implementations of each failure model type, see Create Fault Tree Events.

Data Types: enumeration

Output Arguments

collapse all

New failure model, returned as a FailureModel object.

Limitations

  • If you assign this failure model to an event and the event uses a failure model that is not shared, the function deletes the preexisting failure model.

Version History

Introduced in R2026b