Factory layout method, device, computer equipment, storage medium and program product
By using cost functions to optimize coordinate iteratively in battery production plant planning, the problems of low layout efficiency and insufficient accuracy are solved, and a fast and accurate factory layout is achieved.
Patent Information
- Application Number
- CN202510162850.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-02-14
AI Technical Summary
During the planning process of battery production plant, the existing technology has problems of low layout efficiency and insufficient accuracy, resulting in long planning time and the results may not be optimized.
By iteratively optimizing the coordinates of the monomer to be laid out by using the cost function, the initial iterative coordinates are first optimized through the first cost function to obtain the initial optimization coordinates, and then further optimized using the second cost function until the iteration stop condition is met, and the target optimization coordinates are generated.
Improves the efficiency and accuracy of factory layout, and does not need to rely on the experience of planners, and can quickly generate multiple layout results to meet preset cost requirements.
Smart Images

Figure CN119622903B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new energy technologies, and particularly to a method, device, computer device, storage medium, and program product for factory area layout. Background Art
[0002] With the continuous expansion of production capacity, new factory areas are constantly being planned and constructed.
[0003] Taking the planning and construction of a battery production factory area as an example, a battery production factory area needs to plan and construct multiple departments, such as a logistics department, a workshop department, a production department, and a logistics department, etc. Each building or facility to be planned and constructed can be a single entity to be laid out. Therefore, it is necessary to plan the single entities to be laid out within the limited battery production factory area. However, during the planning process of the single entities to be laid out, numerous factors need to be considered. Therefore, it is necessary to rely on experience and spend a lot of time to complete the planning of the battery production factory area in a drawing software to obtain the layout result of the factory area.
[0004] However, in the related art, there is a problem of low efficiency in factory area layout planning. Summary of the Invention
[0005] Based on this, the present application provides a method, device, computer device, storage medium, and program product for factory area layout, which can improve the layout efficiency of the factory area layout.
[0006] In a first aspect, the present application provides a method for factory area layout, the method including: obtaining initial iteration coordinates of multiple single entities to be laid out in the factory area; iteratively optimizing the initial iteration coordinates of each single entity to be laid out by using a first cost function until a first iteration stop condition is satisfied, and obtaining initial optimized coordinates of each single entity to be laid out; the first cost function represents the relationship between the factory area layout cost and the spatial distance between every two single entities to be laid out in the factory area, and the spatial distance is a function of the coordinates of the single entity to be laid out; iteratively optimizing the initial optimized coordinates of each single entity to be laid out by using a second cost function until a second iteration stop condition is satisfied, and obtaining target optimized coordinates of each single entity to be laid out that meet the preset cost requirements; the second cost function represents the relationship between the factory area layout cost and the path distance between every two single entities to be laid out in the factory area, the path distance is a function of the coordinates of the single entity to be laid out, and the path distance between every two single entities to be laid out represents the shortest passing distance around other single entities to be laid out between every two single entities to be laid out; generating a layout result of multiple single entities to be laid out in the factory area according to the target optimized coordinates of each single entity to be laid out.
[0007] In the technical solution of the embodiment of the present application, the coordinates of the monomers to be laid out are iteratively optimized through a cost function, so as to generate the layout results of multiple monomers to be laid out in the factory area according to the obtained target optimized coordinates of each monomer to be laid out. It is not necessary to complete the planning of the factory area according to experience and consume a lot of time in the drawing software. Instead, the planning of the factory area is completed by iteratively optimizing the coordinates of each monomer to be laid out through the cost function, which improves the layout efficiency of the factory area layout. In addition, when determining the target optimized coordinates of each monomer to be laid out, it is not planned according to the experience of the planners, but iteratively optimized according to the pre-established cost function, thus providing a calculation basis for the determination of the target optimized coordinates of each monomer to be laid out and improving the layout accuracy of the factory area layout. And in the first optimization stage, the first cost function associated with the spatial distance between every two monomers to be laid out is used for iteration, and in the second optimization stage, the second cost function associated with the path distance between every two monomers to be laid out is used for iteration. The path distance is obtained through a search algorithm and is closer to the actual passing distance in the real scenario than the spatial distance. The calculation method of the path distance is more complex than that of the spatial distance. Therefore, the initial optimized coordinates of the monomers to be laid out can be iteratively obtained through the first cost function associated with the simple spatial distance, which can improve the iteration speed and thus improve the layout efficiency of the factory area layout. Then, the target optimized coordinates of the monomers to be laid out are iteratively obtained through the second cost function associated with the complex path distance, which can improve the iteration accuracy, thereby further improving the layout accuracy and layout efficiency of the factory area layout.
[0008] In some embodiments, the initial iterative coordinates of each monomer to be laid out are iteratively optimized by using the first cost function, and the initial optimized coordinates of each monomer to be laid out are iteratively optimized by using the second cost function, including: obtaining the setback distance between every two monomers to be laid out in the factory area, the factory area size, and the size of each monomer to be laid out; determining the target constraint conditions according to the setback distance between every two monomers to be laid out in the factory area, the factory area size, and the size of each monomer to be laid out; using the first cost function and the target constraint conditions to iteratively optimize the initial iterative coordinates of each monomer to be laid out, and using the second cost function and the target constraint conditions to iteratively optimize the initial optimized coordinates of each monomer to be laid out. In the technical solution of the embodiment of the present application, the target constraint conditions determined by the size of each monomer to be laid out, the factory area size, and the setback distance between every two monomers to be laid out in the factory area are used to iteratively optimize the coordinates of each monomer to be laid out, so that the iteratively optimized coordinates meet the set target constraint conditions, and the layout effectiveness of the factory area layout is improved.
[0009] In some embodiments, according to the setback between every two single entities to be arranged in the factory area, the size of the factory area, and the sizes of the single entities to be arranged, target constraint conditions are determined, including: determining setback constraint conditions according to the setback between every two single entities to be arranged in the factory area and the sizes of the single entities to be arranged; determining factory area constraint conditions according to the size of the factory area and the sizes of the single entities to be arranged; and combining the setback constraint conditions and the factory area constraint conditions to obtain the target constraint conditions. In the technical solution of the embodiments of the present application, the target constraint conditions include setback constraint conditions and factory area constraint conditions, so that the layout of the factory area can be carried out according to the specified setback requirements and the specified size of the factory area, avoiding the situation that the target optimization coordinates of the single entities to be arranged iteratively do not meet the specified setback requirements and the specified size of the factory area, and further improving the effectiveness of the factory area layout.
[0010] In some embodiments, according to the setback between every two single entities to be arranged in the factory area and the sizes of the single entities to be arranged, setback constraint conditions are determined, including: determining a first shortest distance in the horizontal direction and a second shortest distance in the vertical direction between every two single entities to be arranged according to the coordinates of every two single entities to be arranged and the sizes of every two single entities to be arranged; and determining the setback constraint conditions according to the relationship between the first shortest distance, the second shortest distance, and the setback. In the technical solution of the embodiments of the present application, the setback constraint conditions are determined according to the relationship between the first shortest distance in the horizontal direction and the second shortest distance in the vertical direction between every two single entities to be arranged and the setback between every two single entities to be arranged, so that corresponding setback requirements can exist for single entities to be arranged with different sizes, and thus the setback between the single entities to be arranged can be accurately constrained, improving the accuracy of the determined setback constraint conditions.
[0011] In some embodiments, according to the size of the factory area and the sizes of the single entities to be arranged, factory area constraint conditions are determined, including: determining the horizontal range and the vertical range of the factory area according to the size of the factory area; determining the positions of the single entities to be arranged in the horizontal direction and the vertical direction according to the coordinates of the single entities to be arranged and the sizes of the single entities to be arranged; and determining that the positions of the single entities to be arranged in the horizontal direction are within the horizontal range and the positions of the single entities to be arranged in the vertical direction are within the vertical range as the factory area constraint conditions. In the technical solution of the embodiments of the present application, determining that the positions of the single entities to be arranged in the horizontal direction are within the horizontal range of the factory area and the positions of the single entities to be arranged in the vertical direction are within the vertical range of the factory area as the factory area constraint conditions, so that corresponding range requirements can exist for single entities to be arranged with different sizes, and thus the positions of the single entities to be arranged can be accurately constrained within the horizontal range and the vertical range of the factory area, improving the accuracy of the determined factory area constraint conditions.
[0012] In some embodiments, obtaining the setback distance between every two single entities to be laid out in the factory area includes: obtaining the building categories of each single entity to be laid out and the setback requirements for each building category; determining the setback distance between every two single entities to be laid out in the factory area according to the building categories of each single entity to be laid out and the setback requirements for each building category. In the technical solution of the embodiments of the present application, since the setback distance between every two single entities to be laid out in the factory area is determined according to the building categories of each single entity to be laid out and the setback requirements for each building category, the layout of the single entities to be laid out in the factory area can strictly follow the setback requirements for each building category, improving the accuracy of the determined setback distance between every two single entities to be laid out in the factory area.
[0013] In some embodiments, iteratively optimizing the coordinates of each single entity to be laid out includes: obtaining the i-th generation parent population; the parent population includes M individuals, each individual includes N coordinates, i is an integer greater than or equal to 1, M is an integer greater than or equal to 2, and N is the number of single entities to be laid out in the factory area; selecting at least some individuals from the i-th generation parent population and performing crossover and mutation on at least some individuals to obtain the i-th generation offspring population; merging the i-th generation parent population and the i-th generation offspring population to obtain the i-th generation merged population; selecting the (i + 1)-th generation parent population from the i-th generation merged population according to the target constraint condition and according to the first cost function or the second cost function. In the technical solution of the embodiments of the present application, through the operations of selecting at least some individuals in each round, performing crossover and mutation on the selected at least some individuals, merging the parent population and the offspring population, and selecting the next generation parent population, the next generation parent population obtained by iteration increasingly minimizes the cost function, making the next generation parent population obtained by iteration increasingly accurate, and thus improving the layout accuracy of the factory area layout.
[0014] In some embodiments, according to the target constraint conditions and according to the first cost function or the second cost function, selecting the (i + 1)-th generation parental population from the i-th generation merged population includes: substituting N coordinates in the m-th individual in the i-th generation merged population into the first cost function or the second cost function to obtain the function value of the m-th individual; m is an integer greater than or equal to 1 and less than or equal to M; when the N coordinates in the m-th individual satisfy the target constraint conditions, determining the fitness value of the m-th individual according to the function value of the m-th individual; m is an integer greater than or equal to 1 and less than or equal to M; when the N coordinates in the m-th individual do not satisfy the target constraint conditions, obtaining the penalty coefficient of the i-th generation and determining the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual; selecting the (i + 1)-th generation parental population from the i-th generation merged population according to the sorting of the fitness values of each individual in the i-th generation merged population. In the technical solution of the embodiments of the present application, the (i + 1)-th generation parental population is selected from the i-th generation merged population according to the sorting of the fitness values of each individual in the i-th generation merged population, so that each individual in the (i + 1)-th generation parental population selected each time is an individual with a higher fitness for the cost function and the target constraint conditions. Therefore, as the iteration progresses, the fitness of the parental population for the cost function and the target constraint conditions becomes higher and higher, and the cost function of the next generation parental population obtained by iteration becomes smaller and smaller, and further the next generation parental population obtained by iteration becomes more and more accurate, improving the layout accuracy of the factory area layout.
[0015] In some embodiments, determining the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual includes: determining the overlapping area of the N to-be-layout monomers corresponding to the m-th individual according to the N coordinates in the m-th individual and the sizes of the to-be-layout monomers; determining the fitness value of the m-th individual according to the overlapping area, the penalty coefficient, and the function value of the m-th individual. In the technical solution of the embodiments of the present application, when the overlapping area between the N to-be-layout monomers corresponding to the m-th individual is larger, it indicates that the compliance with the target constraint conditions is worse. Therefore, through the overlapping area, the determined fitness value of the m-th individual is lower, and further the m-th individual is prevented from being selected as the next generation parental population. Therefore, as the iteration progresses, the fitness of the parental population for the cost function and the target constraint conditions becomes higher and higher, and further the layout accuracy of the factory area layout is improved.
[0016] In some embodiments, obtaining the penalty coefficient for the i-th round includes: determining the number of individuals in the merged population of the i-th round that meet the target constraint conditions; determining the compliance ratio of the i-th round as the ratio of the number of individuals in the i-th round to the number of individuals included in the merged population of the i-th round; and determining the penalty coefficient for the i-th round according to the compliance ratio of the i-th round. In the technical solution of the embodiments of the present application, the penalty coefficient for each round is determined according to the number of individuals that meet the target constraint conditions in each round, so that the magnitude of the penalty coefficient is adapted to the number of individuals that meet the target constraint conditions in the current population, avoiding search deviation caused by too large or too small penalty coefficient and thus falling into the local optimal solution. Therefore, the accuracy of the determined target optimization coordinates of each monomer to be laid out can be improved.
[0017] In some embodiments, meeting the first iteration stop condition includes one of the following: the same optimal solution appears continuously for the first preset number of times; the running duration of the iterative optimization exceeds the preset first running duration; the number of iterations of the iterative optimization reaches the preset first number of iterations; the optimal solution obtained by iteration meets the first service requirement. Meeting the second iteration stop condition includes one of the following: the same optimal solution appears continuously for the second preset number of times; the running duration of the iterative optimization exceeds the preset second running duration; the number of iterations of the iterative optimization reaches the preset second number of iterations; the optimal solution obtained by iteration meets the second service requirement. In the technical solution of the embodiments of the present application, by setting the first iteration stop condition for the first stage using the spatial distance and the second iteration stop condition for the second stage using the path distance, it is possible to stop the iteration according to the set iteration stop conditions, avoiding the situation where the iterations in the first stage and the second stage do not meet the requirements and resulting in inaccurate target optimization coordinates of each monomer to be laid out finally. Therefore, the embodiments of the present application can improve the accuracy of the determined target optimization coordinates of each monomer to be laid out.
[0018] In some embodiments, according to the target optimized coordinates of each single entity to be arranged, a layout result of multiple single entities to be arranged in the factory area is generated, including: according to the target optimized coordinates of each single entity to be arranged and the sizes of each single entity to be arranged obtained, a layout diagram of multiple single entities to be arranged in the factory area is drawn, and the optimized path distance between every two single entities to be arranged in the factory area in the layout diagram is determined; the union of the layout diagram of multiple single entities to be arranged in the factory area and the optimized path distance between every two single entities to be arranged in the factory area is determined as the layout result of multiple single entities to be arranged in the factory area. In the technical solution of the embodiments of the present application, when iterating to the target optimized coordinates of each single entity to be arranged for the last time, the computer device can automatically draw the layout diagram in the factory area and can also determine the optimized path distance between every two single entities to be arranged in the factory area in the layout diagram of the factory area, without the planner having to draw the layout diagrams of each single entity to be arranged in the factory area one by one in the drawing software, and without the planner having to obtain the path distance between every two single entities to be arranged in the factory area by measuring the layout diagram. Therefore, the embodiments of the present application can improve the efficiency of obtaining the layout result of the factory area.
[0019] In some embodiments, the method further includes: determining the passable area between every two single entities to be arranged according to the coordinates of every two single entities to be arranged in the factory area and the sizes of every two single entities to be arranged; performing path search in the passable area according to the obtained entrance and exit coordinates of every two single entities to be arranged to obtain the path distance between the two single entities to be arranged. In the technical solution of the embodiments of the present application, by performing path search between the passable areas between every two single entities to be arranged, the path distance between the two single entities to be arranged is obtained, thereby avoiding the problem of low path search efficiency caused by performing path search outside the passable area, and thus improving the search efficiency of path search.
[0020] In some embodiments, determining the passable area between every two single entities to be arranged according to the coordinates of every two single entities to be arranged in the factory area and the sizes of every two single entities to be arranged includes: determining the respective passable areas of every two single entities to be arranged according to the coordinates of every two single entities to be arranged and the sizes of every two single entities to be arranged; determining the smallest rectangular area used to cover the respective passable areas of every two single entities to be arranged; removing the areas of the single entities to be arranged other than the two single entities to be arranged from the smallest rectangular area to obtain the passable area between every two single entities to be arranged. In the technical solution of the embodiments of the present application, by defining the smallest rectangular area used to cover the respective passable areas of every two single entities to be arranged and removing the areas of the single entities to be arranged other than the two single entities to be arranged from the smallest rectangular area, the obtained passable area conforms to the actual passable area between every two single entities to be arranged, improving the accuracy of the determined passable area between every two single entities to be arranged.
[0021] In some embodiments, the method further includes: determining a plurality of combinations of monomers to be laid out according to a plurality of monomers to be laid out in the factory area; each combination of monomers to be laid out includes two monomers to be laid out, and different combinations of monomers to be laid out include different monomers to be laid out; calculating the path distances corresponding to the plurality of combinations of monomers to be laid out in parallel to obtain the path distances between every two monomers to be laid out in the factory area. In the technical solution of the embodiments of the present application, by calculating the path distances corresponding to the plurality of combinations of monomers to be laid out in parallel, the calculation process of the path distances between every two monomers to be laid out in the plurality of combinations of monomers to be laid out is accelerated, thereby reducing the calculation duration of the path distances between every two monomers to be laid out. Therefore, the optimization efficiency of iterative optimization using the second cost function can be improved.
[0022] In some embodiments, the method further includes: determining the first personnel flow cost, the first facility flow cost, and the first logistics cost between every two monomers to be laid out according to the spatial distance between every two monomers to be laid out; determining the sum of the first personnel flow cost, the first facility flow cost, and the first logistics cost as the first cost function; determining the second personnel flow cost, the second facility flow cost, and the second logistics cost between every two monomers to be laid out according to the path distance between every two monomers to be laid out; determining the sum of the second personnel flow cost, the second facility flow cost, and the second logistics cost as the second cost function. In the technical solution of the embodiments of the present application, the cost function is the sum of the personnel flow cost, the facility flow cost, and the logistics cost, and the determination method of the cost function is more in line with the actual situation of the factory area, improving the accuracy of the factory area layout.
[0023] In a second aspect, the present application provides a factory area layout device. The factory area layout device includes: an optimization module, configured to obtain the initial iterative coordinates of a plurality of monomers to be laid out in the factory area, and perform iterative optimization on the initial iterative coordinates of each monomer to be laid out using the first cost function until the first iteration stop condition is met, and obtain the initial optimized coordinates of each monomer to be laid out; the first cost function represents the relationship between the factory area layout cost and the spatial distance between every two monomers to be laid out in the factory area, and the spatial distance is a function of the coordinates of the monomers to be laid out; the optimization module is further configured to perform iterative optimization on the initial optimized coordinates of each monomer to be laid out using the second cost function until the second iteration stop condition is met, and obtain the target optimized coordinates of each monomer to be laid out that meet the preset cost requirements; the second cost function represents the relationship between the factory area layout cost and the path distance between every two monomers to be laid out in the factory area, the path distance is a function of the coordinates of the monomers to be laid out, and the path distance between every two monomers to be laid out represents the shortest passing distance between every two monomers to be laid out bypassing other monomers to be laid out; a layout generation module, configured to generate a layout result of a plurality of monomers to be laid out in the factory area according to the target optimized coordinates of each monomer to be laid out.
[0024] In a third aspect, the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of the above are implemented.
[0025] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method according to any one of the above are implemented.
[0026] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method according to any one of the above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0028] Figure 1 A flowchart of a plant layout method provided for the first embodiment;
[0029] Figure 2 A flowchart of a plant layout method provided for the second embodiment;
[0030] Figure 3 A flowchart of an iterative optimization method provided for the first embodiment;
[0031] Figure 4 A flowchart of an iterative optimization method provided for the second embodiment;
[0032] Figure 5 A flowchart of a plant layout method provided for the third embodiment;
[0033] Figure 6 A flowchart of a plant layout method provided for the fourth embodiment;
[0034] Figure 7 A flowchart of a plant layout method provided for the fifth embodiment;
[0035] Figure 8 A flowchart of the process of iteratively obtaining the target optimization coordinates of each monomer to be laid out by a genetic algorithm provided for some embodiments;
[0036] Figure 9 A schematic structural diagram of a plant layout device provided for some embodiments;
[0037] Figure 10 Schematic diagram of a computer device provided for some embodiments. Detailed implementation manners
[0038] The embodiments of the technical solution of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present application more clearly, so they are only examples and cannot be used to limit the protection scope of the present application.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.
[0040] In the description of the embodiments of this application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "a plurality" is more than two unless otherwise specifically defined. In the description of the embodiments of this application, "each" means each or every one of a plurality unless otherwise specifically defined.
[0041] Referring to "embodiments" herein means that the specific features, structures or characteristics described in connection with the embodiments may be included in at least one embodiment of this application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
[0042] In the description of the embodiments of this application, the term "and / or" is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0043] At present, in the plant layout, it is very complex to balance the needs of each department and achieve the optimal planar layout. The current plant layout scheme is mainly completed by planners in drawing software according to the needs of each department and their own experience. In the planning, factors such as the strength of the logistics relationship between different monomers to be laid out, the distance of the facility flow (such as including lines and / or pipelines, etc.), and the convenience of the personnel flow channel need to be considered, so as to complete the general plant layout drawing. However, this process generally consumes a lot of time of the planners. After completing the layout drawing, it is necessary to manually measure the distance between two monomers to be laid out in the drawing software. Therefore, the plant layout is time-consuming and laborious, and there is a problem of low layout efficiency. In addition, due to differences among planners, the general layout drawings drawn by different planners for the same needs also have differences, and the layout may not be the optimal solution. Therefore, there is also a problem of low layout accuracy in the plant layout.
[0044] To alleviate the above problems, through research, it is found that if an optimization algorithm (such as a genetic algorithm) is used for layout optimization, a global optimal solution can be obtained within an acceptable time, improving the efficiency of layout planning.
[0045] Based on the above considerations, the present application provides a factory area layout method, which obtains the initial iterative coordinates of multiple monomers to be laid out in the factory area; iteratively optimizes the initial iterative coordinates of each monomer to be laid out using a first cost function until the first iteration stop condition is met, and obtains the initial optimized coordinates of each monomer to be laid out; the first cost function represents the relationship between the factory area layout cost and the spatial distance between every two monomers to be laid out in the factory area, and the spatial distance is a function of the coordinates of the monomers to be laid out; iteratively optimizes the initial optimized coordinates of each monomer to be laid out using a second cost function until the second iteration stop condition is met, and obtains the target optimized coordinates of each monomer to be laid out that meet the preset cost requirements; the second cost function represents the relationship between the factory area layout cost and the path distance between every two monomers to be laid out in the factory area, the path distance is a function of the coordinates of the monomers to be laid out, and the path distance between every two monomers to be laid out represents the shortest passing distance around other monomers to be laid out between every two monomers to be laid out; generates a layout result of multiple monomers to be laid out in the factory area according to the target optimized coordinates of each monomer to be laid out. In this way, the coordinates of the monomers to be laid out are iteratively optimized through the cost function, so as to generate a layout result of multiple monomers to be laid out in the factory area according to the obtained target optimized coordinates of each monomer to be laid out. There is no need to complete the planning of the factory area in the drawing software according to experience and consuming a large amount of time. Instead, the planning of the factory area is completed by iteratively optimizing the coordinates of each monomer to be laid out through the cost function, which improves the layout efficiency of the factory area layout; in addition, when determining the target optimized coordinates of each monomer to be laid out, it is not planned according to the experience of the planners, but iteratively optimized according to the pre-established cost function, thus providing a calculation basis for the determination of the target optimized coordinates of each monomer to be laid out and improving the layout accuracy of the factory area layout; and in the first optimization stage, iteration is carried out using the first cost function associated with the spatial distance between every two monomers to be laid out, and in the second optimization stage, iteration is carried out using the second cost function associated with the path distance between every two monomers to be laid out. The path distance is obtained through a search algorithm and is closer to the passing distance in the real scenario than the spatial distance. The calculation method of the path distance is more complex than that of the spatial distance. Therefore, the initial optimized coordinates of the monomers to be laid out can be iteratively obtained through the first cost function associated with the simple-to-calculate spatial distance, which can improve the iteration speed and thus improve the layout efficiency of the factory area layout. Then, the target optimized coordinates of the monomers to be laid out are iteratively obtained through the second cost function associated with the complex-to-calculate path distance, which can improve the iteration accuracy, thereby further improving the layout accuracy and layout efficiency of the factory area layout.
[0046] The computer device in the embodiments of the present application may include a combination of one or at least two of the following: servers, mobile phones, computers, tablets (Pads), computers with transceiver functions, palmtop computers, desktop computers, personal digital assistants, portable media players, smart speakers, smart watches, smart glasses, wearable devices such as smart necklaces, pedometers, digital TVs, virtual reality (VR) devices, augmented reality (AR) devices, devices in industrial control, devices in self-driving, devices in remote medical surgery, devices in smart grid, devices in transportation safety, devices in smart city, devices in smart home, vehicles, in-vehicle devices, in-vehicle modules, and so on.
[0047] Figure 1 A flowchart of a factory area layout method provided for the first embodiment is shown as Figure 1 shown. This method is applied to a computer device, and the method includes:
[0048] S101. Obtain the initial iterative coordinates of multiple monomers to be laid out in the factory area, and use the first cost function to iteratively optimize the initial iterative coordinates of each monomer to be laid out until the first iteration stop condition is met, and obtain the initial optimized coordinates of each monomer to be laid out.
[0049] Among them, the first cost function represents the relationship between the factory area layout cost and the spatial distance between every two monomers to be laid out in the factory area, and the spatial distance is a function of the coordinates of the monomers to be laid out.
[0050] Exemplarily, the coordinates of the monomer to be laid out are the coordinates of the center point of the monomer to be laid out.
[0051] The embodiments of the present application do not limit the scenarios of factory area layout. Exemplarily, the factory area can be a factory area in the new energy industry. For example, the factory area can be a battery production factory area. Another example is that the factory area can be a factory area in other fields. Among them, the factory area can be replaced by a park or a base, etc.
[0052] The monomers to be laid out in the factory area can be any monomer to be constructed in the factory area. Exemplarily, the monomers to be laid out may include at least one of the following: factory buildings, warehouses, logistics buildings, entertainment areas, fitness areas, parking lots, etc.
[0053] Exemplarily, the spatial distance may include the Manhattan distance. Additionally exemplarily, the spatial distance may include the Euclidean distance.
[0054] The cost function may include a loss function, and the cost function represents a function that can be iteratively optimized. In the embodiments of the present application, the decision variables corresponding to the cost function may be the coordinates of each monomer to be laid out. In some embodiments, before S101, it may further include the step of establishing a first cost function and a second cost function. Exemplarily, a first cost function may be established based on the spatial distance between every two monomers to be laid out in the factory area. Exemplarily, a second cost function may be established based on the path distance between every two monomers to be laid out in the factory area.
[0055] Among them, as the coordinates of every two monomers to be laid out change, the spatial distance and the path distance between every two monomers to be laid out also change accordingly. Exemplarily, the spatial distance between every two monomers to be laid out in the factory area and the path distance between every two monomers to be laid out can be determined according to the coordinates of each monomer to be laid out in the factory area obtained by each iteration. In this way, as the coordinates of each monomer to be laid out are continuously updated, the corresponding spatial distance between every two monomers to be laid out and the path distance between every two monomers to be laid out will also change.
[0056] Exemplarily, the initial iteration coordinates of multiple monomers to be laid out can be randomly generated. Additionally exemplarily, the initial iteration coordinates of multiple monomers to be laid out can be the coordinates input by the user to the computer.
[0057] In some embodiments, the initial iteration coordinates of multiple monomers to be laid out are Q sets of coordinates, and the initial optimization coordinates of multiple monomers to be laid out are Q sets of coordinates, where Q is an integer greater than or equal to 1.
[0058] The initial optimization coordinates of each monomer to be laid out can be the coordinates of each monomer to be laid out obtained in the last round of iteration when it is determined that the first iteration stop condition is satisfied.
[0059] S102. Use the second cost function to iteratively optimize the initial optimization coordinates of each monomer to be laid out until the second iteration stop condition is satisfied, and obtain the target optimization coordinates of each monomer to be laid out that meet the preset cost requirements.
[0060] Among them, the second cost function represents the relationship between the factory layout cost and the path distance between every two monomers to be laid out in the factory area. The path distance is a function of the coordinates of the monomers to be laid out, and the path distance between every two monomers to be laid out represents the shortest passing distance between every two monomers to be laid out bypassing other monomers to be laid out.
[0061] In some embodiments, during the iterative optimization of the initial optimized coordinates of each monomer to be laid out using the second cost function, the N coordinates included in the optimal solution of each monomer to be laid out obtained in each round, where the N coordinates are respectively the coordinates of multiple monomers to be laid out within the factory area, are substituted into the second cost function to obtain a function value (i.e., a cost value). When it is found that the function value corresponding to the N coordinates included in the optimal solution of a certain round meets the preset cost requirement, the N coordinates included in the optimal solution of this round are determined as the target optimized coordinates of each monomer to be laid out that meet the preset cost requirement, and the iteration ends.
[0062] Exemplarily, the function value meeting the preset cost requirement may include: the function value is less than or equal to the preset cost value, or the function value is within the preset cost range.
[0063] The path distance is determined by means of path search. Exemplarily, the A* algorithm or other path search algorithms can be used for path search to obtain the path distance between every two monomers to be laid out within the factory area. In some embodiments, the path distance between every two monomers to be laid out within the factory area is determined according to the coordinates of each monomer to be laid out within the factory area and according to the dimensions of each monomer to be laid out within the factory area. Exemplarily, the dimensions of the monomer to be laid out may include the length and width of the monomer to be laid out.
[0064] The target optimized coordinates of each monomer to be laid out can be the coordinates of each monomer to be laid out obtained in the last round of iteration when it is determined that the second iteration stop condition is met.
[0065] S103. Generate the layout result of multiple monomers to be laid out within the factory area according to the target optimized coordinates of each monomer to be laid out.
[0066] Exemplarily, the layout result of multiple monomers to be laid out within the factory area may include the layout diagram of multiple monomers to be laid out within the factory area and / or the optimized path distance between every two monomers to be laid out within the factory area. Among them, the optimized path distance between every two monomers to be laid out within the factory area can be determined according to the coordinates of each monomer to be laid out obtained in the last round of iteration when it is determined that the second iteration stop condition is met.
[0067] Exemplarily, the layout result of multiple monomers to be laid out within the factory area can be generated according to the target optimized coordinates of each monomer to be laid out and the dimensions of each monomer to be laid out.
[0068] In the technical solution of the embodiment of the present application, the coordinates of the monomers to be laid out are iteratively optimized through a cost function, so as to obtain the target optimized coordinates of each monomer to be laid out, and generate the layout result of multiple monomers to be laid out in the factory area. It is not necessary to complete the planning of the factory area in the drawing software according to experience and consume a lot of time. Instead, the planning of the factory area is completed by iteratively optimizing the coordinates of each monomer to be laid out through the cost function, which improves the layout efficiency of the factory area layout; in addition, when determining the target optimized coordinates of each monomer to be laid out, it is not planned according to the experience of the planners, but is iteratively optimized according to the pre-established cost function, thus providing a calculation basis for the determination of the target optimized coordinates of each monomer to be laid out and improving the layout accuracy of the factory area layout; and in the first optimization stage, the first cost function associated with the spatial distance between every two monomers to be laid out is used for iteration, and in the second optimization stage, the second cost function associated with the path distance between every two monomers to be laid out is used for iteration. The path distance is obtained through a search algorithm and is closer to the actual travel distance in the real scenario than the spatial distance. The calculation method of the path distance is more complex than that of the spatial distance. Therefore, the initial optimized coordinates of the monomers to be laid out can be iteratively obtained through the first cost function associated with the simple-to-calculate spatial distance, which can improve the iteration speed and thus improve the layout efficiency of the factory area layout. Then, the target optimized coordinates of the monomers to be laid out are iteratively obtained through the second cost function associated with the complex-to-calculate path distance, which can improve the accuracy of the iteration, thereby further improving the layout accuracy of the factory area layout and the layout efficiency of the factory area layout.
[0069] Figure 2 FIG. 4 is a schematic flowchart of a method for factory area layout provided for the second embodiment. This method is applied to a computer device. Figure 2 The difference between this embodiment and Figure 1 this embodiment is that before S101, S104 and S105 are further included. S101 includes S1011, and S102 includes S1021.
[0070] S104. Obtain the setback distance, factory area size, and the size of each monomer to be laid out between every two monomers to be laid out in the factory area.
[0071] Among them, the setback distance between every two monomers to be laid out is the minimum distance between every two monomers to be laid out. By setting the setback distance between every two monomers to be laid out, the nearest distance between every two monomers to be laid out in the target optimized coordinates can be made greater than or equal to the required setback distance, so that the target optimized coordinates meet the setback requirements. Exemplarily, the setback distance between every two monomers to be laid out in the factory area can be pre-planned, or can be obtained from a database, or can be determined according to the setback requirements of the specified building.
[0072] Exemplarily, the dimensions of each monomer to be laid out and / or the dimensions of the factory area can be obtained from a database or can be pre-planned. For example, the dimensions of each monomer to be laid out and / or the dimensions of the factory area can be determined according to requirements.
[0073] S105. Determine target constraint conditions according to the setback between every two monomers to be laid out in the factory area, the dimensions of the factory area, and the dimensions of each monomer to be laid out.
[0074] The target constraint conditions are used to restrict decision variables.
[0075] S1011. Use the first cost function and the target constraint conditions to iteratively optimize the initial iterative coordinates of each monomer to be laid out until the first iteration stop condition is met, and obtain the initial optimized coordinates of each monomer to be laid out.
[0076] S1021. Use the second cost function and the target constraint conditions to iteratively optimize the initial optimized coordinates of each monomer to be laid out until the second iteration stop condition is met, and obtain the target optimized coordinates of each monomer to be laid out.
[0077] In the technical solution of the embodiment of the present application, through the target constraint conditions determined by the dimensions of each monomer to be laid out, the dimensions of the factory area, and the setback between every two monomers to be laid out in the factory area, the coordinates of each monomer to be laid out are iteratively optimized, so that the iteratively optimized coordinates meet the set target constraint conditions, and the layout effectiveness of the factory area layout is improved.
[0078] In some embodiments, determining the target constraint conditions according to the setback between every two monomers to be laid out in the factory area, the dimensions of the factory area, and the dimensions of each monomer to be laid out can be achieved by the following method: determine the setback constraint conditions according to the setback between every two monomers to be laid out in the factory area and the dimensions of each monomer to be laid out; determine the factory area constraint conditions according to the dimensions of the factory area and the dimensions of each monomer to be laid out; combine the setback constraint conditions and the factory area constraint conditions to obtain the target constraint conditions.
[0079] Exemplarily, if the required setback of monomer A to be laid out is the first distance and the required setback of monomer B to be laid out is the second distance, then the setback between monomer A and monomer B to be laid out is the larger one of the first distance and the second distance.
[0080] Among them, the setback constraint conditions require that the setback between every two monomers to be laid out in the factory area meets the setback requirements. Among them, the factory area constraint conditions require that each monomer to be laid out in the factory area is within the factory area range.
[0081] In the technical solution of the embodiment of the present application, the target constraint conditions include a setback constraint condition and a plant area constraint condition, so that the plant area layout can be carried out according to the specified setback requirements and the specified plant area size, avoiding the situation that the target optimization coordinates of each monomer to be laid out iteratively do not meet the specified setback requirements and the specified plant area size, and further improving the effectiveness of the plant area layout.
[0082] In some embodiments, the setback constraint condition can be determined according to the setback between every two monomers to be laid out in the plant area and the sizes of each monomer to be laid out, which can be achieved by the following method: according to the coordinates of every two monomers to be laid out and the sizes of every two monomers to be laid out, determine the first shortest distance between every two monomers to be laid out in the horizontal direction (exemplarily, the horizontal direction can also include the abscissa direction) and the second shortest distance in the vertical direction (exemplarily, the vertical direction can also include the ordinate direction); determine the setback constraint condition according to the relationship between the first shortest distance, the second shortest distance and the setback.
[0083] In some embodiments, the overlapping result of every two monomers to be laid out can be determined according to the coordinates of every two monomers to be laid out and the sizes of every two monomers to be laid out; when the overlapping result indicates that every two monomers to be laid out overlap in the horizontal direction and do not overlap in the vertical direction, determine that the first shortest distance between every two monomers to be laid out in the vertical direction is greater than or equal to the setback between every two monomers to be laid out in the plant area as the first constraint condition; when the overlapping result indicates that every two monomers to be laid out do not overlap in the horizontal direction and overlap in the vertical direction, determine that the second shortest distance between every two monomers to be laid out in the horizontal direction is greater than or equal to the setback between every two monomers to be laid out in the plant area as the second constraint condition; when the overlapping result indicates that every two monomers to be laid out do not overlap in the horizontal direction and do not overlap in the vertical direction, determine that both the first shortest distance between every two monomers to be laid out in the vertical direction and the second shortest distance in the horizontal direction are greater than or equal to the setback between every two monomers to be laid out in the plant area as the third constraint condition; determine the union of the first constraint condition, the second constraint condition and the third constraint condition as the setback constraint condition.
[0084] In this way, the setback constraint condition includes the first constraint condition only when every two monomers to be laid out overlap in the horizontal direction, the second constraint condition only when every two monomers to be laid out overlap in the vertical direction, and the third constraint condition when every two monomers to be laid out do not overlap in both the horizontal and vertical directions. When every two monomers to be laid out meet any one of the first constraint condition, the second constraint condition and the third constraint condition, it indicates that the setback between every two monomers to be laid out meets the requirements, and then these every two monomers to be laid out meet the setback constraint condition.
[0085] In the technical solution of the embodiment of the present application, the setback constraint condition is determined according to the first shortest distance in the horizontal direction and the second shortest distance in the vertical direction between every two monomers to be laid out, as well as the relationship between the setbacks of every two monomers to be laid out, so that corresponding setback requirements can exist for monomers to be laid out of different sizes, and further, the setbacks between monomers to be laid out can be accurately constrained, improving the accuracy of the determined setback constraint condition.
[0086] In some embodiments, according to the plant area size and the sizes of each monomer to be laid out, the plant area constraint condition can be determined in the following way: determine the horizontal range and the vertical range of the plant area according to the plant area size; determine the positions of each monomer to be laid out in the horizontal direction and the vertical direction according to the coordinates and sizes of each monomer to be laid out; determine that the positions of each monomer to be laid out in the horizontal direction are within the horizontal range and the positions of each monomer to be laid out in the vertical direction are within the vertical range as the plant area constraint condition.
[0087] In some embodiments, the first maximum point and the first minimum point of each monomer to be laid out in the horizontal direction, and the second maximum point and the second minimum point of each monomer to be laid out in the vertical direction can be determined according to the coordinates and sizes of each monomer to be laid out; determine that the first maximum point is less than or equal to the length in the plant area size and the first minimum point is greater than or equal to 0 as the fourth constraint condition; determine that the second maximum point is less than or equal to the width in the plant area size and the second minimum point is greater than or equal to 0 as the fifth constraint condition; determine the union of the fourth constraint condition and the fifth constraint condition as the plant area constraint condition.
[0088] Exemplarily, if the center point coordinates of a certain monomer to be laid out are ( , ), the size of this monomer to be laid out includes length and width, the length is ,and the width is , then the first maximum point and the first minimum point of this monomer to be laid out in the horizontal direction are respectively and , and the second maximum point and the second minimum point of this monomer to be laid out in the vertical direction are respectively and .
[0089] In the technical solution of the embodiment of the present application, determine that the positions of each monomer to be laid out in the horizontal direction are within the horizontal range of the plant area and the positions of each monomer to be laid out in the vertical direction are within the vertical range of the plant area as the plant area constraint condition, so that corresponding range requirements can exist for monomers to be laid out of different sizes, and further, the positions of the monomers to be laid out can be accurately constrained within the horizontal range and the vertical range of the plant area, improving the accuracy of the determined plant area constraint condition.
[0090] In some embodiments, obtaining the setback distance between every two to-be-layout monomers in the factory area includes: obtaining the building categories of each to-be-layout monomer and the setback requirements for each building category; and determining the setback distance between every two to-be-layout monomers in the factory area according to the building categories of each to-be-layout monomer and the setback requirements for each building category.
[0091] In some embodiments, the building categories of each to-be-layout monomer are preset. For example, before the embodiments of the present application, the number of each to-be-layout monomer in the factory area and the building category of each to-be-layout monomer can be determined, and then, according to the building category of each to-be-layout monomer, the setback requirements for each building category can be determined. Exemplarily, the building categories of the to-be-layout monomers can include at least one of the following: production plant category, warehouse category, logistics building category, road category, entertainment area category, fitness area category, parking lot category, etc. Exemplarily, different building categories can have different setback requirements, or at least some different building categories can have the same setback requirements.
[0092] In this way, by obtaining the building categories of each to-be-layout monomer and the setback requirements for each building category, the building categories of each to-be-layout monomer and the setback requirements for each to-be-layout monomer can be determined. According to the building categories of each to-be-layout monomer and the setback requirements for each to-be-layout monomer, the larger one of the setback requirements for every two to-be-layout monomers in the factory area is determined as the setback distance between every two to-be-layout monomers. For example, if the setback requirement for to-be-layout monomer A is greater than or equal to the first distance, and the setback requirement for to-be-layout monomer B is greater than or equal to the second distance, then the setback distance between to-be-layout monomer A and to-be-layout monomer B is the larger one of the first distance and the second distance.
[0093] In the technical solution of the embodiments of the present application, since the setback distance between every two to-be-layout monomers in the factory area is determined according to the building categories of each to-be-layout monomer and the setback requirements for each building category, the layout of the to-be-layout monomers in the factory area can strictly follow the setback requirements for each building category, improving the accuracy of the determined setback distance between every two to-be-layout monomers in the factory area.
[0094] Figure 3 A flowchart of an iterative optimization method provided for the first embodiment is shown as Figure 3 As shown, this method is applied to a computer device. The iterative optimization method provided by the embodiments of the present application is not only applicable to the solution of iteratively optimizing the initial iterative coordinates of each to-be-layout monomer in the factory area using the first cost function, but also applicable to the solution of iteratively optimizing the initial optimized coordinates of each to-be-layout monomer using the second cost function. In the embodiments of the present application, the method for iteratively optimizing the coordinates of each to-be-layout monomer can include the following steps:
[0095] S301. Obtain the i-th generation of parent population; the parent population includes M individuals, each individual includes N coordinates, i is an integer greater than or equal to 1, M is an integer greater than or equal to 2, and N is the number of single entities to be arranged in the factory area.
[0096] In the solution of iteratively optimizing the initial iteration coordinates of each single entity to be arranged using the first cost function, when i is equal to 1, the M individuals included in the first-generation parent population are randomly generated. For example, when N is 20 and M is equal to 100, 100 individuals are randomly generated, each individual includes 20 coordinates (i.e., the coordinates of 20 single entities to be arranged), and the 20 coordinates included in each individual are all randomly generated. Exemplarily, the initial iteration coordinates of each single entity to be arranged include the coordinates in each of the M individuals.
[0097] In the solution of iteratively optimizing the initial optimized coordinates of each single entity to be arranged using the second cost function, when i is equal to 1, the M individuals included in the first-generation parent population are the M individuals obtained after the iteration using the first cost function is completed.
[0098] S302. Select at least part of the individuals from the i-th generation of parent population, and perform crossover and mutation on at least part of the individuals to obtain the i-th generation of offspring population.
[0099] Among them, the individuals in the offspring population are the individuals after crossover and mutation.
[0100] Exemplarily, at least part of the individuals can be randomly selected from the i-th generation of parent population. Again exemplarily, the first preset number of individuals in the i-th generation of parent population can be determined as at least part of the individuals.
[0101] Exemplarily, at least part of the individuals can include the first part of individuals and the second part of individuals. Crossover can be performed on the first part of individuals, and mutation can be performed on the second part of individuals to obtain the i-th generation of offspring population. For example, the first part of individuals are divided into groups of two each, and at least one coordinate in each group is exchanged to obtain two new individuals after crossover. Some coordinate values (including abscissa values and ordinate values) are selected from each individual in the second part of individuals, and a value is added to or subtracted from the selected coordinate values. The value added or subtracted can be a fixed value or a random value to obtain each individual after mutation.
[0102] For example, the first individual includes the following coordinates (x1, y1), (x2, y2), (x3, y3), (x4, y4), and (x5, y5), the second individual includes the following coordinates (x6, y6), (x7, y7), (x8, y8), (x9, y9), and (x10, y10). Crossing these two individuals can obtain a third individual and a fourth individual. The third individual includes the following coordinates (x1, y1), (x2, y2), (x3, y3), (x9, y9), and (x10, y10), and the fourth individual includes the following coordinates (x6, y6), (x7, y7), (x8, y8), (x4, y4), and (x5, y5).
[0103] For example, the fifth individual includes the following coordinates (x11, y11), (x12, y12), (x13, y13), (x14, y14), and (x15, y15). Mutating the fifth individual can obtain a sixth individual, which includes the following coordinates (x11, y11 + A), (x12 + B, y12), (x13, y13), (x14 + C, y14 + C), and (x15, y15). A, B, and C are all non-zero real numbers.
[0104] S303. Merge the i-th generation of parent population and the i-th generation of offspring population to obtain the i-th generation of merged population.
[0105] Among them, the i-th generation of merged population is the union of the i-th generation of parent population and the i-th generation of offspring population.
[0106] S304. According to the target constraint conditions, and according to the first cost function or the second cost function, select the (i + 1)-th generation of parent population from the i-th generation of merged population, and select the (i + 1)-th generation of parent population from the i-th generation of merged population.
[0107] Among them, in the case of iteratively optimizing the initial iteration coordinates of each monomer to be laid out using the first cost function, select the (i + 1)-th generation of parent population according to the target constraint conditions and the first cost function. In the case of iteratively optimizing the initial optimized coordinates of each monomer to be laid out using the second cost function, select the (i + 1)-th generation of parent population according to the target constraint conditions and the second cost function.
[0108] In some embodiments, in the case of obtaining the (i + 1)-th generation of parent population, it can be determined whether the first iteration stop condition is satisfied. In the case of satisfying the first iteration stop condition, stop the iteration, and determine the coordinates in the M individuals included in the last obtained parent population as the initial optimized coordinates of each monomer to be laid out; in the case of not satisfying the first iteration stop condition, let i = i + 1, and then execute the steps of S301 to S304 to continue the next round of iteration until the first iteration stop condition is satisfied.
[0109] In some embodiments, when obtaining the (i + 1)-th generation of the parent population, it can be determined whether the second iteration stop condition is satisfied. When the second iteration stop condition is satisfied, the iteration is stopped, and the coordinates of the M individuals included in the last obtained parent population are respectively substituted into the second cost function to obtain M second function values. The coordinates included in the individual corresponding to the maximum value among the M second function values are determined as the target optimized coordinates of each monomer to be arranged. When the second iteration stop condition is not satisfied, let i = i + 1, and then execute the steps of S301 to S304, so as to continue the next round of iteration until the second iteration stop condition is satisfied.
[0110] In the technical solution of the embodiments of the present application, by operating on selecting at least some individuals in each round, performing crossover and mutation on at least some of the selected individuals, merging the parent population and the offspring population, and selecting the next generation of the parent population, the next generation of the parent population obtained by iteration increasingly minimizes the cost function, making the next generation of the parent population obtained by iteration more and more accurate, thereby improving the layout accuracy of the plant layout.
[0111] Figure 4 A flowchart of an iterative optimization method provided for the second embodiment is as Figure 4 shown. This method is applied to a computer device. Figure 4 The difference between this embodiment and Figure 3 the embodiment is that S304 includes S3041 to S3044.
[0112] S3041: Substitute the N coordinates of the m-th individual in the i-th merged population into the first cost function or the second cost function to obtain the function value of the m-th individual.
[0113] Where m is an integer greater than or equal to 1 and less than or equal to M.
[0114] Where, when iteratively optimizing the initial iteration coordinates of each monomer to be arranged by using the first cost function, substitute into the first cost function; when iteratively optimizing the initial optimized coordinates of each monomer to be arranged by using the second cost function, substitute into the second cost function.
[0115] S3042: When the N coordinates in the m-th individual satisfy the target constraint condition, determine the fitness value of the m-th individual according to the function value of the m-th individual.
[0116] In some embodiments, the function value of the m-th individual can be multiplied by -1 to obtain the fitness value of the m-th individual. In other embodiments, the reciprocal of the function value of the m-th individual can be determined as the fitness value of the m-th individual.
[0117] S3043. When the N coordinates in the m-th individual do not satisfy the target constraint condition, obtain the penalty coefficient in the i-th round, and determine the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual.
[0118] In some embodiments, the fitness value of the m-th individual can be determined according to the product of the penalty coefficient and the function value of the m-th individual. Exemplarily, the product can be multiplied by -1 to obtain the fitness value of the m-th individual. Another example is that the reciprocal of the product can be determined as the fitness value of the m-th individual.
[0119] In some embodiments, the penalty coefficient in the i-th round can be a fixed value, and the penalty coefficients in different rounds are the same. In other embodiments, the penalty coefficients in different rounds are different.
[0120] S3044. Select the (i + 1)-th generation parent population from the merged population in the i-th round according to the sorting of the fitness values of each individual in the merged population in the i-th round.
[0121] Exemplarily, the N coordinates included in the individual with the highest fitness value can be determined as the N coordinates included in the optimal solution.
[0122] Exemplarily, the sorting of the fitness values of each individual in the merged population in the i-th round can be a sorting from large to small or from small to large. Exemplarily, the M individuals with the largest fitness values in the merged population in the i-th round can be determined as the (i + 1)-th generation parent population.
[0123] In the technical solution of the embodiments of the present application, the (i + 1)-th generation parent population is selected from the merged population in the i-th round according to the sorting of the fitness values of each individual in the merged population in the i-th round. Thus, the individuals in the (i + 1)-th generation parent population selected each time are all individuals with higher fitness for the cost function and the target constraint condition. As the iteration progresses, the fitness of the parent population for the cost function and the target constraint condition becomes higher and higher. The next generation parent population of the iteration makes the cost function smaller and smaller, and thus the next generation parent population of the iteration becomes more and more accurate, improving the layout accuracy of the factory area layout.
[0124] In some embodiments, determining the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual includes: determining the overlapping area of the N to-be-layout monomers corresponding to the m-th individual according to the N coordinates in the m-th individual and the sizes of the to-be-layout monomers; determining the fitness value of the m-th individual according to the overlapping area, the penalty coefficient, and the function value of the m-th individual.
[0125] Among them, there is at least one overlapping area of the N monomers to be arranged corresponding to the m-th individual. When there is one such overlapping area, the area of this area is determined as the overlapping area. When there are at least two overlapping areas, the sum of the areas of the at least two overlapping areas is determined as the overlapping area.
[0126] In some embodiments, the fitness value of the m-th individual can be determined according to the product of the overlapping area, the penalty coefficient, and the function value of the m-th individual. Exemplarily, this product can be multiplied by -1 to obtain the fitness value of the m-th individual. Another example is that the reciprocal of this product can be determined as the fitness value of the m-th individual.
[0127] In some embodiments, when the overlapping area is greater than or equal to 1, the fitness value of the m-th individual is determined according to the product of the overlapping area, the penalty coefficient, and the function value of the m-th individual. In other embodiments, when the overlapping area is less than 1, the overlapping area is increased by 1 to obtain a new overlapping area or the overlapping area is determined as 1, and then the fitness value of the m-th individual is determined according to the product of the new overlapping area, the penalty coefficient, and the function value of the m-th individual.
[0128] In the technical solution of the embodiments of the present application, the larger the overlapping area among the N monomers to be arranged corresponding to the m-th individual, the worse the compliance with the target constraint conditions. Therefore, through the overlapping area, the determined fitness value of the m-th individual is lower, thereby avoiding the m-th individual from being selected as the next-generation parent population. As the iteration progresses, the fitness of the parent population to the cost function and the target constraint conditions becomes higher and higher, thereby improving the layout accuracy of the plant layout.
[0129] In some embodiments, obtaining the penalty coefficient of the i-th round includes: determining the number of individuals in the i-th round of merged population that meet the target constraint conditions; determining the compliance ratio of the i-th round as the ratio of the number of individuals in the i-th round to the number of individuals included in the i-th round of merged population; and determining the penalty coefficient of the i-th round according to the compliance ratio of the i-th round.
[0130] Exemplarily, for an individual to meet the target constraint conditions, it is required that all N coordinates included in this individual meet the target constraint conditions. For example, the i-th round of merged population includes 180 individuals, and 120 individuals meet the target constraint conditions. Then the number of individuals meeting the target constraint conditions is 120, and the corresponding compliance ratio is 2 / 3.
[0131] In some embodiments, the reciprocal of the compliance solution ratio in the i-th round can be determined as the penalty coefficient in the i-th round. In this way, due to the limitation of the target constraint conditions, as the iterative optimization progresses, the number of individuals satisfying the target constraint conditions will increase, and the obtained compliance ratio will be closer and closer to 1. By determining the reciprocal of the compliance solution ratio in the i-th round as the penalty coefficient in the i-th round, a smaller penalty coefficient is used when the compliance ratio is high, and a larger penalty coefficient is used when the compliance ratio is low.
[0132] In the technical solution of the embodiment of the present application, the penalty coefficient in each round is determined according to the number of individuals satisfying the target constraint conditions in each round, so that the magnitude of the penalty coefficient is adapted to the number of individuals satisfying the target constraint conditions in the current population, avoiding search deviation caused by too large or too small penalty coefficient, and thus avoiding the situation of falling into a local optimal solution. Therefore, the accuracy of the determined target optimization coordinates of each single entity to be laid out can be improved.
[0133] In some embodiments, satisfying the first iteration stop condition includes one of the following: the same optimal solution appears continuously for the first preset number of times; the running duration of the iterative optimization exceeds the preset first running duration; the number of iterations of the iterative optimization reaches the preset first number of iterations; the optimal solution obtained by iteration satisfies the first service requirement.
[0134] Exemplarily, in the embodiment of the present application, satisfying the first iteration stop condition includes that the number of iterations of the iterative optimization reaches the preset first number of iterations.
[0135] Among them, the optimal solution is the N coordinates included in the individual with the lowest fitness value in the merged population; N is the number of single entities to be laid out in the plant area. Exemplarily, the first preset number of times is 10 times. If the individual with the lowest fitness value in the merged population from the j-th round to the j + 9-th round of the merged population is the N coordinates included in the target individual, then the first iteration stop condition is satisfied, where j is an integer greater than or equal to 1.
[0136] Exemplarily, the start time of the iterative optimization is the time when the first-generation population of the first round is obtained, and the difference between the current time and the start time of the iterative optimization is determined as the running duration of the iterative optimization.
[0137] Exemplarily, the number of iterations of the iterative optimization increases continuously. The process of iterative optimization in each round is as Figure 3As shown in the embodiments. For example, taking the first number of iterations as 5000 as an example, in the case where the number of iterations is 1, the first round of the iterative process is carried out. Since the number of iterations is 1 and has not reached 5000, the number of iterations is set to 2, and the second round of the iterative process is carried out. Since the number of iterations is 2 and has not reached 5000, the number of iterations is set to 3, and so on, until the number of iterations reaches 5000, and the 5000th round of the iterative process is carried out. Since 5000 is reached, the iteration ends. After the 5000th round of the iterative process, the individual with the lowest fitness value in the 5000th round of the merged population is determined as the optimal solution.
[0138] Exemplarily, the optimal solution iterated out satisfying the first service requirement may include at least one of the following: the dispersion of the N coordinates included in the optimal solution iterated out satisfies the dispersion requirement, the function value of the first cost function corresponding to the N coordinates included in the optimal solution iterated out conforms to the specific cost requirement, and the neatness of the N coordinates included in the optimal solution iterated out satisfies the requirement.
[0139] Exemplarily, the dispersion of the N coordinates satisfying the dispersion requirement may include: the dispersion of the N coordinates is greater than or equal to the preset dispersion, or the dispersion of the N coordinates is within the preset dispersion range.
[0140] Wherein, the function value of the first cost function corresponding to the N coordinates is calculated by the following method: substituting the N coordinates into the first cost function to obtain the function value of the first cost function.
[0141] Exemplarily, the function value conforming to the specific cost requirement includes: the function value is less than or equal to the specific cost value, or the function value is within the specific cost range.
[0142] Exemplarily, the neatness of the N coordinates satisfying the requirement may include: for each coordinate, obtaining another coordinate with the closest Euclidean distance to this coordinate, obtaining the connection line between each coordinate and the other coordinate. If the angle between this connection line and the horizontal axis is less than or equal to the preset angle, or the angle between this connection line and the vertical axis is less than or equal to the preset angle, it is determined that the neatness of the N coordinates satisfies the requirement. Among them, for example, the preset angle may be less than or equal to 30 degrees. For example, the preset angle may be 30 degrees, 15 degrees or 5 degrees.
[0143] In some embodiments, satisfying the second iteration stop condition includes one of the following: the same optimal solution appears continuously for the second preset number of times; the running duration of the iterative optimization exceeds the preset second running duration; the number of iterations of the iterative optimization reaches the preset second number of iterations; the optimal solution iterated out satisfies the second service requirement.
[0144] Among them, the explanation of the content included in satisfying the second iteration stop condition may be similar to the explanation of the content included in satisfying the first iteration stop condition, and will not be elaborated here.
[0145] In some embodiments, both the first preset number of times and the second preset number of times may be integers greater than or equal to 2. In some embodiments, the second preset number of times may be greater than or equal to the first preset number of times. In some embodiments, the second running duration may be greater than or equal to the first running duration. In some embodiments, the second number of iterations may be greater than or equal to the first number of iterations.
[0146] Exemplarily, the optimal solution iterated out satisfying the second service requirement may include at least one of the following: the dispersion degree of the N coordinates included in the iterated optimal solution meets the dispersion degree requirement, the function value of the second cost function corresponding to the N coordinates included in the iterated optimal solution conforms to the preset cost requirement, and / or the neatness degree of the N coordinates included in the iterated optimal solution meets the requirement.
[0147] In the technical solution of the embodiment of the present application, by setting the first iteration stop condition in the first stage using the spatial distance and the second iteration stop condition in the second stage using the path distance, it is possible to stop the iteration according to the set iteration stop condition, avoiding the situation that the iteration in the first stage and the second stage does not meet the requirements, resulting in inaccurate target optimization coordinates of each to-be-layout monomer finally iterated out. Therefore, the embodiment of the present application can improve the accuracy of the target optimization coordinates of each to-be-layout monomer determined.
[0148] Figure 5 It is a schematic flowchart of a plant layout method provided for the third embodiment. This method is applied to a computer device. Figure 5 The difference between the embodiment and Figure 1 the embodiment is that S103 includes S1031 and S1032.
[0149] S1031. According to the target optimization coordinates of each to-be-layout monomer and the sizes of each to-be-layout monomer obtained, draw a layout diagram of multiple to-be-layout monomers in the plant area, and determine the optimized path distance between every two to-be-layout monomers in the plant area in the layout diagram.
[0150] Exemplarily, the computer device automatically draws a layout diagram of multiple to-be-layout monomers in the plant area according to the target optimization coordinates of each to-be-layout monomer and the sizes of each to-be-layout monomer obtained, without the need for planners to draw on the drawing software.
[0151] Among them, the optimized path distance between every two to-be-layout monomers in the plant area in the layout diagram can be realized in the following way: determine the optimized path distance between every two to-be-layout monomers in the plant area in the layout diagram according to the target optimization coordinates of each to-be-layout monomer.
[0152] S1032. Determine the layout result of multiple monomers to be laid out in the factory area as the union of the layout diagram of the multiple monomers to be laid out in the factory area and the optimized path distances between every two monomers to be laid out in the factory area.
[0153] In some embodiments, the optimized path distances between every two monomers to be laid out in the factory area can be marked on the layout diagram of the factory area to obtain the layout result of the multiple monomers to be laid out in the factory area. In other embodiments, the file corresponding to the layout diagram of the multiple monomers to be laid out in the factory area and the file corresponding to the optimized path distances between every two monomers to be laid out in the factory area can be determined as the layout result of the multiple monomers to be laid out in the factory area. Exemplarily, the layout diagram of the factory area can be converted into a file in a preset format for output, and the optimized path distances between every two monomers to be laid out in the factory area can be converted into a file in a predetermined format for output.
[0154] In the technical solution of the embodiment of the present application, in the case of the last iteration to the target optimized coordinates of each monomer to be laid out, the computer device can automatically draw the layout diagram of the factory area, and can also determine the optimized path distances between every two monomers to be laid out in the layout diagram of the factory area. There is no need for planners to draw the layout diagrams of each monomer to be laid out in the factory area one by one in the drawing software, and there is no need for planners to obtain the path distances between every two monomers to be laid out in the factory area by measuring the layout diagram. Therefore, the embodiment of the present application can improve the efficiency of obtaining the factory area layout result.
[0155] In some embodiments, the method further includes: determining the passable area between every two monomers to be laid out according to the coordinates of every two monomers to be laid out in the factory area and the sizes of every two monomers to be laid out; performing path search in the passable area according to the obtained entrance and exit coordinates of every two monomers to be laid out to obtain the path distance between the two monomers to be laid out.
[0156] In this way, in the case of each iteration to the coordinates of each monomer to be laid out, the passable area between every two monomers to be laid out can be determined according to the coordinates of each monomer to be laid out in each iteration and the sizes of every two monomers to be laid out.
[0157] In some embodiments, the entrance and exit coordinates of every two monomers to be laid out can be preset.
[0158] In some embodiments, performing path search in the passable area can include performing path search in the passable area using the A* algorithm.
[0159] In the technical solution of the embodiment of the present application, by performing path search between the passable areas between every two monomers to be laid out, the path distance between the two monomers to be laid out is obtained, thus avoiding the problem of low path search efficiency caused by path search outside the passable area, and improving the search efficiency of path search.
[0160] In some embodiments, according to the coordinates of every two monomers to be laid out in the factory area and the sizes of every two monomers to be laid out, determining the passable area between every two monomers to be laid out includes: determining the respective passable areas of every two monomers to be laid out according to the coordinates of every two monomers to be laid out and the sizes of every two monomers to be laid out; determining the smallest rectangular area for covering the respective passable areas of every two monomers to be laid out; and removing the areas of the monomers to be laid out other than the two monomers to be laid out from the smallest rectangular area to obtain the passable area between every two monomers to be laid out.
[0161] Among them, the respective passable areas of every two monomers to be laid out may be the areas outside the respective areas of every two monomers to be laid out. For example, the areas obtained by extending the area of each monomer to be laid out by a first length in the length direction and a second length in the width direction are determined as the passable areas of each monomer to be laid out. For example, when the monomer to be laid out is a rectangle and the coordinates of the four vertices of the rectangle are (a1, b1), (a2, b1), (a1, b2), and (a2, b2), the coordinates of the four vertices of the passable area of the monomer to be laid out are (a1 - c, b1 + d), (a2 + c, b1 + d), (a1 - c, b2 - d), and (a2 + c, b2 - d).
[0162] In some embodiments, when there are areas of monomers to be laid out other than the two monomers to be laid out in the smallest rectangular area, the areas of the monomers to be laid out other than the two monomers to be laid out are removed from the smallest rectangular area to obtain the passable area between every two monomers to be laid out.
[0163] In some embodiments, when there are no areas of monomers to be laid out other than the two monomers to be laid out in the smallest rectangular area, the smallest rectangular area is determined as the passable area between every two monomers to be laid out.
[0164] In the technical solution of the embodiment of the present application, by defining the smallest rectangular area for covering the respective passable areas of every two monomers to be laid out, and removing the areas of the monomers to be laid out other than the two monomers to be laid out from the smallest rectangular area, the obtained passable area conforms to the actual passable area between every two monomers to be laid out, and the accuracy of the determined passable area between every two monomers to be laid out is improved.
[0165] In some embodiments, the method further includes: determining a plurality of combinations of monomers to be arranged according to a plurality of monomers to be arranged in the plant area; each combination of monomers to be arranged includes two monomers to be arranged, and different combinations of monomers to be arranged include different monomers to be arranged; calculating the path distances corresponding to the plurality of combinations of monomers to be arranged in parallel, to obtain the path distances between every two monomers to be arranged in the plant area.
[0166] Exemplarily, when the number of monomers to be arranged in the plant area is N, the number of combinations of monomers to be arranged is C(2, N).
[0167] In the embodiments of the present application, since the process of path search is long, and in each iteration process, it is necessary to search for the path between every two monomers to be arranged. Therefore, in order to avoid the problem of long time occupied by path search, by calculating the path distances corresponding to the plurality of combinations of monomers to be arranged in parallel, the path distances between every two monomers to be arranged in the plant area are obtained, so that the calculation of the path distances can be performed in parallel, reducing the long time occupied by path search.
[0168] In the technical solution of the embodiments of the present application, by calculating the path distances corresponding to the plurality of combinations of monomers to be arranged in parallel, the calculation process of the path distances between every two monomers in the plurality of combinations of monomers to be arranged is accelerated, thereby reducing the calculation duration of the path distances between every two monomers to be arranged. Therefore, the optimization efficiency of iterative optimization using the second cost function can be improved.
[0169] Figure 6 FIG. 13 is a schematic flowchart of a plant layout method provided for the fourth embodiment. This method is applied to a computer device. Figure 6 The difference between the embodiments Figure 1 and the embodiments is that before S101, it further includes S601 to S604.
[0170] S601. Determine the first personnel flow cost, the first facility flow cost, and the first logistics cost between every two monomers to be arranged according to the spatial distance between every two monomers to be arranged.
[0171] For example, the personnel flow cost, the facility flow cost, and the logistics cost between every two monomers to be arranged can be determined according to the building categories of every two monomers to be arranged. For example, when the two monomers to be arranged are a battery production plant and a warehouse respectively, there is only logistics transportation between the two monomers to be arranged, so the total personnel flow cost and facility flow cost are both 0. Another example is that when the two monomers to be arranged are both battery production plants, there is only logistics and facility flow between the two monomers to be arranged, so the personnel flow cost is 0. Still another example is that when the two monomers to be arranged are a battery production plant and a dormitory respectively, there is only personnel flow between the two monomers to be arranged, so the facility flow cost and the logistics cost are both 0.
[0172] Among them, the first personnel flow cost represents the total personnel flow cost determined by the spatial distance between every two single entities to be arranged in the factory building. For example, through the spatial distance between every two single entities to be arranged in the factory building, the total personnel flow distance in the factory building is determined, and the total personnel flow cost is determined according to the total personnel flow distance. The first facility flow cost represents the total facility flow cost determined by the spatial distance between every two single entities to be arranged in the factory building. The first logistics cost represents the total logistics cost determined by the spatial distance between every two single entities to be arranged in the factory building.
[0173] Taking the first personnel flow cost as an example, according to the spatial distance between every two single entities to be arranged and the building category of each single entity to be arranged, the personnel flow distance between every two single entities to be arranged in the factory building is determined, and the first personnel flow cost is determined according to the personnel flow distance.
[0174] S602. Determine the sum of the first personnel flow cost, the first facility flow cost, and the first logistics cost as the first cost function.
[0175] S603. Determine the second personnel flow cost, the second facility flow cost, and the second logistics cost between every two single entities to be arranged according to the path distance between every two single entities to be arranged.
[0176] Among them, the second personnel flow cost represents the total personnel flow cost determined by the path distance between every two single entities to be arranged in the factory building. The second facility flow cost represents the total facility flow cost determined by the path distance between every two single entities to be arranged in the factory building. The second logistics cost represents the total logistics cost determined by the path distance between every two single entities to be arranged in the factory building.
[0177] S604. Determine the sum of the second personnel flow cost, the second facility flow cost, and the second logistics cost as the second cost function.
[0178] In the technical solution of the embodiment of the present application, the cost function is the sum of the personnel flow cost, the facility flow cost, and the logistics cost. The determination method of the cost function is more in line with the actual situation of the factory area, improving the accuracy of the factory area layout.
[0179] In some embodiments, a genetic algorithm is used for layout planning. When calculating the objective function, the A* algorithm is adopted, and an adaptive penalty function and an elite retention strategy are used during genetic iteration. Within an acceptable time range, an optimal general layout plan can be obtained, reducing the requirements for layout personnel, improving layout efficiency, and accelerating layout freezing. In this way, the genetic algorithm is used to model and optimize the general layout with the total cost of three flows (logistics handling cost, facility flow cost, personnel flow cost) as the objective, the A* algorithm is used to calculate the distance between two monomers to be laid out, and parallel computing is used to accelerate the computing efficiency. At the same time, an adaptive penalty function method is adopted to jump out of the local optimal solution, and the elite retention strategy is used to accelerate the convergence of the algorithm, and finally a global optimal solution is obtained for business personnel to refer to, improving the planning efficiency of business personnel.
[0180] In some embodiments, the Manhattan distance evaluation is used to generate the initial population. In this way, high-quality initial solutions can be obtained, accelerating the convergence of the algorithm.
[0181] In some embodiments, when the A* algorithm calculates the shortest path, only the area around the monomers to be laid out is set as passable, and the rest of the factory area is set as an obstacle. In this way, the efficiency of the A* algorithm can be accelerated, and the algorithm calculation can be accelerated.
[0182] Figure 7 A flowchart of a factory area layout method provided for the fifth embodiment is shown as Figure 7 shown, and the method includes the following steps:
[0183] S701. Obtain the input data.
[0184] In some embodiments, the input sources required by the algorithm are diverse. To ensure that the algorithm obtains correct input, after the input data, it is necessary to check the data validity. The main data processing item is to organize the data fields such as structured tables and database records with appropriate data structures to make them the standard input of the program.
[0185] S702. Check whether the input data is abnormal.
[0186] For example, when the input data does not conform to the preset format, it is determined that the input data is abnormal. For another example, when there are conflicting data in the input data, it is determined that the conflicting data is abnormal. Exemplarily, the table fields of multiple related tables are matched and checked. If the check fails, an error message is prompted to return for modification. For another example, when the input data does not meet the preset requirements, it is determined that the input data is abnormal.
[0187] When the input data is abnormal, S703 is executed; when the input data is normal, S704 is executed.
[0188] S703. Indicate data modification.
[0189] After the data modification is completed, proceed to execute S701.
[0190] S704. Iterate through the genetic algorithm to obtain the target optimization coordinates of each monomer to be laid out.
[0191] This step includes three processes: problem encoding and modeling, algorithm iteration process, and stopping condition judgment and output.
[0192] In problem encoding and modeling, the key to the genetic algorithm is to determine the decision variables using a reasonable encoding method. In the present invention, the decision variables are mainly the placement positions of each rectangular monomer to be laid out, that is, to determine the coordinates of its center point. Therefore, the X-axis coordinate and Y-axis coordinate of the center point of each monomer to be laid out are used as decision variables ( ), and chromosome encoding is performed based on this.
[0193] The cost function value is determined according to the distance and the corresponding cost. There are two calculation methods for the distance. One is to use the Manhattan distance calculation method to determine the corresponding spatial distance between two monomers to be laid out ( and ) between the corresponding entrances and exits , and the other is to use the A* algorithm to determine the corresponding path distance between two monomers to be laid out ( and ) between the corresponding entrances and exits . is the sum of the costs of the three flows (logistics flow, facility flow, and personnel flow) between two monomers to be laid out ( and ).
[0194] Among them, the expression of the cost function is . Among them, is the number of monomers to be laid out in the factory area.
[0195] The handling of constraints is completed using the penalty function method. Since there are safety and fire protection setbacks between different types of buildings, and there are special setback specifications for some special monomers to be laid out. Thus, this constraint mainly includes the setback relationships between various factory buildings and monomers to be laid out.
[0196] The target constraint conditions include that each monomer to be laid out does not exceed the given factory area range. Exemplarily, the target constraint conditions include ; ; ; . Among them, is the length and width of the monomer to be laid out , are the length and width of the factory area respectively, , are respectively the abscissa and ordinate of the monomer to be laid out.
[0197] The target constraint conditions include the distance constraints between the monomers to be laid out. Exemplarily, the target constraint conditions include:
[0198] ;
[0199] Among them, represents the distance between two monomers to be laid out ( and ) at different positions, and is the minimum value of the constraint distance. are the length and width of the monomer to be laid out , and are the length and width of the monomer to be laid out . Among them, ; ; ; . Among them, ( ), ( ) are respectively , the central point coordinates of two monomers to be laid out, , are respectively the abscissa and ordinate of the monomer to be laid out , and , are respectively the abscissa and ordinate of the monomer to be laid out .
[0200] The algorithm is carried out in two stages during the iterative process.
[0201] In the first stage, after the algorithm completes the encoding, it will randomly initialize the initial population (the individuals in the population are the coordinates of the monomers to be laid out), and calculate the distance between the entrances and exits of each monomer to be laid out using the Manhattan distance, so as to obtain the objective function value and fitness value of each individual in the initial population. Then, it is judged whether the population stops evolving according to the set number of iterations (empirical value).
[0202] If the stop generation is not reached, individuals are selected from the parental population for crossover and mutation to obtain the offspring population, the parental and offspring populations are merged and the objective function value is calculated. A new generation of population is selected from the merged population by the selection algorithm to continue the above operations.
[0203] After the first stage reaches the initial number of iterations, the last generation of population is used as the prophet population in the second stage to continue the above operations, but at this time in the objective function The calculation is completed by an independent A* algorithm. To improve the calculation efficiency, this part utilizes the multi-core performance of the computer for parallel computing. When setting up the map, the A* algorithm only sets the area around the single entity to be laid out as passable, which can also significantly improve the performance. After each iteration is completed, it is judged by the algorithm stop condition. If the stop condition is met, the optimal solution is output; otherwise, the iteration continues.
[0204] The constraints in both stages of the algorithm are completed by the penalty function method. That is, for each individual in each generation, constraint checking is performed. If the constraint conditions are not met, a penalty function (the product of the cost function and the penalty coefficient) determined by the penalty coefficient is imposed on this individual. In order to enable the algorithm to find the global optimal solution, the embodiments of this application adopt an adaptive penalty coefficient setting method. The decision factor for determining the penalty coefficient is determined by the ratio of compliant solutions in the population. The higher the ratio, the smaller the penalty coefficient. This is beneficial for the algorithm to jump out of the local optimal solution. Among them, the penalty coefficient is inversely proportional to the ratio of compliant solutions.
[0205] In the judgment of the stop condition and output, in order to ensure that the algorithm can find the global optimal solution within a limited time, the stop condition of the algorithm is set to meet at least one of the following: the same optimal solution appears continuously for multiple times; the algorithm exceeds the maximum running time; the algorithm reaches the specified number of iterations; the algorithm result meets the business requirements.
[0206] Exemplarily, if any of the above conditions is met, the algorithm can stop. Then, the algorithm uses the drawing module to output the layout diagram and output a structured table with detailed distances (including Manhattan distance and A* distance) for the business personnel to refer to.
[0207] S705. Whether to re-run.
[0208] Among them, in the case where the target optimization coordinates of each single entity to be laid out do not meet the preset requirements, it is determined that the input data is incorrect and it is determined that re-running is required. In the case where the target optimization coordinates of each single entity to be laid out meet the preset requirements, it is determined that re-running is not required.
[0209] In the case where it is determined that re-running is required, go to S703. In the case where it is determined that re-running is not required, go to S706.
[0210] S706. Output the target optimization coordinates of each single entity to be laid out.
[0211] In some embodiments, the result output module mainly consists of a drawing part and a table generation part. The drawing part mainly decodes the received algorithm results (obtaining the target optimization coordinates of each monomer to be laid out through decoding), and uses the drawing function to draw the overall plane layout diagram. The table generation part post-processes the received algorithm results to obtain detailed three-stream routes (path distances) and data, facilitating the use of the results by business personnel. In some embodiments, the first stage of the genetic algorithm can also be replaced with a mathematical programming model. After using a solver to obtain an initial solution, it is used as the initial population input, and the iteration of the second stage of the genetic algorithm is directly started.
[0212] Figure 8 A schematic flow diagram of obtaining the target optimization coordinates of each monomer to be laid out through genetic algorithm iteration provided for some embodiments is as Figure 8 shown. This method is applied to a computer device, and the method includes:
[0213] S801. Randomly initialize the population.
[0214] S802. Whether the number of iterations has reached the set population iteration number (i.e., the above-mentioned first iteration number).
[0215] If the number of iterations has reached the set population iteration number, it is determined that the first stage of iteration is completed, and S803 is executed; if the number of iterations has not reached the set population iteration number, S804 is executed.
[0216] S803. Output the last generation of the population (i.e., the initial optimization coordinates of each monomer to be laid out mentioned above).
[0217] After S803, the iteration of the second stage is carried out, that is, the steps of S808 are continued to be executed.
[0218] S804. Generate an offspring population through crossover and mutation.
[0219] S805. Merge the parent and offspring populations.
[0220] S806. Evaluate the population using the Manhattan distance.
[0221] S807. Screen the new generation of population.
[0222] After S807, go to the steps of S802.
[0223] S808. Whether the convergence condition (i.e., the above-mentioned second iteration stop condition) is satisfied.
[0224] If the convergence condition is satisfied, it is determined that the second stage of iteration is completed, and S813 is executed; if the convergence condition is not satisfied, S809 is executed.
[0225] S809. Generate the offspring population through crossover mutation.
[0226] S810. Merge the parent and offspring populations.
[0227] S811. Evaluate the population in parallel using A*.
[0228] S812. Screen the new generation population.
[0229] After S812, go to the step of S808.
[0230] S813. Output the optimization result (i.e., the target optimized coordinates of each single entity to be layout).
[0231] Based on the same inventive concept, the embodiments of the present application further provide a plant layout device for implementing the above-mentioned plant layout method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the plant layout device provided below can refer to the limitations on the plant layout method in the above text, and will not be repeated here.
[0232] In an exemplary embodiment, Figure 9 is a schematic structural diagram of a plant layout device provided for some embodiments, as Figure 9 shown. The plant layout device 900 includes:
[0233] An optimization module 901, configured to obtain the initial iterative coordinates of multiple single entities to be layout in the plant area, perform iterative optimization on the initial iterative coordinates of each single entity to be layout using a first cost function until the first iteration stop condition is met, and obtain the initial optimized coordinates of each single entity to be layout; the first cost function represents the relationship between the plant layout cost and the spatial distance between every two single entities to be layout in the plant area, and the spatial distance is a function of the coordinates of the single entity to be layout; the optimization module is further configured to perform iterative optimization on the initial optimized coordinates of each single entity to be layout using a second cost function until the second iteration stop condition is met, and obtain the target optimized coordinates of each single entity to be layout that meet the preset cost requirements; the second cost function represents the relationship between the plant layout cost and the path distance between every two single entities to be layout in the plant area, the path distance is a function of the coordinates of the single entity to be layout, and the path distance between every two single entities to be layout represents the shortest passing distance between every two single entities to be layout bypassing other single entities to be layout; a layout generation module 902, configured to generate the layout result of multiple single entities to be layout in the plant area according to the target optimized coordinates of each single entity to be layout.
[0234] In some embodiments, the optimization module 901 includes a constraint determination unit and an optimization unit. The constraint determination unit is configured to obtain the setback distances between every two single entities to be arranged in the factory area, the factory area size, and the sizes of each single entity to be arranged; determine the target constraint conditions according to the setback distances between every two single entities to be arranged in the factory area, the factory area size, and the sizes of each single entity to be arranged. The optimization unit is configured to perform iterative optimization on the initial iterative coordinates of each single entity to be arranged by using the first cost function and the target constraint conditions, and perform iterative optimization on the initial optimized coordinates of each single entity to be arranged by using the second cost function and the target constraint conditions.
[0235] In some embodiments, the constraint determination unit is further configured to determine the setback constraint conditions according to the setback distances between every two single entities to be arranged in the factory area and the sizes of each single entity to be arranged; determine the factory area constraint conditions according to the factory area size and the sizes of each single entity to be arranged; and combine the setback constraint conditions and the factory area constraint conditions to obtain the target constraint conditions.
[0236] In some embodiments, the constraint determination unit is further configured to determine the first shortest distance in the horizontal direction and the second shortest distance in the vertical direction between every two single entities to be arranged according to the coordinates of every two single entities to be arranged and the sizes of every two single entities to be arranged; and determine the setback constraint conditions according to the relationship between the first shortest distance, the second shortest distance, and the setback distance.
[0237] In some embodiments, the constraint determination unit is further configured to determine the horizontal range and the vertical range of the factory area according to the factory area size; determine the positions of each single entity to be arranged in the horizontal direction and the vertical direction according to the coordinates of each single entity to be arranged and the sizes of each single entity to be arranged; and determine that the positions of each single entity to be arranged in the horizontal direction are within the horizontal range and the positions of each single entity to be arranged in the vertical direction are within the vertical range as the factory area constraint conditions.
[0238] In some embodiments, the constraint determination unit is further configured to obtain the building categories of each single entity to be arranged and the setback requirements for each building category; and determine the setback distances between every two single entities to be arranged in the factory area according to the building categories of each single entity to be arranged and the setback requirements for each building category.
[0239] In some embodiments, the optimization module 901 is further configured to obtain the i-th generation parent population; the parent population includes M individuals, each individual includes N coordinates, i is an integer greater than or equal to 1, M is an integer greater than or equal to 1, and N is the number of single entities to be arranged in the factory area; select at least some individuals from the i-th generation parent population, and perform crossover and mutation on at least some individuals to obtain the i-th generation offspring population; combine the i-th generation parent population and the i-th generation offspring population to obtain the i-th generation combined population; and select the (i + 1)-th generation parent population from the i-th generation combined population according to the target constraint conditions and according to the first cost function or the second cost function.
[0240] In some embodiments, the optimization module 901 is further configured to substitute the N coordinates in the m-th individual in the i-th round of merged population into the first cost function or the second cost function to obtain the function value of the m-th individual; m is an integer greater than or equal to 1 and less than or equal to M; when the N coordinates in the m-th individual satisfy the target constraint condition, determine the fitness value of the m-th individual according to the function value of the m-th individual; when the N coordinates in the m-th individual do not satisfy the target constraint condition, obtain the penalty coefficient of the i-th round, and determine the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual; select the (i + 1)-th generation parent population from the i-th round of merged population according to the sorting of the fitness values of each individual in the i-th round of merged population.
[0241] In some embodiments, the optimization module 901 is further configured to determine the overlapping area of the N to-be-layout monomers corresponding to the m-th individual according to the N coordinates in the m-th individual and the sizes of the to-be-layout monomers; determine the fitness value of the m-th individual according to the overlapping area, the penalty coefficient, and the function value of the m-th individual.
[0242] In some embodiments, the optimization module 901 is further configured to determine the number of individuals in the i-th round of merged population that satisfy the target constraint condition; determine the compliance ratio of the i-th round by taking the ratio of the number of individuals in the i-th round to the number of individuals included in the i-th round of merged population; determine the penalty coefficient of the i-th round according to the compliance ratio of the i-th round.
[0243] In some embodiments, satisfying the first iteration stop condition includes one of the following: the same optimal solution appears continuously for the first preset number of times; the running duration of the iterative optimization exceeds the preset first running duration; the number of iterations of the iterative optimization reaches the preset first number of iterations; the optimal solution obtained by iteration satisfies the first service requirement.
[0244] In some embodiments, satisfying the second iteration stop condition includes one of the following: the same optimal solution appears continuously for the second preset number of times; the running duration of the iterative optimization exceeds the preset second running duration; the number of iterations of the iterative optimization reaches the preset second number of iterations; the optimal solution obtained by iteration satisfies the second service requirement.
[0245] Wherein, the optimal solution is the N coordinates included in the individual with the lowest fitness value in the merged population; N is the number of to-be-layout monomers in the factory area.
[0246] In some embodiments, the layout generation module 902 is further configured to draw a layout diagram of multiple monomers to be laid out in the factory area according to the target optimized coordinates of each monomer to be laid out and the obtained sizes of each monomer to be laid out, and determine the optimized path distance between every two monomers to be laid out in the factory area in the layout diagram; determine the union of the layout diagram of multiple monomers to be laid out in the factory area and the optimized path distance between every two monomers to be laid out in the factory area as the layout result of multiple monomers to be laid out in the factory area.
[0247] In some embodiments, the optimization module 901 is further configured to determine the passable area between every two monomers to be laid out according to the coordinates of every two monomers to be laid out in the factory area and the sizes of every two monomers to be laid out; perform path search in the passable area according to the obtained entrance and exit coordinates of every two monomers to be laid out to obtain the path distance between the two monomers to be laid out.
[0248] In some embodiments, the optimization module 901 is further configured to determine the respective passable areas of every two monomers to be laid out according to the coordinates of every two monomers to be laid out and the sizes of every two monomers to be laid out; determine the smallest rectangular area for covering the respective passable areas of every two monomers to be laid out; and obtain the passable area between every two monomers to be laid out by removing the areas of the monomers to be laid out other than the two monomers to be laid out from the smallest rectangular area.
[0249] In some embodiments, the optimization module 901 is further configured to determine combinations of multiple monomers to be laid out in the factory area according to multiple monomers to be laid out in the factory area; each combination of monomers to be laid out includes two monomers to be laid out, and different combinations of monomers to be laid out include different monomers to be laid out; calculate the path distances corresponding to multiple combinations of monomers to be laid out in parallel to obtain the path distance between every two monomers to be laid out in the factory area.
[0250] In some embodiments, the factory area layout device 900 further includes a cost function establishment module, and the cost function establishment module is configured to determine the first personnel flow cost, the first facility flow cost, and the first logistics cost between every two monomers to be laid out according to the spatial distance between every two monomers to be laid out; determine the sum of the first personnel flow cost, the first facility flow cost, and the first logistics cost as the first cost function; determine the second personnel flow cost, the second facility flow cost, and the second logistics cost between every two monomers to be laid out according to the path distance between every two monomers to be laid out; and determine the sum of the second personnel flow cost, the second facility flow cost, and the second logistics cost as the second cost function.
[0251] The description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to the method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0252] Each module in the above factory area layout device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0253] In an exemplary embodiment, Figure 10 FIG. is a schematic structural diagram of a computer device provided for some embodiments. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through Wireless Fidelity (WIFI), a mobile cellular network, Near Field Communication (NFC), or other technologies. The computer program, when executed by the processor, implements a factory area layout method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0254] Those skilled in the art can understand that Figure 10 the structure shown in FIG. is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0255] For example, the computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any of the above embodiments are implemented.
[0256] In one embodiment, a computer-readable storage medium is provided. When the computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.
[0257] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.
[0258] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0259] The processor, each functional module or each functional unit in any embodiment of the present application may include any one or more of the following integrations: general-purpose processor, application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), central processing unit (CPU), graphics processing unit (GPU), embedded neural network processor (NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component, quantum computing-based data processing logic, artificial intelligence (AI) processor, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0260] The memory or computer-readable storage medium in any embodiment of the present application may include at least one of non-volatile memory and volatile memory. The non-volatile memory includes the integration of one or more of the following: Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, magnetic surface memory, optical disc, Compact Disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, volatile memory, etc. The volatile memory includes the integration of one or more of the following: Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc.
[0261] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.
[0262] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A factory layout method, characterized in that: The method comprises: Obtaining initial iteration coordinates of multiple units to be laid out within the plant area; Iteratively optimize the initial iteration coordinates of each of the to-be-arranged monomers using a first cost function until a first iteration stop condition is met, and obtain the initial optimized coordinates of each of the to-be-arranged monomers; the first cost function represents the relationship between the plant layout cost and the spatial distance between every two to-be-arranged monomers in the plant, and the spatial distance is a function of the coordinates of the to-be-arranged monomers; The second cost function is used to iteratively optimize the initial optimized coordinates of each of the to-be-arranged monomers until the second iteration stop condition is met, so as to obtain the target optimized coordinates of each of the to-be-arranged monomers that meet the preset cost requirements; the second cost function represents the relationship between the plant layout cost and the path distance between every two to-be-arranged monomers in the plant, the path distance being a function of the coordinates of the to-be-arranged monomers, and the path distance between every two to-be-arranged monomers represents the shortest travel distance between every two to-be-arranged monomers bypassing other to-be-arranged monomers; According to the target optimization coordinates of each of the to-be-arranged monomers, a layout result of the plurality of to-be-arranged monomers in the factory area is generated.
2. The method according to claim 1, characterized in that The iterative optimization of the initial iterative coordinates of each to-be-arranged monomer by using the first cost function, and the iterative optimization of the initial optimized coordinates of each to-be-arranged monomer by using the second cost function, include: Obtaining the setback distance between every two cells to be arranged in the plant area, the size of the plant area, and the size of each cell to be arranged; Determining target constraint conditions according to the setback distance between every two units to be arranged in the plant area, the size of the plant area, and the size of each unit to be arranged; The first cost function and the target constraint condition are used to iteratively optimize the initial iterative coordinates of each of the cells to be arranged, and the second cost function and the target constraint condition are used to iteratively optimize the initial optimized coordinates of each of the cells to be arranged.
3. The method according to claim 2, characterized in that Determining the target constraint condition according to the setback distance between every two cells to be arranged in the plant area, the size of the plant area and the size of each cell to be arranged includes: Determining a setback constraint condition according to the setback distance between every two cells to be arranged in the plant area and the size of each cell to be arranged; Determining plant area constraints according to the plant area size and the size of each of the units to be laid out; The setback constraint condition and the plant area constraint condition are combined to obtain the target constraint condition.
4. The method according to claim 3, characterized in that The step of determining the setback constraint condition according to the setback distance between every two cells to be arranged in the plant area and the size of each cell to be arranged includes: Determine a first shortest distance in the horizontal direction and a second shortest distance in the vertical direction between each two cells to be arranged according to the coordinates of each two cells to be arranged and the size of each two cells to be arranged; The back-off distance constraint condition is determined according to a relationship among the first shortest distance, the second shortest distance, and the back-off distance.
5. The method according to claim 3, characterized in that: The step of determining the plant area constraint conditions according to the plant area size and the size of each of the units to be laid out includes: Determine the horizontal and vertical extents of the plant area according to the size of the plant area; Determine the horizontal position and the vertical position of each of the to-be-arranged cells according to the coordinates of each of the to-be-arranged cells and the size of each of the to-be-arranged cells; The horizontal position of each of the to-be-arranged cells is within the horizontal range, and the vertical position of each of the to-be-arranged cells is within the vertical range, which are determined as the plant area constraint conditions.
6. The method according to claim 2, characterized in that The obtaining of the setback distance between every two cells to be arranged in the plant area includes: Obtaining the building category of each unit to be laid out and the setback requirements under each building category; The setback distance between every two units to be arranged in the factory area is determined according to the building category of each unit to be arranged and the setback requirements under each building category.
7. The method according to claim 2, characterized in that: The iterative optimization of the coordinates of each of the cells to be laid out includes: Obtaining the parent population of the i-th round; the parent population includes M individuals, each of the individuals includes N coordinates, i is an integer greater than or equal to 1, M is an integer greater than or equal to 1, and N is the number of the units to be laid out in the plant area; Selecting at least some individuals from the i-th round parent population, and performing crossover and mutation on the at least some individuals to obtain the i-th round offspring population; Merging the parent population of the i-th round and the offspring population of the i-th round to obtain a merged population of the i-th round; According to the target constraint and according to the first cost function or the second cost function, the i+1th round parent population is selected from the i-th round merged population.
8. The method according to claim 7, characterized in that The selecting the i+1th round parent population from the i-th round merged population according to the target constraint condition and the first cost function or the second cost function comprises: Substituting the N coordinates of the mth individual in the i-th round merged population into the first cost function or the second cost function to obtain the function value of the mth individual; m is an integer greater than or equal to 1 and less than or equal to M; When the N coordinates of the m-th individual satisfy the target constraint condition, determining the fitness value of the m-th individual according to the function value of the m-th individual; When the N coordinates of the m-th individual do not satisfy the target constraint condition, obtain the penalty coefficient of the i-th round, and determine the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual; According to the ranking of the fitness value of each individual in the i-th round merged population, the (i+1)-th round parent population is selected from the i-th round merged population.
9. The method according to claim 8, characterized in that Determining the fitness value of the m-th individual according to the penalty coefficient and the function value of the m-th individual includes: Determine the overlapping area of the N to-be-arranged monomers corresponding to the m-th individual according to the N coordinates of the m-th individual and the size of each to-be-arranged monomer; The fitness value of the m-th individual is determined according to the overlapping area, the penalty coefficient and the function value of the m-th individual.
10. The method according to claim 8, characterized in that The step of obtaining the penalty coefficient of the i-th round includes: Determine the number of individuals in the i-th round merged population that meet the target constraint condition; Determine the compliance ratio for round i by taking the ratio of the number of individuals in round i to the number of individuals included in the combined population for round i; A penalty coefficient for the i-th round is determined according to the i-th round compliance ratio.
11. The method according to any one of claims 1 to 10, characterized in that: The first iteration stop condition is satisfied, including one of the following: the same optimal solution appears for a first preset number of times in a row; the running time of the iterative optimization exceeds a preset first running time; The number of iterations of iterative optimization reaches a preset first number of iterations; The iterative optimal solution meets the first business requirement; The second iteration stopping condition is satisfied, including one of the following: the same optimal solution appears for a second preset number of times in a row; The running time of the iterative optimization exceeds the preset second running time; The number of iterations of iterative optimization reaches a preset second number of iterations; The iterative optimal solution meets the second business requirement; The optimal solution is the N coordinates of the individuals with the lowest fitness value in the merged population; N is the number of the units to be laid out in the plant area.
12. The method according to any one of claims 1 to 10, characterized in that: Generating layout results of the plurality of units to be arranged in the plant area according to the target optimization coordinates of each unit to be arranged includes: Draw a layout diagram of the plurality of cells to be arranged in the plant area according to the target optimization coordinates of each cell to be arranged and the acquired size of each cell to be arranged, and determine the optimized path distance between every two cells to be arranged in the plant area in the layout diagram; The union of the layout diagram of the plurality of units to be arranged in the factory and the optimized path distance between every two units to be arranged in the factory is determined as the layout result of the plurality of units to be arranged in the factory.
13. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Determine a passable area between each two units to be arranged according to the coordinates of each two units to be arranged in the plant area and the sizes of each two units to be arranged; According to the acquired entrance and exit coordinates of each two cells to be arranged, a path search is performed in the passable area to obtain the path distance between the two cells to be arranged.
14. The method according to claim 13, characterized in that The determining the passable area between each two units to be arranged according to the coordinates of each two units to be arranged in the plant area and the sizes of each two units to be arranged includes: Determining the passable areas of each of the two cells to be arranged according to the coordinates of each of the two cells to be arranged and the sizes of each of the two cells to be arranged; Determine a minimum rectangular area for covering the passable areas of each of the two cells to be laid out; The cell area to be arranged outside every two cells to be arranged is removed from the minimum rectangular area to obtain a passable area between every two cells to be arranged.
15. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Determine a plurality of combinations of monomers to be arranged according to the plurality of monomers to be arranged in the plant area; each combination of monomers to be arranged includes two monomers to be arranged, and different combinations of monomers to be arranged include different monomers to be arranged; The path distances corresponding to the plurality of combinations of cells to be arranged are calculated in parallel to obtain the path distance between every two cells to be arranged in the plant area.
16. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Determine, according to the spatial distance between each two units to be arranged, a first personnel flow cost, a first facility flow cost, and a first logistics cost between each two units to be arranged; determining the sum of the first personnel flow cost, the first facility flow cost, and the first logistics cost as the first cost function; Determine, according to the path distance between each two units to be arranged, a second personnel flow cost, a second facility flow cost, and a second logistics cost between each two units to be arranged; The sum of the second personnel flow cost, the second facility flow cost and the second logistics cost is determined as the second cost function.
17. A plant layout device, characterized in that: The plant layout device comprises: An optimization module, used to obtain initial iteration coordinates of multiple units to be arranged in the plant area, iteratively optimize the initial iteration coordinates of each unit to be arranged using a first cost function until a first iteration stop condition is met, and obtain the initial optimized coordinates of each unit to be arranged; the first cost function represents the relationship between the plant area layout cost and the spatial distance between every two units to be arranged in the plant area, and the spatial distance is a function of the coordinates of the units to be arranged; The optimization module is further used to iteratively optimize the initial optimized coordinates of each of the to-be-arranged monomers using a second cost function until a second iteration stop condition is met, thereby obtaining target optimized coordinates of each of the to-be-arranged monomers that meet preset cost requirements; the second cost function represents the relationship between the plant layout cost and the path distance between every two to-be-arranged monomers in the plant, the path distance being a function of the coordinates of the to-be-arranged monomers, and the path distance between every two to-be-arranged monomers represents the shortest travel distance between every two to-be-arranged monomers that bypasses other to-be-arranged monomers; The layout generation module is used to generate layout results of the plurality of units to be arranged in the factory area according to the target optimization coordinates of each unit to be arranged.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
20. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Multi-process route and layout joint optimization method for flexible workshop
CN112084704A
Logistics distribution center site selection method and device, and computer equipment
CN114547954A