主要内容

Parameter

R2026b

Event failure model parameters

Since R2026b

Description

Parameter objects represent the parameter values of a failure model in Safety Analysis Manager fault tree document events. Use Parameter objects to specify how fault tree events might occur based on the failure model type.

Creation

To create a Parameter object, get the Q, W, LAMBDA, MU, MTTF, MTTR, or Tau properties from a FailureModelParameters object.

Properties

expand all

Time unit of the parameter, specified as either "minutes", "hours", "million-hours", or "billion-hours". The definition of this value depends on the parameter that you retrieve from the FailureModelParameters object:

ParameterTimeUnit Meaning
QTime unit of parameter. The default value is "hours".
WFailures per time unit of parameter
LambdaFailures per time unit of parameter. The default value is "hours".
MuRepairs per time unit of parameter. The default value is "hours".
TEvent exposure time. The default value is "hours".
MTTFTime unit of parameter. The default value is "hours".
MTTRTime unit of parameter. The default value is "minutes".
TauTime unit of parameter. The default value is "hours".

Data Types: enumeration

Value of the parameter, specified as a positive numeric scalar. If you retrieve the Q property from the parent FailureModelParameters object, the value must be between 0 and 1.

To define this property by using the output of an expression, specify a string scalar or character vector. If you define this property as an expression, the expression must evaluate to a value that the failure model supports.

Example: myParam.Value = 0.1 sets the Value property of the Parameter object myParam to the numeric value 0.1.

Example: myParam.Value = "x + y" sets the Value property of the Parameter object myParam to an expression that evaluates to the sum of the base workspace variables x and y.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Examples

collapse all

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

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

Add two basic events to the tree:

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

Retrieve the failure model from event1.

myFailureModel = event1.FailureModel;

Retrieve the failure model parameters.

myFailureProperties = myFailureModel.Parameters;

By default, new failure models are constant failure models. Retrieve the Parameter object associated with the Q property.

myQ = myFailureProperties.Q;

Assign the value of the Parameter object to 0.01.

myQ.Value = 0.01;

Version History

Introduced in R2026b