Relay room screen position arrangement method and device based on greedy algorithm and storage medium
By using a greedy algorithm-based method for relay room panel layout, the layout of the panels and the marking of physical dimensions are automated, solving the problems of low efficiency, poor balance and repetitive work in the existing technology, and realizing the generation of efficient and standardized panel layout drawings.
Patent Information
- Application Number
- CN202511636056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies for substation relay room panel layout suffer from low efficiency, difficulty in ensuring balance, the need to redraw drawings during adjustments, reliance on manual input for parameter acquisition which is prone to errors, and a lack of automated methods for processing panel layout and physical dimension annotation.
A greedy algorithm-based method for relay room panel layout is adopted. By acquiring panel image data, extracting parameters using text recognition algorithms, and combining them with preset panel layout parameters, the greedy algorithm is used to optimize the panel layout and perform physical dimension annotation, thereby achieving automation and balance in panel layout.
It improved the design efficiency of screen layout, ensured the uniformity of screen cabinet row width, met the compliance requirements for the number of rows, row width and spacing, enhanced the standardization and professionalism of drawings, and reduced repetitive work.
Smart Images

Figure CN121479988A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of substation planning, and particularly relates to a relay room screen position arrangement method based on a greedy algorithm, a device and a storage medium. BACKGROUND
[0002] With the continuous development of the power system, the relay room of the substation as an important part of the power system, the rationality of the screen cabinet arrangement directly affects the operation safety and maintenance efficiency of the substation. The relay room screen position arrangement is a key link in the design of the secondary system of the substation, which involves the comprehensive consideration of many factors such as the type, quantity, size and arrangement mode of the screen cabinet.
[0003] At present, the relay room screen position arrangement of the substation mainly relies on the manual drawing by the designers according to the experience, and this method has many problems. The traditional screen position arrangement method usually requires the designer to first sort out the number and specifications (size) of the screen cabinets required by the computer monitoring system, the metering meter, the system relay protection and automatic device, the component protection and fault recording, the AC / DC integrated power supply system, the synchronous phasor measurement system, the clock synchronization time system, the power quality online monitoring system, and the auxiliary equipment online monitoring system according to the main equipment material list in the preliminary design report, manually calculate the screen cabinet spacing, wall spacing and other parameters, and draw the screen cabinet position one by one in the CAD drawing software. The whole process is time-consuming and low in efficiency, and the screen cabinet spacing, the screen cabinet to wall spacing and the label must be considered. In addition, once the arrangement drawing needs to be adjusted, it needs to be redrawn, which exists a lot of repeated and inefficient labor. CN116797685A discloses a substation screen position arrangement drawing automatic drawing method and system, which generates an initial screen position arrangement drawing by importing the basic information of the on-site screen position, and finally generates a complete screen position arrangement drawing by recognizing the screen cabinet screen surface information through shooting. However, this method is mainly aimed at the arrangement drawing of the existing screen cabinet, and lacks consideration for the screen position arrangement planning of the newly built substation.
[0004] In terms of screen cabinet arrangement optimization, CN120316983A proposes a device inter-screen cabinet automatic arrangement method based on grouping, which establishes a screen cabinet layout mathematical model, calculates the feasible region of the screen cabinet center coordinates, and randomly initializes the screen cabinet center coordinates within the feasible region, and finally generates the arrangement result based on the greedy algorithm. Although this method improves the efficiency and accuracy of the screen cabinet arrangement, there is still room for optimization in dealing with the balanced arrangement of a large number of different types of screen cabinets.
[0005] For the relay room design method, CN111046470B discloses a relay room design method, which determines the screen cabinet arrangement mode and the minimum length of the relay room according to the total number of screen cabinets and the limited width of the relay room, thereby simplifying the design process of optimizing the room space. However, this method mainly focuses on the determination of the overall size of the relay room, and does not consider the specific arrangement of the screen cabinet comprehensively.
[0006] In terms of intelligent substation secondary system screen cabinet arrangement, CN119962240A proposes an intelligent substation secondary system screen cabinet rapid arrangement method based on system tree structure, which realizes the rapid arrangement of substation secondary equipment room screen position by establishing a substation system tree structure. This method has certain advantages in improving design efficiency, but there is still room for improvement in the balance and standardization of screen cabinet arrangement.
[0007] In addition, CN115795576A discloses a screen cabinet automatic arrangement method based on Revit, which realizes automatic arrangement of screen cabinets and automatic generation of screen numbers by creating parameterized family files and external commands. However, this method relies on a specific software platform and has limited versatility, and lacks flexibility when dealing with complex arrangement requirements.
[0008] In summary, the existing technology has the following problems in the arrangement of relay room screen positions in substations: first, the screen position arrangement drawing efficiency is low, and various spacing parameters need to be manually considered by designers; second, the balance of screen cabinet arrangement is difficult to guarantee, especially when dealing with different types and sizes of screen cabinets; third, when the arrangement scheme needs to be adjusted, the entire arrangement drawing often needs to be redrawn, which is time-consuming; fourth, the existing methods rely on manual input for screen cabinet parameter acquisition, which is prone to errors; fifth, there is a lack of a method that can automatically handle screen cabinet arrangement and physical size labeling. Therefore, it is urgent to propose an efficient and accurate relay room screen position arrangement method to improve the design efficiency and standardization of drawings. SUMMARY
[0009] To solve the above technical problems, the present application provides a relay room screen position arrangement method based on a greedy algorithm, characterized in that it comprises the following steps: S1. Obtain relay room screen cabinet image data and construct a screen cabinet image data set; S2. According to the screen cabinet image data set, screen cabinet parameter data is extracted through a text recognition algorithm to obtain a screen cabinet parameter data set; S3. According to the screen cabinet parameter data set, based on the pre-set relay room screen position arrangement parameters, the screen position arrangement is carried out through the greedy algorithm to obtain the relay room screen position arrangement drawing, and the physical size labeling of the obtained relay room screen position arrangement drawing is carried out to obtain the final relay room screen position arrangement result.
[0010] Furthermore, the cabinet parameter dataset includes cabinet type data, cabinet number data, cabinet quantity data, cabinet height data, and cabinet width data.
[0011] Furthermore, the pre-set relay room panel layout parameters include the distance parameters between the front and back of the panel, the distance parameters between the front and back of the panel and the wall, the distance parameters between the back of the panel and the wall, the distance parameters between the side of the panel and the wall, the number of rows of panel, and the width parameters of the cable trench in the relay room.
[0012] Furthermore, step S3 includes the following steps: S301. Based on the cabinet parameter dataset, calculate the sum of the width data of each cabinet to obtain the total cabinet width data; S302. Based on a greedy algorithm, a screen cabinet width balancing model is constructed with the goal of minimizing the difference in row width between each screen cabinet; S303. Based on the cabinet width balancing model and the total cabinet width data, sort the cabinets in descending order of width, and determine whether the current row width meets the following conditions: ; in, This represents the line width of the i-th row. Let the width of the j-th screen cabinet be _____. This indicates the target row width. If the condition is met, a new row is created; otherwise, the current row is sorted in descending order of cabinet width until all cabinets are traversed to obtain the relay room cabinet row data. S304. Based on the relay room panel row data, and using a dynamic feedback algorithm, determine whether the current total number of rows is greater than the target number of rows. If so, calculate the row width data for each row, merge the row with the smallest row width with its adjacent row, and update the row width of each row until the current total number of rows equals the target number of rows, thus obtaining the updated relay room panel row data. S305. Based on the updated relay room panel layout data, generate a panel cabinet type diagram according to the row position, add panel cabinet numbers, generate cable trenches based on cable trench width parameters, and label the size parameters to obtain the final relay room panel layout diagram.
[0013] Furthermore, the greedy algorithm includes a three-level constraint decision model, which includes row count constraint, row width constraint, and row spacing compliance constraint. The row count constraint is checked through hard constraints; if the row count does not meet the target row count requirement, the current relay room cabinet layout is stopped. The row width constraint sets a row width floating threshold based on the relay room cabinet layout parameters. If the current row width is greater than / less than the target row width, but less than / greater than the floating threshold, cross-row adjustment is allowed. The row spacing compliance constraint performs compliance verification in real time based on the relay room cabinet layout parameters.
[0014] Furthermore, the dynamic feedback algorithm includes: S304-1. Based on the target cabinet width and the target number of rows, construct a correlation function between the target cabinet width and the target number of rows, and calculate the average cabinet width; S304-2. Calculate the width deviation of each row in real time based on the data of the relay room panel positions and the average panel width; S304-3. Based on the width deviation and the target number of rows, construct a dual-objective optimization function. Prioritize the optimization of row width with row number compliance. After merging the row with the smallest row width with its adjacent rows, update the row width of each row until the current total number of rows equals the target number of rows, and obtain the updated relay room panel row data.
[0015] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the relay room panel arrangement method based on a greedy algorithm described above.
[0016] A storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for arranging relay room screens based on a greedy algorithm.
[0017] This invention automates the layout of relay room cabinets by employing a greedy algorithm-based method, significantly improving design efficiency and avoiding repetitive work when adjusting cabinet layouts. Simultaneously, the greedy algorithm ensures balanced width across rows of cabinets, meeting requirements for row count constraints, balanced row width, and compliant spacing, thus enhancing the standardization and professionalism of drawings and making the relay room cabinet layout more rational and efficient. Attached Figure Description
[0018] Figure 1 This is a flowchart of a relay room screen arrangement method based on a greedy algorithm according to an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of the relay room panel layout parameter settings according to an embodiment of the present invention.
[0020] Figure 3 This is a schematic diagram of the equipment material table according to an embodiment of the present invention.
[0021] Figure 4 This is a schematic diagram of the relay room panel layout according to an embodiment of the present invention.
[0022] Figure 5 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present invention.
[0023] Figure 6 This is a schematic diagram of the storage medium according to an embodiment of the present invention.
[0024] In the diagram, 200 is the terminal device, 210 is the memory, 211 is the RAM, 212 is the cache memory, 213 is the ROM, 214 is the program / utility, 215 is the program module, 220 is the processor, 230 is the bus, 240 is the external device, 250 is the I / O interface, 260 is the network adapter, and 300 is the program product. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention and to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are for illustrative purposes only and are not intended to further limit the present invention.
[0026] Example 1: like Figure 1 As shown, this embodiment of the invention provides a method for arranging relay room screen positions based on a greedy algorithm, including the following steps: S1. Obtain image data of the relay room cabinet and construct a cabinet image dataset; Specifically, high-resolution images of various cabinets in the relay room are captured using digital cameras or professional photography equipment, including front, side, and top views of the cabinets. These images are ensured to be clear and legible, clearly displaying the cabinet's appearance, dimensions, and identification information. The acquired images are then categorized and organized according to cabinet type, creating an image dataset containing different models and specifications of cabinets. This dataset provides fundamental data support for subsequent parameter extraction and layout planning.
[0027] S2. Based on the cabinet image dataset, extract the cabinet parameter data using a text recognition algorithm to obtain the cabinet parameter dataset; Specifically, based on the cabinet image dataset, text recognition algorithms are used to extract cabinet parameter data, resulting in a cabinet parameter dataset. Specifically, optical character recognition (OCR) technology is employed to recognize text information in the cabinet images, extracting key parameters such as cabinet type, cabinet number, cabinet quantity, cabinet height, and cabinet width. Cabinet type data includes different functional types such as protection cabinets, monitoring and control cabinets, and operation cabinets; cabinet number data is a unique identifier for each cabinet; cabinet quantity data represents the total number of cabinets of each type; and cabinet height and width data are the physical dimensions of the cabinets, measured in millimeters. The text recognition algorithm uses a deep learning model, employing preprocessing, feature extraction, text localization, and character recognition steps to convert the text information in the images into structured parameter data, forming a complete cabinet parameter dataset.
[0028] S3. Based on the cabinet parameter dataset and the pre-set relay room cabinet layout parameters, the cabinet positions are arranged using a greedy algorithm to obtain the relay room cabinet layout diagram. The physical dimensions of the obtained relay room cabinet layout diagram are then annotated to obtain the final relay room cabinet layout result.
[0029] Furthermore, the cabinet parameter dataset includes cabinet type data, cabinet number data, cabinet quantity data, cabinet height data, and cabinet width data.
[0030] Furthermore, the pre-set relay room panel layout parameters include the distance parameters between the front and back of the panel, the distance parameters between the front and back of the panel and the wall, the distance parameters between the back of the panel and the wall, the distance parameters between the side of the panel and the wall, the number of rows of panel, and the width parameters of the cable trench in the relay room.
[0031] Furthermore, step S3 includes the following steps: S301. Based on the cabinet parameter dataset, calculate the sum of the width data of each cabinet to obtain the total cabinet width data. Specifically, sum the width data of each cabinet in the cabinet parameter dataset to obtain the total width value of all cabinets that need to be arranged, providing the basic data for subsequent row division; S302. Based on a greedy algorithm, a screen cabinet width balancing model is constructed with the objective of minimizing the difference in row width between screen cabinets, as follows: ; ; Where N represents the number of rows in the target display cabinet. This represents the line width of the i-th row. X represents the target row width, and X represents the total width of the cabinet. This model aims to make the width of each row of cabinets as close as possible to the ideal average width, thereby achieving a balanced cabinet layout and facilitating subsequent cable laying and maintenance operations. Specifically, the greedy algorithm includes a three-level constraint decision model, which includes row count constraint, row width constraint, and row spacing compliance constraint. The row count constraint is checked through hard constraints; if the row count does not meet the target row count requirement, the current relay room cabinet layout is stopped. The row width constraint sets a row width floating threshold based on the relay room cabinet layout parameters. If the current row width is greater than / less than the target row width, but less than / greater than the floating threshold, cross-row adjustment is allowed. The row spacing compliance constraint performs compliance verification in real time based on the relay room cabinet layout parameters. S303. Based on the cabinet width balancing model and the total cabinet width data, sort the cabinets in descending order of width, and determine whether the current row width meets the following conditions: ; in, Given the width of the j-th cabinet, if the condition is met, a new row is created; otherwise, the current row is sorted in descending order of cabinet width until all cabinets are traversed, obtaining the relay room cabinet position row data. In practice, all cabinets are first sorted in descending order of width. Then, starting with the widest cabinet, they are placed into the current row sequentially. Before each placement, it is checked whether the width of the new row exceeds 103% of the target width. If it does, a new row is started; otherwise, placement continues in the current row. This method ensures that the width of each row of cabinets does not deviate excessively from the target width, while prioritizing wider cabinets to improve space utilization efficiency.
[0032] S304. Based on the relay room panel row data, determine if the current total number of rows is greater than the target number of rows. If so, calculate the width of each row, merge the row with the smallest width with its adjacent rows, and update the width of each row until the current total number of rows equals the target number of rows, obtaining the updated relay room panel row data. By iteratively merging rows, ensure that the final number of rows meets the preset target number requirement, while maintaining a relative balance in the width of each row. During the merging process, prioritize merging the row with the smallest width with its adjacent rows to reduce the impact on the overall balance after merging. Specifically, the dynamic feedback algorithm includes: S304-1. Based on the target cabinet width and the target number of rows, construct a correlation function between the target cabinet width and the target number of rows, and calculate the average cabinet width, expressed as: ; in, Indicates the average width of the screen cabinet. Indicates the correction factor; S304-2. Calculate the width deviation of each row in real time based on the data of the relay room panel positions and the average panel width; S304-3. Based on the width deviation and the target number of rows, construct a bi-objective optimization function, expressed as: ; Where n represents the current number of rows. Prioritize optimizing the row width based on the compliance of the row count. After merging the row with the smallest row width with its adjacent rows, update the row width of each row until the current total number of rows equals the target number of rows, and obtain the updated relay room panel row data.
[0033] S305. Based on the updated relay room panel layout data, generate panel type diagrams according to row positions and add panel numbers. Generate cable trenches based on cable trench width parameters and label their dimensions to obtain the final relay room panel layout diagram. Specifically, the generated layout diagram clearly indicates the location, type, and number of each panel, and draws cable trenches at the corresponding positions according to the preset cable trench width parameters. For each element in the layout diagram, including panel spacing, panel-to-wall spacing, and cable trench width, precise physical dimensions are labeled to ensure the layout diagram can be directly used to guide actual construction.
[0034] Specifically, firstly, through dual-end synchronous annotation, width annotations are generated simultaneously at the beginning and end of each row of cabinets. Offset calculations automatically avoid annotation overlaps. Height annotations use vertical linear annotations, dynamically positioned based on a baseline, meeting the GB / T 18135 electrical drawing standard. Then, dynamic parameters drive the annotations, making annotation color, text height, and other parameters globally adjustable. Annotation content is generated in real-time based on cabinet dimensions, adapting to different design institutes' drawing standards. Finally, through engineering semantic coding, the numbering parsing logic is combined with industry experience (e.g., "J" represents a relay protection cabinet, "P" represents a communication panel cabinet), ensuring the output solution is compliant.
[0035] like Figure 2 In a preferred embodiment, the distance parameter between the front and back of the cabinet is set to 1300 mm, the distance parameter between the front and back of the cabinet and the wall is set to 1700 mm, the distance parameter between the back and the wall of the cabinet is set to 1700 mm, the distance parameter between the side and the wall of the cabinet is set to 1700 mm, the number of rows of the cabinet is set to 6, and the width parameter of the cable trench in the relay room is set to 1000 mm, generating the following... Figure 3 The equipment and materials table shown is used to generate a diagram. Figure 4 The diagram shows the layout of the relay room cabinets. These parameters are set based on the standard design specifications for power system relay rooms, ensuring sufficient operating and maintenance space between cabinets while also taking into account cable laying requirements.
[0036] The above method enables a scientific and rational layout of relay room cabinets, meeting the power system's requirements for relay room space layout, improving space utilization, and ensuring the convenience and safety of operation and maintenance. Based on a greedy algorithm optimization strategy, this method achieves overall balance and aesthetics in cabinet layout while satisfying various layout constraints, thus ensuring the safe and stable operation of the power system.
[0037] Example 2
[0038] Furthermore, as a preferred embodiment of the present invention, a terminal device based on a greedy algorithm for relay room screen arrangement is proposed, such as... Figure 5As shown, the terminal device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
[0039] The memory 210 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 211 and / or cache memory 212, and may further include read-only memory (ROM) 213.
[0040] The memory 210 also stores a computer program that can be executed by the processor 220, causing the processor 220 to execute any of the greedy algorithm-based relay room panel arrangement methods described in the embodiments of this application. The specific implementation and technical effects are consistent with those described in the above embodiments, and some details will not be repeated here. The memory 210 may also include a program / utility 214 having a set (at least one) of program modules 215. Such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.
[0041] Accordingly, processor 220 can execute the aforementioned computer program, as well as executable program / utility 214.
[0042] Bus 230 can represent one or more of several types of bus structures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or a local bus using any of the various bus structures.
[0043] Terminal device 200 can also communicate with one or more external devices 240, such as keyboards, pointing devices, Bluetooth devices, etc., and with one or more devices capable of interacting with it, and / or with any device that enables it to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interface 250. Furthermore, terminal device 200 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 260. Network adapter 260 can communicate with other modules of terminal device 200 via bus 230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with terminal device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0044] Example 3
[0045] As a preferred embodiment of Example 1, a computer-readable storage medium is proposed for a relay room panel layout method based on a greedy algorithm. The computer-readable storage medium stores instructions that, when executed by a processor, implement any of the aforementioned relay room panel layout methods based on a greedy algorithm. The specific implementation method and the achieved technical effects are consistent with those described in the above embodiments, and some details will not be repeated.
[0046] like Figure 6 As shown, the program product 300 provided in this embodiment for implementing the above-described greedy algorithm-based relay room panel arrangement method can employ a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program product 300 can employ any combination of one or more readable media. A readable medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0047] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. Program code for performing operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to user computing devices via any type of network, including local area networks (LANs) or wide area networks (WANs), or they can be connected to external computing devices (e.g., via the Internet using an Internet service provider).
[0048] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for arranging relay room screens based on a greedy algorithm, characterized in that, Includes the following steps: S1. Obtain image data of the relay room cabinet and construct a cabinet image dataset; S2. Based on the cabinet image dataset, extract the cabinet parameter data using a text recognition algorithm to obtain the cabinet parameter dataset; S3. Based on the cabinet parameter dataset and the pre-set relay room cabinet layout parameters, the cabinet positions are arranged using a greedy algorithm to obtain the relay room cabinet layout diagram. The physical dimensions of the obtained relay room cabinet layout diagram are then annotated to obtain the final relay room cabinet layout result.
2. The relay room panel layout method based on a greedy algorithm according to claim 1, characterized in that, The cabinet parameter dataset includes cabinet type data, cabinet number data, cabinet quantity data, cabinet height data, and cabinet width data.
3. The relay room panel layout method based on a greedy algorithm according to claim 1, characterized in that, The pre-set relay room panel layout parameters include the distance parameters of the panel facing back to back, the distance parameters of the panel facing the wall, the distance parameters of the panel facing back to the wall, the distance parameters of the panel facing the wall from the side, the number of panels, and the width parameters of the cable trench in the relay room.
4. The relay room panel layout method based on a greedy algorithm according to claim 3, characterized in that, Step S3 includes the following steps: S301. Based on the cabinet parameter dataset, calculate the sum of the width data of each cabinet to obtain the total cabinet width data; S302. Based on a greedy algorithm, a screen cabinet width balancing model is constructed with the goal of minimizing the difference in row width between each screen cabinet; S303. Based on the cabinet width balancing model and the total cabinet width data, sort the cabinets in descending order of width, and determine whether the current row width meets the following conditions: ; in, This represents the line width of the i-th row. Let the width of the j-th screen cabinet be _____. This indicates the target row width. If the condition is met, a new row is created; otherwise, the current row is sorted in descending order of cabinet width until all cabinets are traversed to obtain the relay room cabinet row data. S304. Based on the relay room panel row data, and using a dynamic feedback algorithm, determine whether the current total number of rows is greater than the target number of rows. If so, calculate the row width data for each row, merge the row with the smallest row width with its adjacent row, and update the row width of each row until the current total number of rows equals the target number of rows, thus obtaining the updated relay room panel row data. S305. Based on the updated relay room panel layout data, generate a panel cabinet type diagram according to the row position, add panel cabinet numbers, generate cable trenches based on cable trench width parameters, and label the size parameters to obtain the final relay room panel layout diagram.
5. The relay room panel layout method based on a greedy algorithm according to claim 4, characterized in that, The greedy algorithm includes a three-level constraint decision model, which includes row count constraint, row width constraint, and row spacing compliance constraint. The row count constraint is checked through hard constraints; if the row count does not meet the target row count requirement, the current relay room cabinet layout is stopped. The row width constraint sets a row width floating threshold based on the relay room cabinet layout parameters. If the current row width is greater than / less than the target row width, but less than / greater than the floating threshold, cross-row adjustment is allowed. The row spacing compliance constraint performs compliance verification in real time based on the relay room cabinet layout parameters.
6. The relay room panel layout method based on a greedy algorithm according to claim 4, characterized in that, The dynamic feedback algorithm includes: S304-1. Based on the target cabinet width and the target number of rows, construct a correlation function between the target cabinet width and the target number of rows, and calculate the average cabinet width; S304-2. Calculate the width deviation of each row in real time based on the data of the relay room panel positions and the average panel width; S304-3. Based on the width deviation and the target number of rows, construct a dual-objective optimization function. Prioritize the optimization of row width with row number compliance. After merging the row with the smallest row width with its adjacent rows, update the row width of each row until the current total number of rows equals the target number of rows, and obtain the updated relay room panel row data.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the relay room screen arrangement method based on a greedy algorithm as described in any one of claims 1 to 6.
8. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the relay room screen arrangement method based on a greedy algorithm as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for automatically drawing transformer substation screen position arrangement diagram
CN116797685A