主要内容

convertGateToTree

R2026b

Convert fault tree gates and inputs into fault trees

Since R2026b

Description

convertGateToTree(faultTreeDocument,gate) converts the gate, gate, in the fault tree document, faultTreeDocument, into a fault tree, and replaces the gate with a transfer gate. The function moves the inputs below the gate into the new fault tree, and names the new fault tree after the original gate.

example

Examples

collapse all

Create a fault tree document and a fault tree.

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

myTopGate = myFaultTree.Gates(1);
event1 = createEvent(myTopGate);
event2 = createEvent(myTopGate);
gate1 = createGate(myTopGate);
gate2 = createGate(myTopGate,Type="and");
gate22 = createGate(gate2);
event3 = createEvent(gate1);
event4 = createEvent(gate1);
event5 = createEvent(gate2);
event6 = createEvent(gate22);
event7 = createEvent(gate22);

Convert gate gate2 and its inputs into a fault tree.

convertGateToTree(myTreeDoc,gate2)

The function replaces the gate in the original tree with a transfer gate. To retrieve the transfer gate, get the TransferGates property from the original fault tree.

myFaultTree.TransferGates
ans = 

  TransferGate with properties:

    Gate: [1×1 safetyAnalysisMgr.Gate]

Input Arguments

collapse all

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

Gate in the Safety Analysis Manager fault tree document, specified as a Gate object.

Version History

Introduced in R2026b