A kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlasTechnical field
The present invention relates to nuclear power fields, and in particular to a kind of mark based on nuclear power plant DCS platform logic algorithm pattern cloud atlasMethod.
Background technique
The application software run in nuclear power plant's processing unit is the software of high security, and the designer of application software is pastPast is nuclear power engineering related personnel, rather than software developer.Convenience, ease for use and the height either used from designerThe angle that the angle of effect property or the high security of application software require, generates application software code and requires first to complete firstThe design and exploitation of Logical Configuration functional diagram.
DCS platform engineering teacher's station software provides the software of logic function G- Design, i.e. nuclear power plant DCS platform logic configurationSoftware, which carries out the drafting of logi function chart using QGraphicsView framework technology, by the logic of project plannerDesign is presented in the form of logic chart.
The process of Logical Configuration functional diagram itself is complicated, and function is various.And Logical Configuration functional diagram is in entire application softwareIt is most important in the Life cycle used from being designed into.Each link such as subsequent V&V, test, joint debugging is intended to use the functional diagram.The participant of each link requires to understand the thinking and the logic meaning to be expressed of logic chart of designer.
For complicated logic chart, comprising illustrating information except a large amount of core logic, these information need step by step, it is quasi-True and evidence-based is transmitted to next link.So under existing technical background, only with logi function chart by workThe design information of journey designer, which is accurately transmitted to follow-up link, will become extremely difficult.
Summary of the invention
The technical problem to be solved by the present invention is to only the setting project planner with logi function chart in the prior artIt is extremely difficult, and it is an object of the present invention to provide a kind of based on nuclear power plant DCS platform logic algorithm that meter information is accurately transmitted to follow-up linkThe mask method of figure cloud atlas, solves the above problems.
The present invention is achieved through the following technical solutions:
A kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas, comprising the following steps:
Establish logical layer and mark layer;
When receiving cloud atlas mark layer instruction, it is switched to mark layer;Cloud atlas pattern in mark layer is set, and records useThe key point position that family is chosen in mark layer;Rule scheme is sought according to the cloud atlas pattern and key point position selection, andDetermine the final frame range of cloud atlas;The frame of the cloud atlas is drawn, and the first and last of frame point is smoothly connected;
When rendering logic figure, logical layer is switched to, and completes logic chart drafting;
The logic chart figure layer data for extracting logical layer filter out mark layer data, and the generation of logic chart figure layer data are patrolledIt collects and executes file.
The present invention is independently drawn and is joined using core function figure and annotation cloud atlas in application, by the way of graph layeringThe mode used, figure divided rank are closed, cloud atlas does not influence the principle of high-grade logic chart as inferior grade.Based on this principle,Layer is labeled to the logi function chart of drafting to draw, and provides the method for cloud atlas mark.On the one hand this method may be implementedTo illustrate in entire logi function chart information step by step, accurate and evidence-based be transmitted to next link;On the other handFunctional diagram logical gate be ensure that not by any interference and influenced.
The present invention provides the algorithm of a kind of method that graphic plotting is hierarchically layered and the automatic tracking closure in region.It realizesBy core logic functions and illustrate that information is all presented with portion logi function chart, and designer flexibly sets according to actual demandMeter illustrates the presentation mode of information.Realize that the groundwork of the invention to be completed includes four steps.Firstly, being set according to userIt sets, flexibly switches the logical layer and cloud atlas layer of graphic plotting.Secondly, inputting according to operator, cloud atlas Graphicxtras Frames Collection is set, with notSame line width, color, line style etc. shows the thinking activities of operator.Again, multi-point in layer choosing is marked in cloud atlas according to userIt sets, configuration software seeks trajectory according to rectangle algorithm and Bezier algorithm, completes region closure, draws cloud atlas.Finally, functionWhen energy figure is converted to code, configuration software filters out cloud atlas layer, and logic figure layer is converted to logical code, guarantees cloud atlas layer not shadowRing operation logic.
Further, the cloud atlas pattern includes cloud atlas shape and cloud atlas boundary line pattern.
Further, seeking rule scheme according to the cloud atlas pattern and key point position selection includes: when cloud atlas patternWhen for rectangle, starting point and end point is chosen as frame available point.
Further, seeking rule scheme according to the cloud atlas pattern and key point position selection includes: when cloud atlas patternWhen arbitrary polygon, selection all the points are available point.
Further, it determines that the final frame range of cloud atlas includes: to call rectangle algorithm, cloud atlas is determined with diagonal wayFinal frame range.
Further, the frame for drawing the cloud atlas includes: that Bezier algorithm is called to draw each of cloud atlas frameSide guarantees inflection point smooth transition, forms effectively natural line.
Further, the code of the logical layer and mark layer is mutually indepedent.
Further, the grade of the logical layer is higher than mark layer, and mark layer does not influence logical layer.
For the present invention in application, DCS system is as safety level system, the generating process of Logical Configuration code must pass through softwareRealize, in the present invention, mark layer effect be in logical layer logical algorithm block or line be explained, so beingThe accuracy for guaranteeing Logical Configuration code building, needs that layer will be marked and logical layer is completely distinguished, so that inferior gradeMark layer can not influence high-grade logical layer.
Compared with prior art, the present invention having the following advantages and benefits:
1, a kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas of the present invention, by logical layer and cloud atlasMark layer strictly disjoints, and is independent of each other in data, combines together on interface is presented.The independence and user for guaranteeing data are looked intoThe convenience seen;
2, a kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas of the present invention, allows cloud atlas callout box to turnPoint nature transition, curve outline border are closed automatically;
3, a kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas of the present invention, by rectangle algorithmIt with the analysis of Bezier algorithm, is successfully used on nuclear power logic chart, cloud atlas mark is carried out to logic chart, makes to seemIt is easily understood, is clear;
4, a kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas of the present invention, passes through computer softwareAccording to the scheme of business need automatic fitration data, logical data and labeled data are strictly separated, with effective, constant sideLogical data is passed to composing software by case, and cloud atlas labeled data is strictly cleared up and checked before communicating the data.
Detailed description of the invention
Attached drawing described herein is used to provide to further understand the embodiment of the present invention, constitutes one of the applicationPoint, do not constitute the restriction to the embodiment of the present invention.In the accompanying drawings:
Fig. 1 is the method for the present invention step schematic diagram;
Fig. 2 is schematic diagram of the embodiment of the present invention;
Fig. 3 is schematic diagram of the embodiment of the present invention;
Fig. 4 is schematic diagram of the embodiment of the present invention;
Fig. 5 is schematic diagram of the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below with reference to embodiment and attached drawing, to thisInvention is described in further detail, and exemplary embodiment of the invention and its explanation for explaining only the invention, are not madeFor limitation of the invention.
Embodiment
As shown in Figure 1, a kind of mask method based on nuclear power plant DCS platform logic algorithm pattern cloud atlas of the present invention, including withLower step:
Establish logical layer and mark layer;
When receiving cloud atlas mark layer instruction, it is switched to mark layer;Cloud atlas pattern in mark layer is set, and records useThe key point position that family is chosen in mark layer;Rule scheme is sought according to the cloud atlas pattern and key point position selection, andDetermine the final frame range of cloud atlas;The frame of the cloud atlas is drawn, and the first and last of frame point is smoothly connected;
When rendering logic figure, logical layer is switched to, and completes logic chart drafting;
The logic chart figure layer data for extracting logical layer filter out mark layer data, and the generation of logic chart figure layer data are patrolledIt collects and executes file.
The present embodiment implement when, by the way of graph layering, using core function figure and annotation cloud atlas independently draw andThe mode being used in combination, figure divided rank, cloud atlas do not influence the principle of high-grade logic chart as inferior grade.Based on this originalThen, layer is labeled to the logi function chart of drafting to draw, provide the method for cloud atlas mark.This method on the one hand can be realNow to illustrate in entire logi function chart information step by step, accurate and evidence-based be transmitted to next link;Another partyFace ensure that functional diagram logical gate not by any interference and influence.
The present embodiment provides a kind of algorithms of the automatic tracking closure of method that graphic plotting is hierarchically layered and region.It realizesBy core logic functions and illustrate that information is all presented with a logi function chart, and designer is flexible according to actual demandThe presentation mode of specification information.Realize that the groundwork of the invention to be completed includes four steps.Firstly, being set according to userIt sets, flexibly switches the logical layer and cloud atlas layer of graphic plotting.Secondly, inputting according to operator, cloud atlas Graphicxtras Frames Collection is set, with notSame line width, color, line style etc. shows the thinking activities of operator.Again, multi-point in layer choosing is marked in cloud atlas according to userIt sets, configuration software seeks trajectory according to rectangle algorithm and Bezier algorithm, completes region closure, draws cloud atlas.Finally, functionWhen energy figure is converted to code, configuration software filters out cloud atlas layer, and logic figure layer is converted to logical code, guarantees cloud atlas layer not shadowRing operation logic.
In order to further illustrate the working principle of the present embodiment, the cloud atlas pattern includes cloud atlas shape and cloud atlas boundary linePattern.
In order to further illustrate the working principle of the present embodiment, selected according to the cloud atlas pattern and the key point positionSeeking rule scheme includes: to choose starting point and end point as frame available point when cloud atlas pattern is rectangle.
In order to further illustrate the working principle of the present embodiment, selected according to the cloud atlas pattern and the key point positionSeeking rule scheme includes: when cloud atlas pattern arbitrary polygon, and selection all the points are available point.
In order to further illustrate the working principle of the present embodiment, determine that the final frame range of cloud atlas includes: calling rectangleAlgorithm determines the final frame range of cloud atlas with diagonal way.
In order to further illustrate the working principle of the present embodiment, the frame for drawing the cloud atlas includes: to call Bezier bentLine algorithm draws each side of cloud atlas frame, guarantees inflection point smooth transition, forms effectively natural line.
In order to further illustrate the working principle of the present embodiment, the code of the logical layer and mark layer is mutually indepedent.
In order to further illustrate the working principle of the present embodiment, the grade of the logical layer is higher than mark layer, and marks layerDo not influence logical layer.
When the present embodiment is implemented, for DCS system as safety level system, the generating process of Logical Configuration code must be by softPart realize, in the present invention, mark layer effect be in logical layer logical algorithm block or line be explained, soIn order to guarantee the accuracy of Logical Configuration code building, needs that layer will be marked and logical layer is completely distinguished, so that lowThe mark layer of grade can not influence high-grade logical layer.
In order to further illustrate the working condition of the present embodiment, the present embodiment uses in safety level DCS system, this isSystem supply by Center project.The method use the modes that multiple spot line is closed automatically, choose rectangle algorithm and shellfishSai Er curved line arithmetic.Allow line inflection point radian naturally, entire cloud atlas label supports text marking, range mark, line style interaction to setIt sets, seems entire logic chart and be easily understood, be clear.For illustrate in entire logi function chart information step by step, it is accurateAnd evidence-based be transmitted to next link;Assurance function figure logical gate by any interference and does not influence to provide simultaneouslyEffective and feasible method.
Specific steps are described as follows:
1. configuration software receives operator and enables cloud atlas mark layer instruction, configuration software automatically switches to cloud atlas mark layer.
2. configuration software receives the setting of cloud atlas pattern, flexile setting cloud atlas pattern is provided, including cloud atlas itselfPattern, such as rectangle, arbitrary polygon;Pattern including cloud atlas boundary line, such as line width, line color, line style.
3. configuration software receives key point position of the operator in cloud atlas layer choosing, and records key point position.
4. configuration software judges the pattern of the cloud atlas currently to be drawn itself, rule scheme is sought according to pattern selection, if it isRectangular patterns then choose starting point and end point as frame available point, and it is effective that all the points are then chosen if it is arbitrary polygonPoint.
5. configuration software calls rectangle algorithm, the final frame range of rectangle is determined with diagonal way.
6. configuration software calls Bezier algorithm to draw each side of cloud atlas frame, guarantee inflection point smooth transition,Form effectively natural line.
7. first and last point is smoothly connected by configuration software according to closure principle, guarantee cloud atlas closure.
8. configuration software is switched to logic chart drawing layer, rendering logic figure.
9. configuration software handles functional diagram page data, logic chart figure layer data are extracted, filter out cloud atlas mark layerUndisturbed logic diagram data is passed to composing software by data, and is generated logic and executed file.
In safety level DCS project, the above-mentioned mark based on nuclear power plant DCS platform logic algorithm pattern cloud atlas is had been realized inMethod.
The rectangle cloud atlas example generated using this method is as shown in Figure 2.
The arbitrary polygon cloud atlas example one generated using this method is as shown in Figure 3:
The arbitrary polygon cloud atlas example two generated using this method is as shown in Figure 4:
Using this method, treated that purely logical layer is as shown in Figure 5:
Complicated for logic function workflow graph in the present embodiment, the numerous characteristics of function have studied the side of cloud atlas markMethod, the mode for having used multiple spot line to be closed automatically choose rectangle algorithm and Bezier algorithm.Allow line inflection point radian fromSo.Entire cloud atlas label supports text marking, range mark, line style interaction setting, make entire logic chart seem be easily understood,It is clear.It is final realize by illustrate in logi function chart information step by step, it is accurate and evidence-based be transmitted to it is nextLink;Assurance function figure logical gate by any interference and does not influence simultaneously.It is suitble to the design in logic function, V&V, testAnd the various occasions of verifying use.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effectsIt is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the inventionProtection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all includeWithin protection scope of the present invention.