mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.85k stars 6.09k forks source link

Fault Tree Diagram #4422

Open ifarai opened 1 year ago

ifarai commented 1 year ago

Proposal

Include ability to create a fault tree analysis diagram. A good article on Fault Tree is here. These will be useful in other classical engineering fields, not just software.

Use Cases

Screenshots

image

Code Sample

No response

Yokozuna59 commented 1 year ago

Can someone add Type: New Diagram to this issue for better visibility? @sidharthv96 @aloisklink @jgreywolf

nirname commented 11 months ago

Hi, thanks for reaching out! Please, provide any syntax propositions.

dicaeffe commented 9 months ago

Hi, this can be a first draft to begin the analysis.

note: descriptions and symbols are from the wikipedia page.

Syntax

Example: this is an example describing the image in the first post:

C as [Car does not start]
F as [Fuel]
EF as [Electrical Fault]
C <- F OR EF

EFT as [Empty fuel Tank]
CFF as [Clogged fuel filter]
F <-  EFT OR CFF

WB as [Weak battery]
CW as [Cold Weather]
EF <-  WB OR CW

Events

syntax name symbol description
(event) Basic event Basic event failure or error in a system component or element (example: switch stuck in open position)
<event] External event External event normally expected to occur (not of itself a fault)
<event> Undeveloped event Undeveloped event an event about which insufficient information is available, or which is of no consequence
((event)) Conditioning event Conditioning event conditions that restrict or affect logic gates (example: mode of operation in effect)
[event] Intermediate event Intermediate event

Gates

syntax name symbol description
OR OR OR gate the output occurs if any input occurs.
AND AND AND gate the output occurs only if all inputs occur (inputs are independent from the source).
XOR Exclusive OR Exclusive OR gate the output occurs if exactly one input occurs.
PAND Priority AND Priority AND gate the output occurs if the inputs occur in a specific sequence specified by a conditioning event.
INH Inhibit Inhibit gate the output occurs if the input occurs under an enabling condition specified by a conditioning event.
jbouganim-parallel commented 3 months ago

checking in on this. Were going through a huge FTA exercise right now and this would have been amazing for us. Will this feature request be considered anytime soon? Is this task doable for someone who has never contributed to Mermaid? What level of effort does something like this take?