Lighting fixture circuit division methods, devices, equipment and storage media
By using minimum spanning tree and breadth-first traversal algorithms to automate the circuit division of lighting fixtures, the problem of low efficiency in circuit division in underground parking garage lighting plan diagrams is solved, achieving efficient and standardized circuit division and numbering, which is applicable to various underground parking garages.
Patent Information
- Application Number
- CN202210868655.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In the basement lighting plan, the division of lighting circuits is inefficient, costly, and cannot guarantee the optimization of the design. The reliance on manual operation leads to low drawing efficiency.
The minimum spanning tree algorithm and breadth-first traversal algorithm are used to automatically identify fire compartments, parking spaces and road centerlines, build an undirected graph, calculate the number of lamps, generate a minimum cost spanning tree, and perform loop partitioning through breadth-first traversal algorithm. Finally, the loop number is marked on the lamp.
It achieves automated lighting circuit division, improves drawing efficiency and accuracy, and produces neat and aesthetically pleasing connections that meet national standards and are suitable for various underground parking garage scenarios.
Smart Images

Figure CN115292781B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting fixture circuit division technology, and in particular to a method, apparatus, device, and storage medium for dividing lighting fixture circuits. Background Technology
[0002] In building electrical construction drawings, floor plans typically provide a macroscopic description of the building's geographical location and main structure, downplaying walls, doors, windows, beams, and columns, while highlighting electrical wiring. Other pipelines, such as plumbing and gas lines, are not shown on the electrical construction drawings.
[0003] Basement lighting drawings primarily represent the specific construction details of lighting in underground parking garages. They are generally drawn as single-line diagrams using standardized electrical symbols based on the architectural floor plan. The drawing of basement lighting mainly involves the arrangement of lights in underground parking spaces, the arrangement of lights on both sides of the driveways, the arrangement of light switches in various functional spaces, and the wiring between zones. Underground parking garages are typically large. After the light fixture locations are arranged, it is necessary to divide the circuits for all parking spaces and the lights on both sides of the driveways according to the different fire compartments and the different power ratings of the lights. Lights on the same circuit are then connected, with the final lead wires connected to the electrical distribution room in the same fire compartment.
[0004] A key challenge in creating underground parking garage lighting plans is dividing the circuits for the points located in the driveways and parking spaces according to national standards. Typically, these plans are drawn by professional electrical designers, and the circuit division must be done manually. This process involves a significant amount of work, including counting the number of light fixtures, calculating the number of circuits, and ensuring their proper allocation. This results in inefficient and costly plan creation, and it cannot guarantee that the final plan will be optimal.
[0005] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main objective of this invention is to provide a method, apparatus, device, and storage medium for dividing lighting fixture circuits, aiming to improve the efficiency and accuracy of lighting plan drawing output.
[0007] To achieve the above objectives, the present invention provides a method for dividing lighting circuits, the method comprising the following steps:
[0008] Identify fire compartments, parking spaces, and road centerlines in the garage architectural drawings, and record the number of each fire compartment, the number of lighting fixtures installed in each fire compartment, and the coordinates of each lighting fixture;
[0009] Based on the number of lighting fixtures arranged in each fire compartment, calculate the actual number of lighting fixtures assigned to each circuit;
[0010] Based on the coordinates of all the lamps in each fire compartment, an undirected graph is established, where the vertices of the undirected graph are the center points of all the lamps in the fire compartment, and the length of the edge is the Euclidean distance between two vertices.
[0011] The minimum spanning tree algorithm is used to connect all vertices in the undirected graph to obtain the minimum cost spanning tree corresponding to each fire compartment;
[0012] Based on the actual number of lamps divided into each loop, a breadth-first traversal algorithm is used to perform loop division on the minimum-cost spanning tree to obtain the loop division result;
[0013] Based on the circuit division results, the lamps are connected and the circuit numbers are marked on the lamps.
[0014] Optionally, calculating the actual number of lighting fixtures allocated to each circuit based on the number of lighting fixtures arranged in each fire compartment includes:
[0015] Divide the number of lighting fixtures in each fire compartment by the upper limit of the number of lighting fixtures on each circuit to obtain the number of circuits for the lighting fixtures;
[0016] Divide the number of lighting fixtures in each fire compartment by the number of circuits to obtain the actual number of lighting fixtures that need to be allocated on each circuit.
[0017] Optionally, the method further includes:
[0018] If the number of circuits for the lamp is not an integer, round up.
[0019] If the actual number of lamps to be divided on each circuit is not an integer, then the floor number is rounded down.
[0020] Optionally, the method further includes:
[0021] When constructing the undirected graph, if a connection between two of the lamps crosses the lane, a penalty value is set.
[0022] Optionally, the step of using the minimum spanning tree algorithm to connect all vertices in the undirected graph to obtain the minimum cost spanning tree corresponding to each fire compartment includes:
[0023] The minimum spanning tree algorithm is used to connect all vertices in the undirected graph to generate a weighted spanning tree;
[0024] The spanning tree with the smallest sum of edge weights in the weighted spanning tree is taken as the spanning tree with the minimum cost.
[0025] Optionally, based on the actual number of lamps divided into each loop, a breadth-first traversal algorithm is used to perform loop partitioning on the minimum-cost spanning tree to obtain the loop partitioning result, including:
[0026] Using a breadth-first traversal algorithm, find the point with ne ghbours = 1 in the minimum cost spanning tree, and iterate downwards to find connected points until the number found equals the actual number of lamps, then stop searching.
[0027] The found set of points is removed from the minimum cost spanning tree, and the search is repeated until the circuit partitioning result is obtained.
[0028] Optionally, based on the circuit division result, the lamps are connected and circuit numbers are marked on the lamps, including:
[0029] The actual number of the lamps assigned to each circuit is then connected within the group according to the circuit.
[0030] Select a light fixture from all circuit groups that is closest to the distribution room and label it with text.
[0031] Each circuit is sorted according to its distance from the power distribution room and then numbered.
[0032] The circuit number is labeled for each of the luminaires assigned to each circuit.
[0033] Furthermore, to achieve the above objectives, the present invention also proposes a lighting fixture circuit division device, the device comprising:
[0034] The identification and recording module is used to identify fire compartments, parking spaces and road centerlines in garage architectural drawings, and record the number of each fire compartment, the number of lights installed in each fire compartment and the coordinates of each light.
[0035] The quantity calculation module is used to calculate the actual number of the lamps assigned to each circuit based on the number of lamps arranged in each fire compartment.
[0036] An undirected graph construction module is used to construct an undirected graph based on the coordinates of all the lamps in each fire compartment. The vertices of the undirected graph are the center points of all the lamps in the fire compartment, and the length of the sides is the Euclidean distance between two vertices.
[0037] The spanning tree calculation module is used to connect all vertices in the undirected graph using the minimum spanning tree algorithm to obtain the minimum cost spanning tree corresponding to each of the fire compartments;
[0038] The loop partitioning module is used to partition the loops on the minimum-cost spanning tree based on the actual number of the lamps partitioned in each loop, using a breadth-first traversal algorithm, to obtain the loop partitioning result;
[0039] The labeling module is used to connect the lamps and label the circuit numbers on the lamps according to the circuit division results.
[0040] Furthermore, to achieve the above objectives, the present invention also proposes a lighting circuit division device, the device including a memory and a processor; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method described above.
[0041] In addition, to achieve the above objectives, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0042] The lighting circuit division method, device, equipment, and storage medium proposed in this invention effectively solve the problem of calculating and dividing the number of circuits in the process of drawing underground parking garage lighting plans by using the minimum spanning tree algorithm. It can completely replace the designer in calculation and automatically divide the circuits, perform internal wiring and circuit numbering, and obtain the global optimal result of lighting circuit division. The connection effect is neat and beautiful, meets the requirements of national standards, and has high generalization and is applicable to various underground parking garage scenarios. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the lighting circuit division device in the hardware operating environment involved in the embodiments of the present invention;
[0044] Figure 2 This is a flowchart of the lighting circuit division method in the first embodiment of the present invention;
[0045] Figure 3 This is an overall flowchart of the lighting circuit division method in the first embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the minimum spanning tree connection result of the lighting fixtures in a fire compartment in the first embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the loop partitioning result in the first embodiment of the present invention;
[0048] Figure 6 This is a schematic diagram of a test example in the first embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of the lighting circuit dividing device in the second embodiment of the present invention.
[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the lighting circuit division device structure in the hardware operating environment involved in the embodiments of the present invention.
[0053] like Figure 1 As shown, the lighting circuit partitioning device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0054] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the lighting circuit dividing device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0055] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a lighting circuit partitioning program.
[0056] exist Figure 1In the lighting circuit division device shown, the network interface 1004 is mainly used for data communication with the data multi-terminal synchronous processing device; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the lighting circuit division device of the present invention can be set in the lighting circuit division device, and the lighting circuit division device calls the lighting circuit division program stored in the memory 1005 through the processor 1001 and executes the lighting circuit division method provided in the embodiment of the present invention.
[0057] Based on the above hardware structure, an embodiment of the lighting fixture circuit division method of the present invention is proposed.
[0058] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the lighting fixture circuit division method of the present invention.
[0059] In the first embodiment, the lighting circuit division method includes the following steps:
[0060] S10. Identify the fire compartments, parking spaces, and road centerlines in the garage building drawings, and record the number of each fire compartment, the number of lighting fixtures arranged in each fire compartment, and the coordinates of each lighting fixture;
[0061] It should be noted that this embodiment can use image recognition methods to identify fire compartments, parking spaces, and road centerlines in garage architectural drawings.
[0062] It should be noted that after identifying the fire compartments and parking spaces, lighting fixtures should be reasonably arranged in the parking spaces according to national standards. The number of each fire compartment and the coordinates of the lighting fixtures in that fire compartment should be recorded in a list (L) and a quantity (Q).
[0063] S20. Based on the number of lighting fixtures arranged in each fire compartment, calculate the actual number of lighting fixtures assigned to each circuit;
[0064] It should be noted that after the lighting fixtures in the parking space are arranged, the number of lighting fixtures and the actual number of lighting fixtures on each circuit can be calculated based on the number of lighting fixtures Q in each fire compartment recorded in step S10 and the national standard requirement that there should be no more than 25 lighting fixtures on each circuit.
[0065] S30. Based on the coordinates of all the lamps in each fire compartment, establish an undirected graph, where the vertices of the undirected graph are the center points of all the lamps in the fire compartment, and the length of the side is the Euclidean distance between two vertices.
[0066] It should be noted that in this embodiment, an undirected weighted graph is established for the coordinates of the lighting fixtures in each fire compartment, and a double loop is used to ensure that every two fixtures are connected. The vertices of the undirected weighted graph are the center points of all the fixtures, and the length of the edges is the Euclidean distance between the two vertices.
[0067] An undirected weighted graph is a graph consisting of a finite non-empty set of vertices and a set of edges between vertices. It is usually represented as G(V,E), where G represents a graph, V is its vertex set, and E is its edge set. A graph with undirected edges is called an undirected graph.
[0068] S40. Use the minimum spanning tree algorithm to connect all vertices in the undirected graph to obtain the minimum cost spanning tree corresponding to each fire compartment;
[0069] S50. Based on the actual number of lamps divided into each loop, use the breadth-first traversal algorithm to perform loop division on the minimum cost spanning tree to obtain the loop division result;
[0070] It should be noted that by using the minimum spanning tree algorithm to generate the minimum-cost spanning tree in the undirected graph, and then using the breadth-first traversal algorithm to perform loop partitioning on the minimum-cost spanning tree, a globally optimal result can be obtained. Furthermore, this method has high generalization ability and is applicable to various underground parking garage scenarios, thus solving the problem of loop partitioning of parking spaces during the rendering of underground parking garage lighting.
[0071] S60. Based on the circuit division results, connect the lamps and mark the circuit numbers on the lamps.
[0072] This embodiment effectively solves the problem of calculating and dividing the number of circuits in the process of drawing underground parking garage lighting plans by using the minimum spanning tree algorithm. It can completely replace the designer in calculation and automatically divide the circuits, make connections within the circuits and label the circuit numbers, and obtain the global optimal result of the lighting fixture circuit division. The connection effect is neat and beautiful and meets the requirements of national standards. It also has high generalization and is applicable to a variety of underground parking garage scenarios.
[0073] In one embodiment, such as Figure 3 As shown, step S20 includes the following steps:
[0074] Divide the number of lighting fixtures in each fire compartment by the upper limit of the number of lighting fixtures on each circuit to obtain the number of circuits for the lighting fixtures;
[0075] Divide the number of lighting fixtures in each fire compartment by the number of circuits to obtain the actual number of lighting fixtures that need to be allocated on each circuit.
[0076] It should be noted that after the lighting fixtures in the parking space are installed, based on the number of lighting fixtures Q in each fire compartment recorded in step S10, and the national standard requirement that each circuit should not exceed 25 lighting fixtures, the number of circuits for the lighting fixtures (C) is calculated:
[0077] C = Q / 25
[0078] When the luminaires are not divisible, it is desirable for them to be more evenly distributed across each circuit. Therefore, the actual number of luminaires (RQ) that need to be distributed across each circuit is calculated:
[0079] RQ = Q / C.
[0080] In one embodiment, the method further includes:
[0081] If the number of circuits for the lamp is not an integer, round up.
[0082] If the actual number of lamps to be divided on each circuit is not an integer, then the floor number is rounded down.
[0083] It should be noted that in this embodiment, "rounding up" means that regardless of the rounding rules, if there is a decimal point at the end, the integer before it is incremented by 1. "Rounding down" means that regardless of the rounding rules, if there is a decimal point at the end, the decimal point is ignored. For example, 4.9, when the rounding down function is used, results in 4; when the rounding up function is used, results in 5.
[0084] In one embodiment, the method further includes:
[0085] When constructing the undirected graph, if a connection between two of the lamps crosses the lane, a penalty value is set.
[0086] It should be noted that if two lights are connected across a lane, a penalty value can be set to ensure the rationality and aesthetics of the final lane division.
[0087] In one embodiment, step S40 includes the following steps:
[0088] The minimum spanning tree algorithm is used to connect all vertices in the undirected graph to generate a weighted spanning tree;
[0089] The spanning tree with the smallest sum of edge weights in the weighted spanning tree is taken as the spanning tree with the minimum cost.
[0090] It should be noted that, Figure 4 It is the minimum spanning tree connection result of the lighting fixtures within a fire compartment.
[0091] In one embodiment, step S50 includes the following steps:
[0092] Using a breadth-first traversal algorithm, find the point with neighbors of 1 in the minimum cost spanning tree, and iterate downwards to find connected points until the number found is equal to the actual number of lamps, then stop searching.
[0093] The found set of points is removed from the minimum cost spanning tree, and the search is repeated until the circuit partitioning result is obtained.
[0094] It should be noted that in this embodiment, after establishing the minimum-cost spanning tree for the lighting fixtures, a breadth-first search algorithm is used to perform cycle partitioning on the spanning tree. This involves first finding points with a neighborhood of 1, then iteratively searching downwards for connected points until the number of connected points equals RQ, at which point the search stops. A set of found points is then removed from the minimum spanning tree, and the search is repeated until the cycle partitioning is complete, resulting in a globally optimal partitioning result. Figure 5 As shown.
[0095] In one embodiment, step S60 includes the following steps:
[0096] The actual number of the lamps assigned to each circuit is then connected within the group according to the circuit.
[0097] Select a light fixture from all circuit groups that is closest to the distribution room and label it with text.
[0098] Each circuit is sorted according to its distance from the power distribution room and then numbered.
[0099] The circuit number is labeled for each of the luminaires assigned to each circuit.
[0100] It should be noted that the lighting fixtures with completed circuit divisions should be connected within groups according to different circuits. In all groups, select a lighting fixture that is closest to the power distribution room and label it with the text: "Leads to the general lighting distribution box of this fire compartment". Sort each circuit according to its distance from the power distribution room, assign circuit numbers, and then label the circuit number on the lighting fixtures in each circuit to complete the division of the parking space lighting circuits in the underground garage.
[0101] This embodiment effectively solves the problem of calculating and dividing the number of circuits in the process of drawing a basement lighting plan. The division effect is excellent, completely replacing the designer's calculations and automatically dividing the circuits, including wiring and circuit numbering. The connection effect is neat and aesthetically pleasing, meeting national standards. A test example is shown below. Figure 6 As shown.
[0102] In addition, such as Figure 7 As shown in the figure, an embodiment of the present invention also proposes a lighting fixture circuit division device, the device comprising:
[0103] The identification and recording module 10 is used to identify fire compartments, parking spaces and road center lines in the garage building drawings, and record the number of each fire compartment, the number of lights arranged in each fire compartment and the coordinates of each light.
[0104] The quantity calculation module 20 is used to calculate the actual number of the lamps assigned to each circuit based on the number of lamps arranged in each fire compartment.
[0105] The undirected graph building module 30 is used to build an undirected graph based on the coordinates of all the lamps in each fire compartment. The vertices of the undirected graph are the center points of all the lamps in the fire compartment, and the length of the side is the Euclidean distance between two vertices.
[0106] The spanning tree calculation module 40 is used to connect all vertices in the undirected graph using the minimum spanning tree algorithm to obtain the minimum cost spanning tree corresponding to each fire compartment;
[0107] The loop partitioning module 50 is used to partition the loops on the minimum-cost spanning tree based on the actual number of the lamps partitioned in each loop using a breadth-first traversal algorithm, and obtain the loop partitioning result.
[0108] The labeling module 60 is used to connect the lamps and label the circuit numbers on the lamps according to the circuit division results.
[0109] This embodiment uses the minimum spanning tree algorithm to generate a minimum-cost spanning tree in an undirected graph. Then, it uses the breadth-first traversal algorithm to perform loop partitioning on the minimum-cost spanning tree, which can obtain the globally optimal result. It also has high generalization and is applicable to various underground parking garage scenarios, solving the problem of parking space loop partitioning in the process of underground parking garage lighting rendering.
[0110] In one embodiment, the quantity calculation module 20 includes:
[0111] The lamp circuit number calculation unit is used to divide the number of lamps arranged in each fire compartment by the upper limit of the number of lamps arranged on each circuit to obtain the number of lamp circuits.
[0112] The actual number of lighting fixtures calculation unit is used to divide the number of lighting fixtures arranged in each fire compartment by the number of circuits to obtain the actual number of lighting fixtures to be allocated on each circuit.
[0113] It should be noted that after the lighting fixtures in the parking space are installed, based on the number of lighting fixtures Q in each fire compartment recorded in step S10, and the national standard requirement that each circuit should not exceed 25 lighting fixtures, the number of circuits for the lighting fixtures (C) is calculated:
[0114] C = Q / 25
[0115] When the luminaires are not divisible, it is desirable for them to be more evenly distributed across each circuit. Therefore, the actual number of luminaires (RQ) that need to be distributed across each circuit is calculated:
[0116] RQ = Q / C.
[0117] In one embodiment, the quantity calculation module 20 further includes:
[0118] The rounding unit is used to round up when the number of circuits of the lamp is not an integer.
[0119] And, when the actual number of lamps to be divided on each circuit is not an integer, perform rounding down.
[0120] It should be noted that in this embodiment, "rounding up" means that regardless of the rounding rules, if there is a decimal point at the end, the integer before it is incremented by 1. "Rounding down" means that regardless of the rounding rules, if there is a decimal point at the end, the decimal point is ignored. For example, 4.9, when the rounding down function is used, results in 4; when the rounding up function is used, results in 5.
[0121] In one embodiment, the device further includes:
[0122] The penalty value setting module is used to set a penalty value when two of the lamps are connected across the lane during the establishment of the undirected graph.
[0123] It should be noted that if two lights are connected across a lane, a penalty value can be set to ensure the rationality and aesthetics of the final lane division.
[0124] In one embodiment, the spanning tree calculation module 40 includes:
[0125] A connection unit is used to connect all vertices in the undirected graph using the minimum spanning tree algorithm to generate a weighted spanning tree;
[0126] The minimum cost spanning tree determination unit is used to select the spanning tree with the minimum sum of edge weights in the weighted spanning tree as the minimum cost spanning tree.
[0127] In one embodiment, the loop division module 50 includes:
[0128] The traversal unit is used to find the point with neighbors of 1 in the minimum cost spanning tree using the breadth-first traversal algorithm, and then iterates down to find the connected points until the number of found points equals the actual number of lamps.
[0129] The search unit is used to remove a set of points found from the minimum cost spanning tree and repeat the search until the circuit partitioning result is obtained.
[0130] In one embodiment, the annotation module 60 includes:
[0131] The luminaire connection unit is used to connect the actual number of luminaires divided into each circuit within the group according to the circuit;
[0132] The text annotation unit is used to select a light fixture that is closest to the distribution room from all circuit groups for text annotation;
[0133] The circuit numbering unit is used to sort each circuit according to its distance from the power distribution room and to assign a circuit number;
[0134] The luminaire labeling unit is used to label the luminaire circuit number assigned to each circuit.
[0135] It should be noted that the lighting fixtures with completed circuit divisions should be connected within groups according to different circuits. In all groups, select a lighting fixture that is closest to the power distribution room and label it with the text: "Leads to the general lighting distribution box of this fire compartment". Sort each circuit according to its distance from the power distribution room, assign circuit numbers, and then label the circuit number on the lighting fixtures in each circuit to complete the division of the parking space lighting circuits in the underground garage.
[0136] This embodiment effectively solves the problem of calculating and dividing the number of circuits in the process of drawing the basement lighting plan. The division effect is good and can completely replace the designer to calculate and automatically divide the circuits, make connections within the circuits and label the circuit numbers. The connection effect is neat and beautiful and meets the requirements of national standards.
[0137] It should be noted that other embodiments or implementation methods of the lighting circuit dividing device of the present invention can refer to the above-described method embodiments, and will not be repeated here.
[0138] Furthermore, embodiments of the present invention also propose a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0139] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0140] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, node packaging device, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0142] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A lighting fixture circuit partitioning method, characterized by, The method comprises the following steps: Identify the fire compartment, parking space and road center line in the garage building drawing, record the number of each fire compartment, the number of lamps arranged in each fire compartment and the coordinates of each lamp; Based on the number of lamps arranged in each fire compartment, calculate the actual number of lamps divided in each loop; Based on the coordinates of all lamps in each fire compartment, establish an undirected graph, the vertices of the undirected graph are the center points of all lamps in the fire compartment, and the length of the edge is the Euclidean distance between two vertices; Connect all vertices in the undirected graph using the minimum spanning tree algorithm to obtain the minimum cost spanning tree corresponding to each fire compartment; Based on the actual number of lamps divided in each loop, use the breadth-first search algorithm to perform loop division on the minimum cost spanning tree to obtain the loop division result; According to the loop division result, connect the lamps and mark the loop number on the lamps; The method further comprises: When the loop number of the lamps is not an integer, round up; When the actual number of lamps to be divided in each loop is not an integer, round down; The method further comprises: When the loop number of the lamps is not an integer, round up; When the actual number of lamps to be divided in each loop is not an integer, round down; The method further comprises: When the loop number of the lamps is not an integer, round up; When the actual number of lamps to be divided in each loop is not an integer, round down; 2. The lighting fixture circuit partitioning method of claim 1, wherein, The method further comprises: When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value.
3. The lighting fixture circuit partitioning method of claim 1, wherein, The method further comprises: When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value. The method further comprises:
4. The lighting fixture circuit partitioning method of claim 1, wherein, When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value. The method further comprises: When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value. The method further comprises: When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value. The method further comprises: When establishing the undirected graph, if the connection between two lamps crosses the lane, set a penalty value. The lamps divided on each loop are marked with loop numbers.
5. A lighting fixture circuit dividing device, characterized in that, The device comprises: A recognition recording module is configured to recognize fire compartments, parking spaces and road center lines in a garage building drawing, record a number of each fire compartment, a number of lamps arranged in each fire compartment and coordinates of each lamp; A number calculation module is configured to calculate an actual number of the lamps divided on each loop based on the number of lamps arranged in each fire compartment; An undirected graph establishing module is configured to establish an undirected graph based on the coordinates of all the lamps in each fire compartment, wherein vertices of the undirected graph are center points of all the lamps in the fire compartment and lengths of edges are Euclidean distances between two vertices; A minimum spanning tree calculation module is configured to connect all the vertices in the undirected graph using a minimum spanning tree algorithm to obtain a minimum cost spanning tree corresponding to each fire compartment; A loop division module is configured to perform loop division on the minimum cost spanning tree using a breadth-first search algorithm based on the actual number of the lamps divided on each loop to obtain a loop division result; A marking module is configured to connect the lamps according to the loop division result and mark loop numbers on the lamps.
6. A lighting fixture circuit dividing device characterized by comprising: The device comprises a memory and a processor; wherein the processor runs a program corresponding to executable program codes stored in the memory by reading the executable program codes to implement the method in any one of claims 1-4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1-4.
Citation Information
Patent Citations
Mileage limitation-based multi-level line laying route optimization method and system
CN112446075A
Electrical loop automatic analysis and drawing generation method and device based on graph algorithm
CN113626909A