Ship pipe network programming method based on visual lightweight modeling technology
By adopting visual lightweight modeling technology and Excel database integration methods in ship pipe network design, the complex and error-prone problems of traditional design methods are solved, and a more efficient, accurate and flexible ship pipe network design process is achieved.
Patent Information
- Application Number
- CN202510184549.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-06
AI Technical Summary
The traditional ship pipe network design method relies on complex text programming, lacks ease of use and flexibility, is difficult to adapt to the design needs of large ship pipe network systems, and is prone to human errors and exceeding limit errors.
The ship pipeline network programming method is adopted based on visual lightweight modeling technology. By obtaining the schematic diagram of the pipeline system, a graphical interface of human-computer interaction is built, and the Excel database is integrated with the interface, realizing intuitive management and automatic update of data, reducing manual operations and complex calculations.
It improves the flexibility and efficiency of ship pipe network design, reduces the occurrence of human errors, improves the accuracy and reliability of the design, and allows non-professional personnel to participate in design and optimization, simplifies the design process and lowers the professional threshold.
Smart Images

Figure CN120105708A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ship pipe network programming, and in particular to a ship pipe network programming method based on a visual lightweight modeling technology. Background Art
[0002] With the increasing complexity of ship engineering, the design and management of ship piping network systems has become one of the key links in ship design and manufacturing. In the design process of ship piping network systems, parameter management, data processing and result display are indispensable core parts.
[0003] The traditional method of ship pipe network design is still mainly based on text file programming, that is, manually writing text codes according to design parameters and requirements. Although this method can complete complex design tasks, it lacks ease of use and flexibility, especially when facing the pipe network system of large ships (such as LNG mother ships). The traditional method seems to be incapable of doing so. The traditional method requires manual input and processing of a large amount of data, which is complex and prone to human errors. It lacks real-time feedback and dynamic adjustment functions, and has a low reusability rate, making it difficult to adapt to the pipe network design needs of different types of ships. Summary of the invention
[0004] The present invention provides a ship pipe network programming method based on a visual lightweight modeling technology to overcome the above technical problems.
[0005] In order to achieve the above object, the technical solution of the present invention is:
[0006] A ship pipe network programming method based on visual lightweight modeling technology specifically includes the following steps:
[0007] S1: Obtain the piping system schematic diagram of the ship's pipe network;
[0008] The pipeline system schematic diagram includes at least pipeline location information / flow information, connection information between pipelines, and control information of pipeline layout;
[0009] S2: Construct a human-computer interactive graphical interface for the ship’s pipeline network based on the pipeline system schematic diagram;
[0010] S3: constructing an Excel database for storing and managing ship pipe network attribute information data based on the implementation sample diagram; the implementation sample diagram is a sample schematic diagram containing attribute information data obtained based on the pipe system schematic diagram;
[0011] The attribute information data at least includes the pipe network topology, pipe type, pipe flow direction, starting pipe, terminal pipe and maximum flow limit of the pipe;
[0012] S4: Integrate the data in the Excel database into the human-computer interactive graphical interface to obtain an optimized interactive graphical interface for visual lightweight modeling;
[0013] S5: Based on the optimized interactive graphical interface and the constructed ship pipeline network flow event mechanism, the decision-making management of the ship pipeline network is realized, and then the programming design of the ship pipeline network is realized.
[0014] Furthermore, the S2 specifically includes the following steps:
[0015] S21: Draw the pipeline distribution in the pipeline system schematic diagram based on SVG technology, and obtain a scalable ship vector base map based on XMAL format;
[0016] S22: Import scalable ship vector basemap in SVG format into a pre-built WPF framework;
[0017] Set the line segments or curves in the scalable ship vector base map as pipelines to confirm the distribution and direction of the pipelines;
[0018] S23: calling the WPF control library, adding the required pipeline controls to the scalable ship vector base map according to the pipeline system schematic diagram, and obtaining the optimized vector map;
[0019] The pipeline control comprises at least a pipeline valve, a pipeline pump and a flow label;
[0020] And calling the Canvas tool to set position nodes for key position points in the optimized vector diagram, and defining control nodes corresponding to pipeline controls;
[0021] The key location point is the intersection or bifurcation point of multiple pipelines;
[0022] S24: calling the Text Block tool to mark the node status information of the position node and the control node, and setting the attribute information data of the pipeline to obtain a human-computer interactive graphical interface of the ship pipeline network;
[0023] The node status information includes the control type, control pressure, control flow, and control water level displayed in symbols / colors / values.
[0024] Further, the data in the Excel database is integrated into the human-computer interactive graphical interface as described in S4, specifically:
[0025] Call the NutGet installation library of Visual Studio to install the EPPlus plug-in;
[0026] And convert the data in the Excel database into Data Table code through the EPPlus plug-in;
[0027] Call the Data Grid control to bind the Data Table code to the human-computer interaction graphical interface to achieve the integration of the Excel database and the human-computer interaction graphical interface.
[0028] Furthermore, the Excel database in S3 includes a rule model, the expression of which is
[0029] {PipelD,PipeDirection,PipeConnecterA,PipeConnecterB,IsSource,…,IsTerminal,MaxFlow}
[0030] Wherein, PipelD represents a unique identifier used to distinguish different pipelines;
[0031] PipeDirection indicates the flow direction of the pipeline, and according to the pipeline system schematic diagram, the liquid inflow pipeline of the ship pipeline network is defined as the A pipeline node, and the liquid outflow pipeline is defined as the B pipeline node;
[0032] PipeConnecterA represents other pipeline nodes connected to pipeline node A;
[0033] PipeConnecterB represents other pipeline nodes connected to the B pipeline node;
[0034] IsSource indicates the starting pipe segment;
[0035] ... represents the middle pipe section;
[0036] IsTerminal indicates the terminal pipe segment;
[0037] MaxFlow represents the maximum flow limit capacity of the pipeline;
[0038] And define the starting pipe segment IsSource as the source node, and the terminal pipe segment IsTerminal as the terminal node;
[0039] Define the intermediate pipe segments as hierarchical nodes, and define the intermediate pipe segments in sequence according to the pipeline flow direction from the source node to the end node
[0040] Among them, E represents the current node; D represents the previous node of E; F represents the next node of E; Indicates that node G and node H are peer nodes. Represents the description form of all sibling nodes of node H.
[0041] Furthermore, the decision management of the ship pipe network is realized based on the optimized interactive graphical interface and the constructed ship pipe network circulation event mechanism described in S5, which specifically includes the following steps:
[0042] S51: extracting a number of pipeline sections from the example sample diagram according to the pipeline system principle diagram;
[0043] Each of the pipeline sections is provided with a number of pipeline controls for pipeline layout;
[0044] S52: constructing a ship network circulation event mechanism based on the extracted pipeline segments;
[0045] The ship pipe network circulation event mechanism is specifically as follows:
[0046] Set click event instructions for pipeline controls by optimizing the interactive graphical interface;
[0047] Based on the click event command, the pipeline control of the corresponding pipeline layout is opened, and the ship pipeline network is confirmed to meet the flow conditions by traversal and addition;
[0048] The steps to confirm whether the ship pipeline network meets the circulation conditions include:
[0049] That is, first confirm whether the pipe section flow conditions are met, and if so, continue to confirm whether the pipeline flow conditions are met. The specific steps include:
[0050] Confirm whether the pipe flow condition is met, that is, traverse and add up to obtain the current number of controls turned on on any pipe segment, and determine whether the current number of controls turned on is the same as the total number of controls set on the pipe segment;
[0051] If they are confirmed to be the same, it is determined that the pipe section is allowed to flow;
[0052] Otherwise, it is determined that the pipe section is not allowed to flow;
[0053] Confirm whether the pipeline flow condition is met, that is, obtain all the intermediate pipe sections from the starting pipe section to the ending pipe section, and confirm whether each intermediate pipe section is allowed to flow based on the pipe section flow condition;
[0054] If each intermediate pipe section is confirmed to allow flow, then the entire pipeline from the starting pipe section to the ending pipe section is determined to allow flow;
[0055] Otherwise, it is determined that the entire pipeline is not allowed to flow;
[0056] After confirming that the pipeline flow conditions are met, continue to implement the pipeline network flow allocation strategy;
[0057] S53: confirm whether the inlet of any pump control in the entire pipeline that allows circulation is the outlet of another pump control;
[0058] If so, set the flow rate of each pump control in the entire pipeline to the rated flow rate of the pump;
[0059] And continue to execute step S54;
[0060] Otherwise, according to the predefined pump control power, and along the pipeline direction from the termination node to the source node, the flow is requested from the upper node of the pipeline where each pump control is located;
[0061] S54: Optimizing the maximum flow limit of the pipe segment node based on the flow limit adjustment rule;
[0062] Based on the maximum flow limit of the optimized pipe segment node, the flow is distributed to the lower nodes in turn according to the flow after the request at each level from the source node to the terminal node;
[0063] The traffic restriction adjustment rule is specifically:
[0064] Confirm whether the flow rate of any pipe section in the entire pipeline is greater than the maximum allowable flow rate of the corresponding pipe section;
[0065] If not, continue to execute step S55;
[0066] If so, confirm whether there is a node at the same level for the pipe segment;
[0067] If it is confirmed to exist, the part of the flow that exceeds the maximum allowable flow of the pipe section will be transferred to the nodes at the same level as the pipe section, and when all nodes at the same level confirm that the flow limit has been reached, the maximum flow limit of the corresponding upper node will be adjusted by adjusting the pump control power;
[0068] If it is confirmed that it does not exist, the maximum flow limit of the corresponding upper node is adjusted directly by adjusting the pump control power;
[0069] The flow in the ship pipe network is obtained and transferred and distributed between each node level, thereby realizing the programming design scheme of the ship pipe network, and continuing to execute step S55;
[0070] S55: The final flow distribution in the ship's pipe network is displayed on the flow label to achieve visual monitoring of the ship's pipe network status.
[0071] The present invention provides a ship pipe network programming method based on visual lightweight modeling technology, and the beneficial effects are as follows:
[0072] (1) By integrating the Excel database with the human-computer interactive graphical interface, the design and calculation of the ship's pipe network system are more intuitive and efficient. Designers can centrally modify various parameters of the pipe network in the Excel spreadsheet, such as pipe flow direction, maximum flow, etc. The system will automatically update the graphical interface in real time to ensure the accuracy and consistency of the design, greatly improving the flexibility of the ship's pipe network programming design, enabling designers to quickly adjust and optimize parameters, and improving the efficiency of the ship's pipe network programming design.
[0073] (2) Compared with the traditional pipe network design method, the method of the present invention significantly reduces the manual operations and complex calculations in programming, and reduces the occurrence of human errors; the traditional method relies on complex text codes and matrix calculations, which easily leads to lengthy and difficult to maintain codes, and is prone to over-limit errors when dealing with complex pipe network systems; after adopting the method of the present invention, designers can set parameters through simple and easy-to-understand Excel tables, and automatically complete subsequent operations and provide feedback through preset programs, effectively reducing the risk of errors, thereby improving the accuracy and reliability of ship pipe network design.
[0074] (3) The method of the present invention simplifies the design process and lowers the professional threshold: designers do not need to have an in-depth understanding of complex programming languages or matrix operations. They can complete the design and optimization of the pipeline network through a graphical interface and Excel spreadsheet operations. This not only reduces the dependence on professionals, but also enables even non-professionals to participate in the modeling, calculation and optimization of the pipeline network system. It also promotes the popularization and efficient execution of ship design, analysis and optimization work. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0076] Figure 1 It is a flow chart of a ship pipe network programming method based on a visual lightweight modeling technology of the present invention;
[0077] Figure 2 is a schematic diagram of a human-computer interaction graphical interface in this embodiment;
[0078] Figure 3 This is a flow chart of the ship pipe network circulation event mechanism constructed in this embodiment;
[0079] Figure 4 Schematic diagram of a graphical interface of a sewage system pipe network of a ship in this embodiment;
[0080] Figure 5 This is a program display diagram when there is no pipeline flow affected by the maximum displacement of the pump in the pipeline network in this embodiment;
[0081] Figure 6 This is the program display diagram when the maximum displacement of the pump in the pipeline network affects the pipeline flow in this embodiment. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] This embodiment provides a ship pipe network programming method based on visual lightweight modeling technology. Figure 1 As shown, the specific steps include:
[0084] S1: Obtain the piping system schematic diagram of the ship's pipe network;
[0085] The pipeline system schematic diagram includes at least pipeline location information / flow information, connection information between pipelines, and control information of pipeline layout;
[0086] S2: Construct a human-computer interactive graphical interface for the ship’s pipeline network based on the pipeline system schematic diagram;
[0087] like Figure 2 As shown, the specific steps include:
[0088] S21: Draw the pipeline distribution in the pipeline system schematic diagram based on SVG technology, and obtain a scalable ship vector base map based on XMAL format;
[0089] S22: Import scalable ship vector basemap in SVG format into a pre-built WPF framework;
[0090] Set the line segments or curves in the scalable ship vector base map as pipelines to confirm the distribution and direction of the pipelines; the development process and method of the established WPF framework are existing well-known technologies and will not be described in detail here;
[0091] S23: calling the WPF control library, adding the required pipeline controls to the scalable ship vector base map according to the pipeline system schematic diagram, and obtaining the optimized vector map;
[0092] The pipeline control comprises at least a pipeline valve, a pipeline pump and a flow label;
[0093] And calling the Canvas tool to set position nodes for key position points in the optimized vector diagram, and defining control nodes corresponding to pipeline controls;
[0094] The key location point is the intersection or bifurcation point of multiple pipelines;
[0095] S24: calling the Text Block tool to mark the node status information of the position node and the control node, and setting the attribute information data of the pipeline to obtain a human-computer interactive graphical interface of the ship pipeline network;
[0096] The node status information includes the control type, control pressure, control flow, and control water level displayed in symbols / colors / values. In this embodiment, by setting the node status to provide a real-time monitoring function, the status information of the pipeline network nodes (such as valves, pumping stations, etc.) can be obtained and displayed. Common node status information includes pressure, flow, and water level, etc.; through the human-computer interactive graphical interface, the node status information can be displayed in the form of symbols, colors, values, etc. For example, use color to identify the operating status of the node (such as green for normal, red for abnormal, and gray for closed), combined with numerical values to display key parameters in real time; this function makes it easy for users to quickly identify abnormalities and take timely and effective management measures to ensure the safe and reliable operation of the pipeline system;
[0097] The human-computer interaction graphical interface of the ship pipeline network in this embodiment is one of the core functions of the ship pipeline network visualization lightweight modeling program. It can display the topological structure of the pipeline network through an intuitive graphical interface, helping users to clearly understand the layout and connection relationship of the pipeline. The human-computer interaction graphical interface is constructed by combining the base map with the controls, that is, the base map describing the distribution of pipelines and equipment is drawn, and imported into the WPF framework in SVG format; then, the required controls such as valves, pumps, flow labels, etc. are dragged from the WPF control library to the corresponding positions of the base map to further improve the program interface. This embodiment uses concise and clear line segments or curves to represent pipelines, allowing users to easily identify the direction and distribution of pipelines; using nodes to mark key connection points in the pipeline network, and displaying relevant attribute information of pipeline imports and exports, such as flow source, flow direction, etc., to enhance the intuitiveness and ease of operation of the pipeline network structure; among them Figure 2 In it, G0.0 indicates flow label, and P0.0 indicates pressure label;
[0098] S3: constructing an Excel database for storing and managing the ship pipe network attribute information data based on the sample diagram of the embodiment; the sample diagram of the implementation is a sample schematic diagram containing attribute information data obtained based on the pipe system schematic diagram;
[0099] The attribute information data at least includes the pipe network topology, pipe type, pipe flow direction, starting pipe, terminal pipe and maximum flow limit of the pipe;
[0100] In a specific embodiment, the Excel database in S3 includes a rule model, whose expression is:
[0101] {PipelD,PipeDirection,PipeConnecterA,PipeConnecterB,IsSource,…,IsTerminal,MaxFlow}
[0102] Wherein, PipelD represents a unique identifier used to distinguish different pipelines;
[0103] PipeDirection indicates the flow direction of the pipeline, and defines the liquid inflow pipeline of the ship pipeline network as the A pipeline node, and the liquid outflow pipeline as the B pipeline node according to the pipeline system schematic diagram; in this embodiment, the pipeline system schematic diagram is based on the preset position direction (up, down, left, right), and is defined as the upper left position pipeline A and the lower right position pipeline B according to the flow direction of the pipeline, and the pipeline weight is set according to the empirical value, and the weight of the left and right pipelines is greater than the weight of the upper and lower pipelines;
[0104] PipeConnecterA represents other pipeline nodes connected to pipeline node A;
[0105] PipeConnecterB represents other pipeline nodes connected to the B pipeline node;
[0106] IsSource indicates the starting pipe segment, that is, there is no pipeline connected to it before the starting pipeline;
[0107] ... represents an intermediate pipe section, which is a transition pipe section arranged between the starting pipe section and the terminal pipe section;
[0108] IsTerminal indicates the terminal pipe segment, that is, there is no pipeline connected to the terminal pipeline;
[0109] MaxFlow indicates the maximum flow limit capacity of the pipeline, and the default maximum flow is infinite;
[0110] And define the starting pipe segment IsSource as the source node, and the terminal pipe segment IsTerminal as the terminal node;
[0111] Define the intermediate pipe segments as hierarchical nodes, and define the intermediate pipe segments in sequence according to the pipeline flow direction from the source node to the end node
[0112] Among them, E represents the current node; D represents the previous node of E; F represents the next node of E; Indicates that node G and node H are peer nodes. Represents the description form of all sibling nodes of node H.
[0113] In order to fully and accurately describe the composition and structure of the pipe network system, this embodiment defines the relevant data model based on the construction rule model, aiming to provide a clear structured specification for the data in the Excel database, ensuring that various types of pipe network attribute information can be expressed intuitively and systematically, and seamlessly connected with the program logic. The Excel database of this embodiment is used as a database for the program to store pipe network attribute information, as shown in Table 1;
[0114] Table 1. Excel database storing pipe network attribute information
[0115]
[0116] Taking the pipeline with PipelD of 2 as an example, the flow direction of the pipeline is BA, that is, it flows from the lower right direction to the upper left direction; the A node of the pipeline is connected to the B node of pipeline No. 1 and the A nodes of pipelines No. 46, No. 47, and No. 49, and the B node of the pipeline is connected to the A nodes of pipelines No. 3 and No. 54; the pipeline is neither the starting segment nor the terminal segment; the maximum flow limit of the pipeline is infinity, that is, infinity. Based on the Excel database of this embodiment, programmers can easily adjust the topological structure, flow direction and other key attributes of the ship pipeline network by modifying the data in the Excel table. This method not only improves the design efficiency, but also reduces the errors caused by the complex operation of manually entering the code of pipeline network attribute information, ensuring the accuracy and flexibility of pipeline network design;
[0117] S4: Integrate the data in the Excel database into the human-computer interactive graphical interface to obtain an optimized interactive graphical interface for visual lightweight modeling;
[0118] In a specific embodiment, the data in the Excel database is integrated into the human-computer interactive graphical interface as described in S4, specifically:
[0119] Call the NutGet installation library of Visual Studio to install the EPPlus plug-in;
[0120] And convert the data in the Excel database into Data Table code through the EPPlus plug-in;
[0121] Call the Data Grid control to bind the Data Table code to the human-computer interaction graphical interface to achieve the integration of the Excel database and the human-computer interaction graphical interface.
[0122] After completing the construction of the Excel database, this embodiment calls the EPPlus plug-in provided by Visual Studio to integrate the Excel database with the graphical interface. The programmer only needs to set the path of the specified Excel database, and the system can automatically read the data resources in Excel, such as the geometric information of the pipeline connection, node attributes and other data, and then perform subsequent calculations, monitoring and other operations. This method not only simplifies the data import and update process and avoids tedious manual coding, but also makes full use of existing data resources to convert drawing information into clear and standardized data. After the integration is completed, the program will automatically read all the data in Excel, improving development efficiency and program reusability;
[0123] Among them, in this embodiment, after the graphical interface is built and the Excel database is successfully integrated, the program for optimizing the interactive graphical interface can run smoothly. The user can interact with the ship pipe network model through the intuitive human-computer interactive graphical interface and perform various operations to explore, analyze and manage the pipe network. The specific operations include:
[0124] (1) Zoom and pan: Users can zoom in or out of the optimized vector map view to view local details or the overall layout of the pipeline network, and adjust the view position through the pan function to facilitate more efficient browsing and navigation of the pipeline network structure. The interface base map is imported in the XML-based vector graphic SVG format, which can achieve lossless scaling of the image while maintaining clarity;
[0125] (2) Click event processing: The program supports click event capture. When the user clicks a node (such as a valve or pump), the system will respond and perform corresponding operations, including:
[0126] (21) Status color change: By clicking on a valve or pump node, the program can change its display color to visually indicate the current operating status. For example, after clicking, the color changes to green to indicate that the valve is open, or changes to gray to indicate that it is closed, helping users quickly understand the status of the device;
[0127] (22) Ship Pipeline Flow Judgment: After detecting the change in the status of a valve or pump, the program can determine in real time whether the pipeline is allowed to flow based on the pipeline network topology, connection relationship and current valve status. Through this function, users can quickly understand the impact of the operation on the operation of the entire pipeline network, which is convenient for supporting decision-making analysis and optimization management;
[0128] S5: Based on the optimized interactive graphical interface and the constructed ship pipe network flow event mechanism, the decision-making management of the ship pipe network is realized, and then the programming design of the ship pipe network is realized;
[0129] In a specific embodiment, the decision management of the ship pipe network is realized based on the optimized interactive graphical interface described in S5 and according to the constructed ship pipe network circulation event mechanism, such as Figure 3 As shown, the specific steps include:
[0130] S51: extracting a number of pipeline sections from the example sample diagram according to the pipeline system principle diagram;
[0131] Each of the pipeline sections is provided with a number of pipeline controls for pipeline layout;
[0132] S52: constructing a ship network circulation event mechanism based on the extracted pipeline segments;
[0133] The ship pipe network circulation event mechanism is specifically as follows:
[0134] Set click event instructions for pipeline controls by optimizing the interactive graphical interface;
[0135] Based on the click event command, the pipeline control of the corresponding pipeline layout is opened, and the ship pipeline network is confirmed to meet the flow conditions by traversal and addition;
[0136] The specific rule for confirming whether the ship pipe network meets the circulation conditions by traversing and adding in this embodiment is:
[0137] S01: Obtain the number of pipe sections in the ship's control system and the total number of controls installed on each corresponding pipe section;
[0138] For example, if there are five pipe sections in the ship's control system, namely N1 (10, 11, 12), N2 (20, 21), N3 (30, 31, 32, 33), N4 (40), N5 (50, 51); N1, N2, N3, N4, N5 are pipe section numbers; 10, 11, 12; 20, 21; 30, 31, 32, 33; 40; 50, 51 represent the control numbers on the corresponding pipe sections;
[0139] S02: traverse the current number of enabled controls on each pipe segment through an optimization algorithm;
[0140] And the optimization algorithm includes the existing depth-first search algorithm or breadth-first search algorithm, etc.;
[0141] For example: confirm and obtain N1 (010, 11, 012), N2 (20, 021), N3 (030, 031, 032, 033), N4 (40), N5 (050, 051); 010, 012; 021; 030, 031, 032, 033; 050, 051 indicate the number of enabled controls;
[0142] S03: judging the current number of enabled controls and the total number of controls set on the pipe segment to confirm whether the two numbers are the same, and confirming the pipe segment corresponding to the same number as the flow pipe segment;
[0143] For example: based on S01 to S02, for pipe segment N1: the total number of controls is 3, the number of controls turned on is 2, then it is confirmed that the pipe segment does not flow; for pipe segment N2: the total number of controls is 2, the number of controls turned on is 1, then it is confirmed that the pipe segment does not flow; for pipe segment N3: the total number of controls is 4, the number of controls turned on is 4, then it is confirmed that the pipe segment flows; for pipe segment N4: the total number of controls is 1, the number of controls turned on is 0, then it is confirmed that the pipe segment does not flow; for pipe segment N5: the total number of controls is 2, the number of controls turned on is 2, then it is confirmed that the pipe segment flows;
[0144] The steps to confirm whether the ship pipeline network meets the circulation conditions include:
[0145] That is, first confirm whether the pipe section flow conditions are met, and if so, continue to confirm whether the pipeline flow conditions are met. The specific steps include:
[0146] Confirm whether the pipe flow condition is met, that is, traverse and add up to obtain the current number of controls turned on on any pipe segment, and determine whether the current number of controls turned on is the same as the total number of controls set on the pipe segment;
[0147] If they are confirmed to be the same, it is determined that the pipe section is allowed to flow;
[0148] Otherwise, it is determined that the pipe section is not allowed to flow;
[0149] Confirm whether the pipeline flow condition is met, that is, obtain all the intermediate pipe sections from the starting pipe section to the ending pipe section, and confirm whether each intermediate pipe section is allowed to flow based on the pipe section flow condition;
[0150] If each intermediate pipe section is confirmed to allow flow, then the entire pipeline from the starting pipe section to the ending pipe section is determined to allow flow;
[0151] Otherwise, it is determined that the entire pipeline is not allowed to flow;
[0152] After confirming that the ship pipeline network meets the flow conditions, continue to implement the pipeline network flow allocation strategy;
[0153] The pipeline network flow distribution strategy specifically includes the following steps:
[0154] S53: confirm whether the inlet of any pump control in the entire pipeline that allows circulation is the outlet of another pump control;
[0155] If so, set the flow rate of each pump control in the entire pipeline to the rated flow rate of the pump;
[0156] And continue to execute step S54;
[0157] Otherwise, according to the predefined pump control power, and along the pipeline direction from the termination node to the source node, the flow is requested from the upper node of the pipeline where each pump control is located;
[0158] S54: Optimizing the maximum flow limit of the pipe segment node based on the flow limit adjustment rule;
[0159] Based on the maximum flow limit of the optimized pipe segment node, the flow is distributed to the lower nodes in turn according to the flow requested by the nodes at all levels in the direction from the source node to the terminal node;
[0160] The traffic restriction adjustment rule is specifically:
[0161] Confirm whether the flow rate of any pipe section in the entire pipeline is greater than the maximum allowable flow rate of the corresponding pipe section;
[0162] If not, continue to execute step S55;
[0163] If so, confirm whether there is a node at the same level for the pipe segment;
[0164] If it is confirmed to exist, the part of the flow that exceeds the maximum allowable flow of the pipe section will be transferred to the nodes at the same level as the pipe section, and when all nodes at the same level confirm that the flow limit has been reached, the maximum flow limit of the corresponding upper node will be adjusted by adjusting the pump control power;
[0165] If it is confirmed that it does not exist, the maximum flow limit of the corresponding upper node is adjusted directly by adjusting the pump control power;
[0166] To obtain the transfer and distribution of the flow in the ship pipe network between each node level, thereby realizing the programming design of the ship pipe network, and continue to execute step S55;
[0167] S55: The final flow distribution in the ship's pipe network is displayed on the flow label to achieve visual monitoring of the ship's pipe network status.
[0168] After the Excel database and the human-computer interaction graphical interface are integrated, this embodiment can realize efficient data import and comprehensive realization of interface functions, and the interface functions of the human-computer interaction graphical interface include click events that allow users to control the switch of pump stations and valves by clicking on them. After the user triggers the click event, the preset ship pipeline network program will determine the ship pipeline network. First, the ship pipeline network program will determine whether the pipe section is allowed to flow: that is, it determines whether the pipe section is allowed to flow by traversing and adding, that is, traversing each pipe section in the ship pipeline network, and judging whether the pipe section meets the flow conditions according to the number of open controls on the pipe section; when the number of open controls on the pipe section is consistent with the number of all controls, the pipe section will be judged as allowing flow. Subsequently, when the entire pipeline from the starting pipe section to the terminal pipe section is determined to allow flow, the entire pipeline will also be determined to allow flow, and after the pipeline is determined to allow flow, the flow calculation and allocation program will be started: First, the program will request flow from the upper node of the pipeline where each pump is located according to the predefined pump power until the source node, so that the flow requested from bottom to top can ensure that the flow of all pipelines can meet the pump power; wherein, the calculation of flow is the existing known technical content, which will not be repeated here; then, according to the requested flow, the source node will allocate it to the lower node until the terminal pipe section; if the flow of the pipe section exceeds the maximum allowable flow of the pipe section, the program will reallocate the flow to the maximum allowable flow, and the excess will be transferred to other nodes at the same level as the node; when all nodes at the same level have reached the flow limit, the system will automatically adjust the maximum flow limit of the upper node, and continue to transfer it to the upper node until the starting pipeline. In this way, the flow in the pipeline network will be transferred and allocated between node levels. Finally, the calculated flow rate of the pipe section will be displayed on the corresponding flow label according to the programmer's requirements, ensuring that users can intuitively view the status of the pipeline network and quickly understand the impact of corresponding operations on the operation of the entire pipeline network.
[0169] The application examples of the method of this embodiment are as follows:
[0170] Taking a ship sewage system as an example, according to the pipe system schematic diagram, a pipe network graphical interface is built based on the WPF framework and C# programming technology. First, an accurate base map needs to be made to draw the overall structure of the pipe network, including the connection relationship between pipes and the location of chambers. Then, the required controls are dragged from the control library and added to the base map, such as various valves, pump stations, labels and other equipment and elements, to improve the interface layout. Finally, the completed human-computer interaction graphical interface is built. Figure 4 shown.
[0171] Create an Excel database table outside the interface as an Excel database for storing pipe network system attribute information, and set the access path in the program to achieve seamless integration between the system and the Excel database, and complete data input through defined attributes. The specific example is shown in Table 2;
[0172] Table 2. Excel database based on ship sewage system
[0173]
[0174] Users can interact with the system by clicking on controls such as pumps and valves: when a user triggers a click event, the corresponding control will change color to provide intuitive feedback on the operation results. Subsequently, the program will automatically determine the flow status of the pipeline and start the pressure and flow calculation process after determining that the pipeline allows flow. During the calculation process, the program will determine whether the maximum displacement of the pump on the branch affects the pipeline flow, and allocate flow to each branch in turn based on the judgment result. Finally, the calculation results will be displayed in real time on the corresponding label, which is convenient for users to view and analyze intuitively. Figure 5 This is the case where there is no maximum pump displacement in the pipe network that affects the pipe flow. Figure 6 This is the case where the maximum displacement of the pump in the pipe network affects the pipe flow. Figures 5 and 6 It can be seen that the labels at the inlet and outlet of each control clearly display the corresponding pressure and flow values, allowing users to intuitively observe the real-time impact of their operations on the entire pipe network system.
[0175] In summary, the beneficial effects of the method of this embodiment are as follows:
[0176] (1) By integrating the Excel database with the human-computer interactive graphical interface, the design and calculation of the ship's pipe network system are more intuitive and efficient. Designers can centrally modify various parameters of the pipe network in the Excel spreadsheet, such as pipe flow direction, maximum flow, etc. The system will automatically update the graphical interface in real time to ensure the accuracy and consistency of the design, greatly improving the flexibility of the ship's pipe network programming design, enabling designers to quickly adjust and optimize parameters, and improving the efficiency of the ship's pipe network programming design.
[0177] (2) Compared with the traditional pipe network design method, the method of the present invention significantly reduces the manual operations and complex calculations in programming, and reduces the occurrence of human errors; the traditional method relies on complex text codes and matrix calculations, which easily leads to lengthy and difficult to maintain codes, and is prone to over-limit errors when dealing with complex pipe network systems; after adopting the method of the present invention, designers can set parameters through simple and easy-to-understand Excel tables, and automatically complete subsequent operations and provide feedback through preset programs, effectively reducing the risk of errors, thereby improving the accuracy and reliability of ship pipe network design.
[0178] (3) The method of the present invention simplifies the design process and lowers the professional threshold: designers do not need to have an in-depth understanding of complex programming languages or matrix operations. They can complete the design and optimization of the pipeline network through a graphical interface and Excel spreadsheet operations. This not only reduces the dependence on professionals, but also enables even non-professionals to participate in the modeling, calculation and optimization of the pipeline network system. It also promotes the popularization and efficient execution of ship design, analysis and optimization work.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ship pipe network programming method based on visual lightweight modeling technology, characterized in that: The specific steps include: S1: Obtain the piping system schematic diagram of the ship's pipe network; The pipeline system schematic diagram includes at least pipeline location information / flow information, connection information between pipelines, and control information of pipeline layout; S2: Construct a human-computer interactive graphical interface for the ship’s pipeline network based on the pipeline system schematic diagram; S3: constructing an Excel database for storing and managing ship pipe network attribute information data based on the implementation sample diagram; the implementation sample diagram is a sample schematic diagram containing attribute information data obtained based on the pipe system schematic diagram; The attribute information data at least includes the pipe network topology, pipe type, pipe flow direction, starting pipe, terminal pipe and maximum flow limit of the pipe; S4: Integrate the data in the Excel database into the human-computer interactive graphical interface to obtain an optimized interactive graphical interface for visual lightweight modeling; S5: Based on the optimized interactive graphical interface and the constructed ship pipeline network flow event mechanism, the decision-making management of the ship pipeline network is realized, and then the programming design of the ship pipeline network is realized.
2. According to claim 1, a ship pipe network programming method based on visual lightweight modeling technology is characterized in that: The S2 specifically includes the following steps: S21: Draw the pipeline distribution in the pipeline system schematic diagram based on SVG technology, and obtain a scalable ship vector base map based on XMAL format; S22: Import scalable ship vector basemap in SVG format into a pre-built WPF framework; Set the line segments or curves in the scalable ship vector base map as pipelines to confirm the distribution and direction of the pipelines; S23: calling the WPF control library, adding the required pipeline controls to the scalable ship vector base map according to the pipeline system schematic diagram, and obtaining the optimized vector map; The pipeline control comprises at least a pipeline valve, a pipeline pump and a flow label; And calling the Canvas tool to set position nodes for key position points in the optimized vector diagram, and defining control nodes corresponding to pipeline controls; The key location point is the intersection or bifurcation point of multiple pipelines; S24: calling the Text Block tool to mark the node status information of the position node and the control node, and setting the attribute information data of the pipeline to obtain a human-computer interactive graphical interface of the ship pipeline network; The node status information includes the control type, control pressure, control flow, and control water level displayed in symbols / colors / values.
3. According to claim 2, a ship pipe network programming method based on visual lightweight modeling technology is characterized in that: In S4, the data in the Excel database are integrated into the human-computer interactive graphical interface, specifically: Call the NutGet installation library of Visual Studio to install the EPPlus plug-in; And convert the data in the Excel database into Data Table code through the EPPlus plug-in; Call the Data Grid control to bind the Data Table code to the human-computer interaction graphical interface to achieve the integration of the Excel database and the human-computer interaction graphical interface.
4. According to claim 1, a ship pipe network programming method based on visual lightweight modeling technology is characterized in that: The Excel database in S3 includes a rule model, whose expression is {PipelD,PipeDirection,PipeConnecterA,PipeConnecterB,IsSource,…,IsTerminal,MaxFlow}, where PipelD represents a unique identifier used to distinguish different pipes; PipeDirection indicates the flow direction of the pipeline, and according to the pipeline system schematic diagram, the liquid inflow pipeline of the ship pipeline network is defined as the A pipeline node, and the liquid outflow pipeline is defined as the B pipeline node; PipeConnecterA represents other pipeline nodes connected to pipeline node A; PipeConnecterB represents other pipeline nodes connected to the B pipeline node; IsSource indicates the starting pipe segment; ... represents the middle pipe section; IsTerminal indicates the terminal pipe segment; MaxFlow represents the maximum flow limit capacity of the pipeline; And define the starting pipe segment IsSource as the source node, and the terminal pipe segment IsTerminal as the terminal node; Define the intermediate pipe segments as hierarchical nodes, and define the intermediate pipe segments in sequence according to the pipeline flow direction from the source node to the end node Among them, E represents the current node; D represents the previous node of E; F represents the next node of E; Indicates that node G and node H are peer nodes. Represents the description form of all sibling nodes of node H.
5. According to claim 3, a ship pipe network programming method based on visual lightweight modeling technology is characterized in that: S5 describes that based on the optimized interactive graphical interface, the decision-making management of the ship pipe network is realized according to the constructed ship pipe network circulation event mechanism, which specifically includes the following steps: S51: extracting a number of pipeline sections from the example sample diagram according to the pipeline system principle diagram; Each of the pipeline sections is provided with a number of pipeline controls for pipeline layout; S52: constructing a ship network circulation event mechanism based on the extracted pipeline segments; The ship pipe network circulation event mechanism is specifically as follows: Set click event instructions for pipeline controls by optimizing the interactive graphical interface; Based on the click event command, the pipeline control of the corresponding pipeline layout is opened, and the ship pipeline network is confirmed to meet the flow conditions by traversal and addition; The steps to confirm whether the ship pipeline network meets the circulation conditions include: That is, first confirm whether the pipe section flow conditions are met, and if so, continue to confirm whether the pipeline flow conditions are met. The specific steps include: Confirm whether the pipe flow condition is met, that is, traverse and add up to obtain the current number of controls turned on on any pipe segment, and determine whether the current number of controls turned on is the same as the total number of controls set on the pipe segment; If they are confirmed to be the same, it is determined that the pipe section is allowed to flow; Otherwise, it is determined that the pipe section is not allowed to flow; Confirm whether the pipeline flow condition is met, that is, obtain all the intermediate pipe sections from the starting pipe section to the ending pipe section, and confirm whether each intermediate pipe section is allowed to flow based on the pipe section flow condition; If each intermediate pipe section is confirmed to allow flow, then the entire pipeline from the starting pipe section to the ending pipe section is determined to allow flow; Otherwise, it is determined that the entire pipeline is not allowed to flow; After confirming that the ship pipeline network meets the flow conditions, continue to implement the pipeline network flow allocation strategy; The pipeline network flow distribution strategy specifically includes the following steps: S53: confirm whether the inlet of any pump control in the entire pipeline that allows circulation is the outlet of another pump control; If so, set the flow rate of each pump control in the entire pipeline to the rated flow rate of the pump; And continue to execute step S54; Otherwise, according to the predefined pump control power, and along the pipeline direction from the termination node to the source node, the flow is requested from the upper node of the pipeline where each pump control is located; S54: Optimizing the maximum flow limit of the pipe segment node based on the flow limit adjustment rule; Based on the maximum flow limit of the optimized pipe segment node, the flow is distributed to the lower nodes in turn according to the flow requested by the nodes at all levels in the direction from the source node to the terminal node; The traffic restriction adjustment rule is specifically: Confirm whether the flow rate of any pipe section in the entire pipeline is greater than the maximum allowable flow rate of the corresponding pipe section; If not, continue to execute step S55; If so, confirm whether there is a node at the same level for the pipe segment; If it is confirmed to exist, the part of the flow that exceeds the maximum allowable flow of the pipe section will be transferred to the nodes at the same level as the pipe section, and when all nodes at the same level confirm that the flow limit has been reached, the maximum flow limit of the corresponding upper node will be adjusted by adjusting the pump control power; If it is confirmed that it does not exist, the maximum flow limit of the corresponding upper node is adjusted directly by adjusting the pump control power; The flow in the ship pipe network is obtained and transferred and distributed between each node level, thereby realizing the programming design scheme of the ship pipe network, and continuing to execute step S55; S55: The final flow distribution in the ship's pipe network is displayed on the flow label to achieve visual monitoring of the ship's pipe network status.
Citation Information
Cited By
Pipeline structure identification method, pipeline structure identification device and semiconductor equipment
CN121761250A