Disclosure of Invention
In order to standardize the arrangement method of the fault tree export report, the invention aims to provide a fault tree-oriented report self-adaptive arrangement method, so that the readability of the fault tree export report is improved.
The invention aims at realizing the following technical scheme.
A report self-adaptive arrangement method facing fault tree includes the following steps:
Step 1, importing a drawn fault tree, and defining or selecting the paper size of a report of the generated fault tree;
step 2, reading structural parameter information of the fault tree structure, and determining a scaling parameter r of the fault tree structure in a report from top to bottom;
Step 3, determining a transfer gate in a fault tree report for the fault tree structure exceeding the arrangement area, and decomposing the fault tree structure;
step 4, regarding the branch where the transfer gate is located as a new fault tree, and arranging the branches on a new page;
Step5, adding hyperlinks among the transfer gates;
and 6, generating a fault tree report according to the fault tree report format.
Preferably, the scaling parameter r is determined as follows:
the scaling parameter r is calculated by the following formula:
Wherein x represents the number of secondary nodes below the top node, d represents the interval between the secondary nodes, S represents the proportionality coefficient of the width of the arrangement area and the width of the paper, W represents the width of the paper, L represents the width of the logic symbol;
If the scaling parameter calculated by the above formula is 1 and the fault tree structure has three levels of nodes, the scaling parameter r needs to be calculated again by the following formula:
Wherein x 1 represents the number of tertiary nodes, d 1 represents the spacing between tertiary node symbols;
If the scaling parameter calculated by the formula is not equal to 1, setting a minimum scaling parameter r min;
When Lx+ (x-1) d is less than or equal to S W, there are:
when lxx+ (x-1) d > s×w:
Preferably, in step 3, after determining the scaling parameter r of the fault tree structure in the report, the fault tree structure needs to be decomposed when the following formula is established:
H*r*ymax+h*r*(ymax-1)>T*E
Or (b)
L*r*xmax+d′*r*(xmax-1)>S*W
Wherein y max represents the maximum number of stages of the fault tree structure, H represents the distance between logical symbols, x max represents the maximum number of peer nodes in the fault tree structure, d' represents the distance between peer nodes, T represents the proportionality coefficient of the height of the arrangement area and the height of the paper, S represents the proportionality coefficient of the width of the arrangement area and the width of the paper, E represents the height of the paper, W represents the width of the paper, L represents the width of the logical symbols, H represents the height of the logical symbols;
When the scaled fault tree structure exceeds the left side and the right side of the arrangement area, converting the upper stage of the logic symbol exceeding the area into a transfer gate;
when the scaled fault tree structure exceeds the lower side of the arrangement area, converting the upper stage of the logic symbol exceeding the area into a transfer gate;
when the scaled fault tree structure exceeds the left side, the right side or the lower side of the arrangement area, if a voting gate exists at the upper stage exceeding the logic symbol of the area, converting the voting gate into a transfer gate;
Aiming at the scaled fault tree structure, the position of the top node is taken as a central axis, and if the number of the left branch nodes and the right branch nodes of the fault tree structure is unbalanced, branches with more nodes are translated to the direction taking the position of the top node as the central axis.
The invention provides a normalized arrangement method of the fault tree export report, so that the fault tree export report has the characteristics of reasonable layout, high readability and the like. The invention takes the fault tree structure drawn in the fault tree analysis tool as input, outputs the fault tree analysis report with the characteristics of high readability, standard layout and the like through a series of standard methods and various arrangement algorithms, and has stronger practical and popularization values.
Detailed Description
The invention provides a fault tree-oriented report self-adaptive arrangement method, which provides a specific fault tree report generation process, and fig. 1 is a flow chart of the fault tree-oriented report self-adaptive arrangement method, and comprises the following steps:
and 1, importing the drawn fault tree, and defining or selecting the paper size for generating a fault tree report.
The drawn fault tree structure is used as input of the method of the invention, and the sizes of paper (including paper and electronic) can be set in a self-defining way or different types of standard paper can be selected, such as A0 paper (841 mm x 1189 mm), A1 paper (594 mm x 841 mm), A2 paper (420 mm x 594 mm), A3 paper (294 mm x 420 mm), A4 paper (210 mm x 292 mm), A5 paper (148 mm x 210 mm) and the like. For ease of description, the paper size parameter reported by the fault tree is herein set to be height E, width W.
Step 2, reading structural parameter information of the fault tree structure, and determining a scaling parameter r of the fault tree structure in a report from top to bottom;
The structure parameter information includes the height H and width L of each logical symbol (logical gate, logical event) in the fault tree structure, the number of stages of the fault tree, the number of nodes at each stage, the intervals between the nodes, and the like, as shown in fig. 2. Based on the set paper size, determining a scaling parameter r of the fault tree structure in the report from top to bottom, wherein the scaling parameter r can be calculated by the following formula:
The system comprises a top node, a plurality of secondary nodes, a spacing d between the secondary nodes, and a ratio coefficient of the width of the arrangement area to the width of the paper, wherein x represents the number of the secondary nodes under the top node, S represents the ratio coefficient of the width of the arrangement area to the width of the paper, and the ratio coefficient can be set to be 0.95 or can be customized according to the requirement.
If the scaling parameter calculated by the above formula is 1 and the fault tree structure has three levels of nodes, the scaling parameter r needs to be calculated again by the following formula:
Where x 1 represents the number of tertiary nodes and d 1 represents the spacing between tertiary node symbols.
If the scaling parameter calculated by the above formula is not equal to 1, in order to ensure the readability of the fault tree structure, especially the complex large-scale fault tree structure, it is required that the fault tree structure is not infinitely scaled down when being arranged, a threshold should be generally set, that is, a minimum scaling parameter r min is set, for example, r min =0.6, and the relationship between r and r min can be obtained by the following formula:
When Lx+ (x-1) d is less than or equal to S W, there are:
when lxx+ (x-1) d > s×w:
Step3, determining a transfer gate in a fault tree report for the fault tree structure exceeding the arrangement area, decomposing the fault tree structure, and standardizing the arrangement of the fault tree structure in the fault tree report;
After the scaling parameter r of the fault tree structure in the report is determined, the size of the arrangement area of the fault tree structure in the report is based on the size of the arrangement area of the fault tree structure in the report, and the scaled fault tree structure is combined with the scaled fault tree structure, so that the fault tree structure can not be completely displayed in the arrangement area and needs to be decomposed, and the fault tree structure can be completely displayed in the arrangement area.
When the following formula is established, the fault tree structure needs to be decomposed
H*r*ymax+h*r*(ymax-1)>T*E
Or (b)
L*r*xmax+d′*r*(xmax-1)>S*W
Wherein y max represents the maximum number of the fault tree structure, h represents the distance between logical symbols, x max represents the maximum number of peer nodes (three-level nodes and nodes below three-level nodes) in the fault tree structure, d' represents the distance between peer nodes, T represents the proportionality coefficient of the height of the arrangement area and the height of the paper, for example, the design is 0.9, and the proportionality system can be customized according to the requirement.
To achieve the above object, here, a large-scale fault tree structure is decomposed by converting a logical symbol into a form of a transfer gate. The arrangement of the fault tree structure in the report area should keep the central display all the time along with the top node, the second level node and the third level node, and the branch where the transfer gate is located can be regarded as a new fault tree structure to carry out the arrangement processing. The following considerations are mainly made here:
When the scaled fault tree structure exceeds the left and right sides of the arrangement area, the upper stage of the logical sign of the exceeding area is converted into a transfer gate. A schematic diagram of the fault tree structure on the right side of the out-of-arrangement area is shown in fig. 5, wherein the rightmost side of the fourth-stage node of the fault tree structure is out of the area range, so that the node on the upper stage of the out-of-area node is converted into a new transfer gate, and the branch is arranged into another page for display, and an exploded schematic diagram of the fault tree structure on the right side of the out-of-arrangement area is shown in fig. 6;
When the scaled fault tree structure exceeds the underside of the staging area, the upper level of the excess area logical sign is converted into a transfer gate. FIG. 7 is a schematic diagram showing the lower side of the fault tree structure beyond the arrangement area, wherein the eighth level node of the fault tree structure exceeds the area range, so that the node of the upper level beyond the area node is converted into a new transfer gate, and the branch is arranged into another page for display, and FIG. 8 is a schematic diagram showing the decomposition of the lower side of the fault tree structure beyond the arrangement area;
When the scaled fault tree structure exceeds the left side, the right side or the lower side of the arrangement area, if a voting gate exists at the upper stage exceeding the area logic symbol, the voting gate is converted into a transfer gate. FIG. 9 is a schematic diagram showing the lower side of the fault tree structure with transfer gates beyond the arrangement area, wherein the eighth level node of the fault tree structure exceeds the area range, and the father node of the node above the area is a voting gate, so that the voting gate node is converted into a new transfer gate, and the branches are arranged into another page for display, and FIG. 10 is a schematic diagram showing the decomposition of the lower side of the fault tree structure beyond the arrangement area;
Aiming at the scaled fault tree structure, the position of the top node is taken as the central axis, and if the number of the left branch nodes and the right branch nodes of the fault tree structure is unbalanced, in order to improve the utilization efficiency of the arrangement area of the fault tree structure and enhance the readability, the branches with more nodes can be translated towards the direction taking the position of the top node as the central axis. As shown in fig. 11, which is a schematic diagram of a fault tree structure with unbalanced numbers of left and right branch nodes, it can be seen that the number of nodes of the left branch is significantly higher than that of nodes of the right branch in the fault tree structure, so that the left branch is moved to a direction taking the position of the top node as the central axis, and the arrangement effect after the movement is shown in fig. 12.
And 4, regarding the branch where the transfer gate is located as a new fault tree, and arranging the branches on the new page.
The fault tree branch where the transfer gate is located is treated as a new fault tree structure for processing, and the steps are the same as the above method. Step 5, adding hyperlinks among the transfer gates;
after the decomposition of the entire fault tree structure is completed, in order to quickly look for the fault tree structure in the fault tree report, it is necessary to annotate the transfer gate generated by the decomposition and set hyperlinks so as to quickly find different parts of the entire fault tree structure.
And 6, designing a fault tree report format, and generating a fault tree report.
Finally, to embody the entire fault tree information in the fault tree report, the following portions need to be included in the fault tree report:
data of logic gates and logic events contained in the fault tree;
fault tree structure after the above-mentioned processing;
Report generation time, page number display, report name, logic gate, number of logic events, etc.