Two-dimensional array display and transfer method based on simulation platform and computer readable storage medium thereof
Patent Information
- Application Number
- CN202610789594.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-09-25
AI Technical Summary
此种传统方式下,难以应对工程项目中上千数量级的二维数组输入、输出需求,且需要定义的算法功能块及接口标记过多
本发明通过相结合使用的一维数组与结构体来构建二维数组功能块,并将抽象的二维数组功能块配置为包括图元名称及接口标记的二维数组图元,将底层的数据逻辑转化为可视化的图形对象。通过设置与输入、输出接口一一对应的接口标记,用户无需深入代码层级即可在图形化界面中清晰辨识数据的输入输出端口。通过指向性连线的连接方式,使二维数组在功能块之间的数据传递关系清晰有序,便于后续的仿真调试和错误排查。
Smart Images

Figure CN122816619A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation and digital twins, and in particular to a method for displaying and transmitting two-dimensional arrays based on a simulation platform and a computer-readable storage medium thereof. Background Technology
[0002] Current simulation environments typically only support multiple data points being passed to the same algorithm function block through their respective interface tags, and outputting multiple independent data points in real time. This traditional approach is insufficient to handle the input and output requirements of thousands of two-dimensional arrays in engineering projects, and it also requires defining too many algorithm function blocks and interface tags.
[0003] Moreover, existing simulation calculation function blocks do not have a suitable method to store two-dimensional arrays, nor can they directly transfer two-dimensional arrays between two algorithm function blocks by wiring. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to address at least one defect of the related technologies mentioned in the background: existing simulation environments generally only support multiple data to be passed into the same algorithm function block through their respective interface tags and output multiple independent data in real time, and provide a two-dimensional array display and transmission method based on the simulation platform and its computer-readable storage medium.
[0005] The technical solution adopted by this invention to solve its technical problem is: to construct a two-dimensional array display and transmission method based on a simulation platform, including the following steps: In the simulation platform, two-dimensional array function blocks are constructed by combining one-dimensional arrays and structures; the two-dimensional array function blocks are configured to include several input interfaces, several output interfaces, data attributes, and calculation methods; Configure the two-dimensional array function block as a two-dimensional array primitive. The two-dimensional array primitive includes the primitive name and the interface tags corresponding to the input interface and the output interface. By configuring directional data transmission lines, the relevant interface markers of two two-dimensional array primitives are connected to achieve data transfer between two-dimensional array functional blocks.
[0006] Optionally, in the simulation platform, two-dimensional array function blocks are constructed by combining one-dimensional arrays and structures, including: Define a structure, which includes N data elements, and supports separate definitions of data types and data point names; each one-dimensional array is configured to store M structures.
[0007] Optionally, data attributes include data quantity, measurement range, and data type; calculation methods include functional algorithm formulas, calculation rules, correction coefficients, and interpolation calculation schemes.
[0008] Optionally, the input and output interfaces are configured with corresponding interface names, interface point names, and block sequence numbers; The data transmission line is configured with an input sequence number, an output sequence number, and a transmission line sequence number; When the two elements connected by the data transmission line are correct, select the data transmission line number that matches the preset data transmission line number.
[0009] Optionally, the method further includes: The simulation platform also includes general function blocks, which are used to input, store, calculate, and output individual data. General function blocks can be configured to include several input interfaces, several output interfaces, data attributes, and calculation methods. Configure a regular function block to include several input interfaces, several output interfaces, data attributes, and calculation methods; Configure ordinary function blocks as ordinary graphic elements. Ordinary graphic elements include graphic element names and interface tags corresponding to input interfaces and output interfaces. By configuring directional data transmission lines, the relevant interface markers of ordinary graphic elements and two-dimensional array graphic elements are connected, and the data flow relationship between the data to be transmitted in the two-dimensional array graphic elements and the data of the ordinary graphic elements is determined, so as to realize the data transmission between ordinary function blocks and two-dimensional array function blocks.
[0010] Optionally, two-dimensional array primitives and ordinary primitives are set to different styles according to the functions they implement, and interface tags and data transmission lines are set to different styles according to the data type transmitted.
[0011] Optionally, selecting any graphic element or data transmission line will display a list of parameters for the selected graphic element or data transmission line. For selected two-dimensional array graphic elements, a list of their stored two-dimensional arrays will also be displayed.
[0012] Optionally, the method further includes: Create several pages according to the logic function diagram, and arrange ordinary graphic elements, two-dimensional array graphic elements, and data transmission lines on the pages; Configure parameters for ordinary graphic elements, two-dimensional array graphic elements, and data transmission lines; After completing the parameter configuration, run the simulation platform to realize the logic function to be simulated and obtain real-time calculation data.
[0013] Optionally, the method further includes: setting interface rules for elements with the same name between different pages according to the logical function diagram, whereby elements with the same name can coexist on other pages to achieve cross-page data transmission of elements with the same name.
[0014] The present invention also constructs a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the two-dimensional array display and transmission method based on a simulation platform as described above.
[0015] By implementing this invention, the following beneficial effects are achieved: This invention constructs two-dimensional array functional blocks by combining one-dimensional arrays and structures. The abstract two-dimensional array functional blocks are configured as two-dimensional array primitives, including primitive names and interface tags, transforming the underlying data logic into visual graphical objects. By setting interface tags that correspond one-to-one with input and output interfaces, users can clearly identify data input and output ports in the graphical interface without delving into the code level. The directional connection method ensures a clear and orderly data transfer relationship between the two-dimensional array functional blocks, facilitating subsequent simulation debugging and error correction. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This invention illustrates a flowchart of the steps involved in data transfer between functional blocks of a two-dimensional array in one embodiment of the two-dimensional array display and transfer method based on a simulation platform according to the present invention. Figure 2 This illustration shows a schematic diagram of the two-dimensional array algorithm block primitives and their parameter windows in one embodiment of the two-dimensional array display and transmission method based on a simulation platform according to the present invention; Figure 3 This invention illustrates a flowchart of the steps involved in data transfer between a regular function block and a two-dimensional array function block in one embodiment of the two-dimensional array display and transfer method based on a simulation platform according to the present invention. Figure 4 This illustration shows a schematic diagram of a common primitive AND and its parameter window in one embodiment of the two-dimensional array display and transmission method based on a simulation platform according to the present invention; Figure 5 A schematic diagram of a two-dimensional array transmission line and its parameter window is shown in one embodiment of the two-dimensional array display and transmission method based on a simulation platform according to the present invention. Figure 6 A schematic diagram of a typical two-dimensional array primitive is shown in one embodiment of the two-dimensional array display and transmission method based on a simulation platform according to the present invention; Figure 7 The flowchart illustrates the steps of implementing the logic function to be simulated according to the logic function diagram in one embodiment of the two-dimensional array display and transmission method based on the simulation platform of the present invention. Figure 8 The diagram shows a connected instance logic diagram of one embodiment of the two-dimensional array display and transmission method based on a simulation platform according to the present invention. Detailed Implementation
[0017] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0018] It should be noted that the flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0019] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0020] It should be noted that "at least two" refers to at least two, which can be two, three, or any number. "At least one" can be one, two, or any number.
[0021] GENUS is a Windows-based, object-oriented, graphical simulation support platform developed to meet the simulation needs of nuclear power, thermal power, and hydropower. It can be used for the development, operation, and maintenance of full-range simulators and engineering simulators for nuclear power, thermal power plants, and hydropower plants.
[0022] like Figure 1 As shown, some embodiments of the present invention disclose a method for displaying and transmitting two-dimensional arrays based on a simulation platform, specifically the GENUS simulation platform, including the following steps: S10: In the simulation platform, a two-dimensional array function block is constructed by combining a one-dimensional array and a structure; the two-dimensional array function block is configured to include several input interfaces, several output interfaces, data attributes, and calculation methods; among them, data attributes include the number of data, the range, and the data type; the calculation methods include the functional algorithm formula, calculation rules, correction coefficients, and interpolation calculation scheme.
[0023] S20: Configure the two-dimensional array function block as a two-dimensional array primitive. The two-dimensional array primitive includes the primitive name and the interface tags corresponding to the input interface and the output interface.
[0024] S30: By configuring directional data transmission lines, the relevant interface markers of two two-dimensional array primitives are connected to realize data transfer between two-dimensional array function blocks.
[0025] Furthermore, compared to ordinary function blocks, the input and output interfaces of two-dimensional array function blocks are configured with corresponding interface names, interface point names, and block numbers. Here, the interface name is a formal parameter, and the interface point name is the actual data name of the input interface. In the data transmission line, compared to ordinary transmission lines (which can only transmit a single piece of data), the two-dimensional array transmission line is configured with an input number, an output number, and a transmission line number.
[0026] Selecting any graphic element or data transmission line will display a list of parameters for the selected graphic element or data transmission line. For selected two-dimensional array graphic elements, it will also display a list of its stored two-dimensional arrays.
[0027] This embodiment constructs two-dimensional array function blocks by combining one-dimensional arrays and structures. The abstract two-dimensional array function blocks are configured as two-dimensional array primitives, including primitive names and interface tags, transforming the underlying data logic into visual graphical objects. By setting interface tags that correspond one-to-one with input and output interfaces, users can clearly identify data input and output ports in the graphical interface without delving into the code level. The directional connection method makes the data transfer relationship between the two-dimensional arrays between function blocks clear and orderly, facilitating subsequent simulation debugging and error troubleshooting.
[0028] In some embodiments, the method further includes: S00: Based on the computational requirements of the distributed control system for nuclear power plant field instrumentation, a development environment is established on the simulation platform by calling existing library files. These library files include pre-developed utility functions from the simulation platform. Subsequent code writing can directly utilize these pre-developed utility functions, improving code development efficiency.
[0029] Specifically, a task is a development tool for the GENUS simulation platform. It uses the C++ programming language to edit mathematical code and, based on the computational requirements of a nuclear power plant's DCS (Distributed Control System), builds a matching task development environment within the GENUS simulation platform. This task calls upon GENUS simulation platform library files, which include utility functions (such as API functions). By integrating the written functional algorithms (such as two-dimensional array algorithms, one-dimensional array algorithms, and ordinary constant algorithms) into the task project, compiling and linking them, an executable file that allows the module to run on the simulation platform is generated.
[0030] In practical engineering applications, system engineers responsible for program development need to configure the C++ development environment and header files in advance, write the program code for each two-dimensional array function block while adhering to programming rules, and configure the code for data transmission line connection. After completing the code review and generating the solution, it can be applied to the corresponding task directory.
[0031] In C++ programs, two-dimensional arrays can be defined directly. For example, entering the code double C_in1
[11] [7] in the programming area defines an 11×7 two-dimensional array named C_in1, which contains a total of 77 data. In C++, specified data can be called to participate in numerical calculations. For example, the custom factor
[10] [4] refers to the specified data in the 11th column and 5th row of the defined two-dimensional array factor (in C++, arrays are indexed starting from 0, and the data in the first row and first column corresponds to factor[0][0]). However, the GENUS simulation platform does not support the direct display of two-dimensional arrays. To facilitate actual simulation applications, two-dimensional arrays need to be redefined.
[0032] In some embodiments, a two-dimensional array function block is constructed in the simulation platform by combining one-dimensional arrays and structures, including: defining a structure, which includes N data elements and supports separate definition of data types and data point names; each one-dimensional array is configured to store M structures.
[0033] By combining M structures, the M×N two-dimensional array data in the two-dimensional array function block is mapped and displayed. This nested structure of "one-dimensional array + structure" forms a natural row and column correspondence with the M×N two-dimensional array function block primitives in the logic function diagram, so as to achieve accurate mapping from the underlying code to the graphical interface in the future.
[0034] Specifically, each two-dimensional array function block can be defined as a struct in the header file (.h), specifying its corresponding task file and giving it a unique name. The input and output names defined within the function block primitives can be displayed and viewed on the GENUS platform's human-computer interaction interface. The header file also defines the calling path of the two-dimensional array function block. For example... Figure 2 As shown, in the GENUS simulation platform, a two-dimensional array C_in1
[11] [7] is defined by combining a one-dimensional array with a structure. First, the required vertical data structure needs to be defined. For example, the two-dimensional array C_in1
[11] [7] can use the structure Layer7ds defined in the header file. Developers can define the type and variable name of the 7 data elements of the structure itself separately, so that the data types of the 77 data elements in the one-dimensional array containing 11 structures are defined. By combining the 11 structures, each containing 7 data elements, the two-dimensional array can be defined. Figure 2The parameter window on the right side is divided into Layer1 to Layer7 vertically and [0] to
[10] horizontally. Each column corresponds to one vertical structure. For example, the vertical structure corresponding to column [0] includes 7 data elements: 3, 7, 9, 10, 8, 5, and 2. There are 11 vertical structures with 7 data elements in total from left to right. The data is mapped to the 11×7 two-dimensional array data in the two-dimensional array primitive GROUP. The two-dimensional array can be defined as Layer7ds C_in1
[11] in the header file (.h). Taking one of the data factors
[10] [4] in the two-dimensional array C_in1
[11] [7] as an example, the two-dimensional array it belongs to is defined as Layer7ds factor
[11] in the header file of the GENUS simulation platform. The new expression of this data in the GENUS simulation platform is factor
[10] .Layer5, which both represent the data in the 11th column and the 5th row of the two-dimensional array. In addition to defining two-dimensional arrays as described above, one-dimensional arrays can be defined in the format of double factor
[11] and used in the GENUS platform. The constant definition method is the same as double factor. The variable names in the same two-dimensional array block cannot be repeated. The example variable name "factor" can be customized according to actual usage needs.
[0035] It should be noted that the data and structure definitions above are for illustrative purposes only, and can be set to other data and other structures (such as horizontal structures) according to actual needs.
[0036] In some embodiments, such as Figure 3 As shown, the method also includes: S11: The simulation platform also includes ordinary function blocks, which are used to input, store, calculate and output individual data; ordinary function blocks are configured to include several input interfaces, several output interfaces, data attributes and calculation methods.
[0037] S21: Configure a normal function block as a normal graphic element. A normal graphic element includes a graphic element name and interface tags corresponding to the input interface and output interface.
[0038] S31: By configuring directional data transmission lines, the relevant interface markers of ordinary graphic elements and two-dimensional array graphic elements are connected, and the data flow relationship between the data to be transmitted in the two-dimensional array graphic elements and the data of ordinary graphic elements is determined, so as to realize the data transmission between ordinary function blocks and two-dimensional array function blocks.
[0039] Specifically, such as Figure 4As shown, configuring the ordinary function block AND as an ordinary graphic element AND and selecting the ordinary graphic element AND in the simulation platform running state will bring up the parameter list on the right. The input interface points Input1_i and Input2_i correspond to the two input interfaces of the ordinary graphic element AND, which transmit a single Boolean value (bool) data from the top of the ordinary graphic element AND through the data transmission line; the output interface point name Output_i corresponds to the output interface of the algorithm block, which transmits a single Boolean value data from the black wire below the ordinary graphic element AND.
[0040] Two-dimensional array primitives typically have multiple input or output interfaces, supporting the input and output of two-dimensional arrays, one-dimensional arrays, and constants. Taking the data transfer between two-dimensional array primitive A and ordinary primitive B as an example, in addition to configuring a data transmission line with a pointing direction (i.e., two-dimensional array primitive A points to ordinary primitive B) to connect the relevant interface markers of ordinary primitive B and two-dimensional array primitive A, it is also necessary to determine the data to be transferred in two-dimensional array primitive A, such as the data factor
[10] .Layer5 in the 11th column and 5th row of two-dimensional array primitive A and the data flow relationship between ordinary primitive B (i.e., the input interface of two-dimensional array primitive A to transfer one of its data factor
[10] .Layer5 to ordinary primitive B). This can be achieved using the point file Assign method, writing A.fa in the file. By configuring ctor
[10] .Layer5→B.Input, the data transfer relationship between the two-dimensional array element A and the ordinary element B can be completed. Similarly, if it is determined that the data flow relationship between the position data factor
[10] .Layer5 to be transferred in the two-dimensional array element A and the ordinary element B is reversed (i.e., the output data of the ordinary element B is transferred to the position data factor
[10] .Layer5 in A), then during the reverse transmission, B.Output→A.factor
[10] .Layer5 can be written, and the reverse data transmission line can be configured at the same time (i.e., the ordinary element B points to the two-dimensional array element A) to complete the reverse data transfer. The data transfer process between two-dimensional array elements for one-dimensional arrays and constants is similar to the above. It is necessary to determine the data to be transferred and the data flow relationship (including the data flow direction and flow position), which will not be elaborated here.
[0041] In some embodiments, the two-dimensional array primitives have the function of reading constant list documents, importing document data into the two-dimensional array according to rules by reading the data file name. This function is designed for situations where measurement and calculation data often need to be corrected during scientific computing, so that the corrected data can be quickly used in the functional calculation of the two-dimensional array block. When the data in the input document (such as a TXT document, Excel document, etc.) changes, this function does not require reprogramming the two-dimensional array block; it can simply read the document data again.
[0042] In some embodiments, the input and output interfaces of the two-dimensional array function block are configured with corresponding interface names, interface point names, and block sequence numbers. The two-dimensional array transmission lines in the data transmission lines are configured with input sequence numbers, output sequence numbers, and transmission line sequence numbers. When the two elements connected by the data transmission line are correct, the selected data transmission line's transmission line number matches the preset transmission line number. When the two elements connected by the data transmission line are incorrect, the selected data transmission line's transmission line number does not match the preset transmission line number.
[0043] Specifically, in the LinkxAlg.cpp file of the C++ program code, developers need to manually configure the input and output interfaces of the two primitives to be transmitted, with corresponding interface names, interface point names, and block numbers, such as... Figure 2 As shown, the interface name corresponding to the input interface is C_in1 and the interface point name is Layer7ds
[11] . The interface name corresponding to the output interface is C_out1 and the interface point name is Layer7ds
[11] . The block number num is 0, and the input number, output number and transmission line number of the data transmission line connecting the two primitives are configured.
[0044] like Figure 5 As shown, the two-dimensional array primitives and the two-dimensional array transmission lines in the figure have been connected. (Selected) Figure 5 The thick black arrows represent the two-dimensional array transmission lines. The output terminal LinkFromPinNum in the parameter window on the right shows input number 1, and the input terminal LinkToPinNum shows output number 1. The displayed default LinkNum transmission line number is 5, indicating that the selected transmission line number matches the default number, and the connection is correct. If the actual connection between the graphic element and the data transmission line does not match the default transmission line number, the actual connection is incorrect and needs adjustment. For example, in a logic function diagram, the connection between the graphic element and the data transmission line shows 100 data transmission lines. When configuring the data transmission lines, each of these 100 lines is numbered. When the actual connection between the algorithm block graphic element and the data transmission line is correct, the default LinkNum transmission line number will appear in the table on the right when the data transmission line is selected.
[0045] In some embodiments, the two-dimensional array primitives and data transmission lines have reserved input and output interfaces for later configuration. These reserved input and output interfaces allow for subsequent adjustments to the data transmission interfaces of the two-dimensional array primitives and data transmission lines.
[0046] Specifically, such as Figure 2 , Figure 5As shown in the figure, Spare1 and Spare2 in the parameter list are the reserved input and output interfaces to be configured in the corresponding two-dimensional array primitives or data transmission lines, which can be configured according to actual needs.
[0047] In this invention, based on the upstream design scheme (including several input interfaces, several output interfaces, data attributes, and calculation methods) and the logic function diagram (including element names, element styles, element positions in each page, connection relationships between elements and data transmission lines, and interface rules for elements with the same name across different pages), program code is written in C++, header files are configured, and the upstream design scheme is ultimately expressed as integrated functional blocks. Function block elements are then drawn to implement the algorithm block functionality of the upstream design. Engineers can configure the elements according to the logic function diagram, arrange and connect the configured elements in the simulation platform's pages to achieve the logic function to be simulated.
[0048] In some embodiments, two-dimensional array primitives and ordinary primitives are set to different styles according to the functions they implement, and interface markers and data transmission lines are set to different styles according to the data type transmitted.
[0049] Specifically, the GENUS simulation platform has a custom drawing function for primitives, which can be drawn using the ShapeStudio software. When drawing primitives, the shape, color, size, text, formulas and interface marks of the primitives can be set according to their functions implemented in the logic function diagram.
[0050] The size and proportions of the interface elements are usually consistent with the design data to make the final appearance more visually similar to the logic function diagram, facilitating engineer identification. Interface markers are set with different styles according to the data type being transmitted. Different interface markers include at least one of the following: interface markers with different line segment pixel lengths, different line segment thicknesses, different line segment colors, and different shapes. By setting different interface markers according to different data types, engineers can intuitively understand the data type of the interface. For example, an interface marker with a 15-pixel length represents the transmission of a single data point, while an interface marker with a 30-pixel length represents the transmission of a two-dimensional array. If the interface marker line segment color is red, it indicates that the transmitted data is a real number type (double), and if the interface marker line segment color is blue, it indicates that the transmitted data is a 0 / 1 type (bool). A typical two-dimensional array element drawn after this process would look like this: Figure 6 As shown.
[0051] Data transmission line styles include: two-dimensional array transmission lines, one-dimensional array transmission lines, and ordinary transmission lines. Different styles are set according to the data type being transmitted. Different data transmission lines include at least one of the following: data transmission lines with different line thicknesses, data transmission lines with different line colors, and data transmission lines with different shapes. For example, the line thickness of two-dimensional array transmission lines, one-dimensional array transmission lines, and ordinary transmission lines can gradually decrease. It should be noted that the above examples are for illustrative purposes only; different element styles, interface styles, and transmission line styles can be set according to the actual situation, which will not be described in detail here.
[0052] In some embodiments, when any graphic element or data transmission line is selected, a parameter list of the selected graphic element or data transmission line is displayed. For a selected two-dimensional array graphic element, a list of its stored two-dimensional arrays is also displayed.
[0053] Specifically, the selection of algorithm block elements or data transmission lines can be achieved by clicking on the input device (e.g., left / right mouse click, left / right mouse click, double-click), or by entering the name of the algorithm block element or data transmission line in the specified search box via the input device. When any element is selected, it will be in a selected state. The selected state will change the original style of the element, which can be set according to actual needs, and will display a parameter list of the selected element, such as... Figure 4 As shown, the AND ordinary graphic element is highlighted in red at this time, and the parameter list of the selected AND ordinary graphic element is displayed. It can be determined from the fact that the upstream and downstream data interfaces are marked in blue. The original blue line segments at the top and bottom of the graphic element are changed to red for highlighting. When other graphic elements, data transmission lines or blank positions are selected, the graphic element will return to its normal display state.
[0054] In some embodiments, such as Figure 7 As shown, the method also includes: S40: Create several pages according to the logic function diagram and arrange ordinary graphic elements, two-dimensional array graphic elements and data transmission lines on several pages.
[0055] S50: Configure parameters for ordinary graphic elements, two-dimensional array graphic elements, and data transmission lines. Parameter configuration for ordinary graphic elements, two-dimensional array graphic elements, and data transmission lines can be done in advance when writing the program code, or by selecting the parameter list displayed for the graphic element and data transmission line, the parameters can be configured separately for each. When configuring graphic elements and transmission lines, ensure that the data type of the two-dimensional array at the output and input ends is consistent to avoid transmission errors and program errors.
[0056] S60: After completing the parameter configuration, run the simulation platform to implement the logic function to be simulated and obtain real-time calculation data. Furthermore, while running the simulation platform, the parameter configurations of the primitives and data transmission lines can be adjusted in real time to adapt to different operating conditions and obtain real-time calculation data under different operating conditions. The calculation interval is typically set to 50ms to ensure the real-time performance of the calculation data. After debugging, you can choose to save the name settings and parameter configurations of the algorithm block primitives and data transmission lines under the current operating conditions (such as IC operating conditions) for direct recall during subsequent simulation debugging.
[0057] Specifically, a page created according to the logical function diagram is arranged with ordinary graphic elements, two-dimensional array graphic elements, and data transmission lines, such as... Figure 8 As shown, it includes two-dimensional array primitives, ordinary primitives, two-dimensional array transmission lines, and ordinary transmission lines. The data types transmitted include double (data interface corresponding to the red line segment) and bool (data interface marker corresponding to the blue line segment). Some primitives also include data interfaces on the left. Figure 8 The example uses calculation methods for graphical elements, including addition, minimum value, absolute value, division, value route selection, limit value, and AND operation of two-dimensional arrays, as well as data transmission methods for data transmission lines. The C++ programming language used to develop the graphical elements of the functional blocks supports scientific computing functions such as conditional judgment, loop iteration, interpolation calculation, and matrix calculation, fully meeting the actual development needs of engineering projects.
[0058] Furthermore, the method also includes setting interface rules for elements with the same name across different pages based on the logical function diagram. Elements with the same name can coexist on other pages to achieve cross-page data transmission of elements with the same name. By allowing elements to be reused across pages and establishing communication based on interface rules, the logical isolation limitations of a single page are broken, ensuring the consistency and real-time synchronization of global data states, greatly improving the flexibility of the system architecture and the development efficiency of large-scale engineering projects.
[0059] Specifically, when creating multiple pages according to a logical function diagram, based on the interface rules for elements with the same name across different pages in the logical function diagram, elements with the same name can coexist on other pages to achieve cross-page data transfer of elements with the same name. For example, such as Figure 8 As shown, the top input and bottom output primitives in the figure can coexist on other pages in the GENUS simulation platform through a same-name interface (i.e., the interface rule for primitives with the same name across different pages). Furthermore, Figure 8 The gray-background primitives are primitives with the same name that also exist on other pages, and can be transferred across pages via point files.
[0060] The present invention also constructs a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the two-dimensional array display and transmission method based on a simulation platform as described above.
[0061] By implementing this invention, the following beneficial effects are achieved: 1. High Integration: The underlying environment configuration for 2D array function blocks and data transmission lines is achieved through the task development tools of the GENUS simulation platform. Mathematical code is edited using C++, encapsulating and naming the 2D array function blocks within the upstream design primitives, allowing each functional primitive to independently perform calculations. The program code is easily upgraded and modified, greatly reducing the workload of upgrades and maintenance. The primitives of the function blocks can be drawn according to requirements, their size is adjustable, and they are simple and clear to use, providing a reliable development platform and solution for scientific calculations involving complex 2D arrays that may be involved in projects.
[0062] 2. Simplified Interface: The input and output terminals of the two-dimensional array function block primitives can be freely configured with any number of interfaces according to design needs. The two-dimensional array primitives also support the input and output of two-dimensional arrays, one-dimensional arrays and constants. In actual use, it can make instrumentation and control modeling and wiring work more convenient, saving the tedious configuration work of two-dimensional array N×M point file transfer.
[0063] 3. Stable and Reliable: The calculation cycle of the two-dimensional array function block is consistent with that of the simulator. It adopts the task development technology of the simulation company and is highly compatible with the GENUS simulation platform. The technical solution is developed based on the actual upstream design requirements of nuclear power plant sites, and the calculation methods can achieve basic consistency with the actual DCS hardware system.
[0064] This invention is developed based on the GENUS simulation platform. It can easily configure the wiring and interfaces of functional block elements, and adjust the parameter settings and calculation status of functional block elements under steady-state and transient operating conditions. It supports the input of data in various document formats, which greatly improves the efficiency of engineering debugging and simulation.
[0065] It is understood that the above embodiments only illustrate some implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above embodiments or technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. That is, the embodiments described "in some embodiments" can be freely combined with any of the preceding and following embodiments. Therefore, all equivalent transformations and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.
Claims
1. A method for displaying and transmitting two-dimensional arrays based on a simulation platform, characterized in that, Includes the following steps: In the simulation platform, a two-dimensional array function block is constructed by combining a one-dimensional array and a structure; the two-dimensional array function block is configured to include several input interfaces, several output interfaces, data attributes, and calculation methods; Configure the two-dimensional array function block as a two-dimensional array primitive, wherein the two-dimensional array primitive includes a primitive name and an interface label corresponding to the input interface and the output interface; By configuring directional data transmission lines, the relevant interface markers of the two two-dimensional array primitives are connected to realize data transfer between the two-dimensional array functional blocks.
2. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 1, characterized in that, The method of constructing a two-dimensional array function block in the simulation platform by combining one-dimensional arrays and structures includes: Define the structure, which includes N data elements and supports separate definitions of data types and data point names; each one-dimensional array is configured to store M of the structures.
3. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 1, characterized in that, The data attributes include the number of data, the range of measurement, and the data type; the calculation method includes the functional algorithm formula, calculation rules, correction coefficients, and interpolation calculation scheme.
4. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 3, characterized in that, The input interface and the output interface are configured with corresponding interface names, interface point names and block sequence numbers; The data transmission line is configured with an input sequence number, an output sequence number, and a transmission line sequence number; When the two graphic elements connected by the data transmission line are correct, select the data transmission line number that matches the preset data transmission line number.
5. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 3, characterized in that, The method also includes: The simulation platform also includes general function blocks, which are used to input, store, calculate, and output individual data. The general function blocks are configured to include several input interfaces, several output interfaces, data attributes, and calculation methods. The ordinary function block is configured as an ordinary graphic element, and the ordinary graphic element includes a graphic element name and an interface label corresponding to the input interface and the output interface; By configuring directional data transmission lines, the relevant interface markers of the ordinary graphic elements and the two-dimensional array graphic elements are connected, and the data flow relationship between the data to be transmitted in the two-dimensional array graphic elements and the ordinary graphic elements is determined, so as to realize the data transmission between the ordinary functional blocks and the two-dimensional array functional blocks.
6. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 5, characterized in that, The two-dimensional array primitives and the ordinary primitives are set to different styles according to their functions, and the interface markers and the data transmission lines are set to different styles according to the data type transmitted.
7. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 5, characterized in that, Selecting any graphic element or data transmission line will display a parameter list of the selected graphic element or data transmission line. For a selected two-dimensional array graphic element, its stored two-dimensional array list will also be displayed.
8. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 5, characterized in that, The method also includes: Create several pages according to the logical function diagram, and arrange the ordinary graphic elements, the two-dimensional array graphic elements, and the data transmission lines on the several pages; Configure parameters for the ordinary graphic elements, the two-dimensional array graphic elements, and the data transmission line; After completing the parameter configuration, run the simulation platform to realize the logic function to be simulated and obtain real-time calculation data.
9. The method for displaying and transmitting two-dimensional arrays based on a simulation platform according to claim 8, characterized in that, The method further includes: setting interface rules for identically named graphic elements between different pages according to the logical function diagram, wherein the identically named graphic elements can coexist on other pages to realize cross-page data transmission of the identically named graphic elements.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the two-dimensional array display and transmission method based on the simulation platform as described in any one of claims 1-9.