I am playing around with the MOE setting. MOE can be set from the GUI by
Window > Preferences > FTA > Derivation and Generation > Yes, create a MOE or transfer gate instead
Let's set MOE to "Yes, create a MOE or transfer gate instead".
Let's use a simple script to create two identical events inside an existing fta model. The events represent/contain a failure mode in my hw model.
var found = Global.getFinder(hw_model_scope).findByType(Metamodel.safetyModel.FailureMode, true).find("id", "my_id");
var failure = found.first();
var event1 = Factory.createElement(fta_model_scope , Metamodel.FTA.Event);
var event2 = Factory.createElement(fta_model_scope , Metamodel.FTA.Event);
event1.represents = failure;
event2.represents = failure;Doing the same operation within the GUI (drag and drop the failure mode from model browser into the fta diagram), adds the square brackets to the events and sets event1.occurrence =2 and event2.occurrence =2.
Does something else change under the hood?
Unfortunately, "occurrence" is a read-only filed/property so my script cannot change that.
Is the tree probability calculation affected?
Similarly, if I place the two events on two different diagrams, I expect one of the event to be a transfer gate. The GUI gets this right, the script does not.
I can modify my script to create transfer gates when needed, but when the same event is present on the same fta model I can't replicate the square brackets.
Any suggestions on this?