A high school library building plane intelligent optimization method

By optimizing the floor plan of university library buildings using the APO algorithm, and combining the Levy flight coefficient, cooperation factor, and adaptive factor, the problem of time-consuming and labor-intensive optimization of university library building floor plans is solved. This achieves efficient global search and multi-objective optimization, improving the efficiency and convergence speed of the algorithm.

CN119783540BActive Publication Date: 2026-04-07HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The optimization of the floor plan of university library buildings is a complex and time-consuming task. Existing intelligent optimization methods lack global search capabilities and multi-objective optimization capabilities, and rely on gradient information.

Method used

The APO algorithm is used to optimize the architectural plan of a university library. The global search capability is enhanced by the Levy flight coefficient, cooperation factor and adaptive factor. Combined with the simulation analysis of lighting, thermal comfort and pedestrian flow, the design constraints are avoided and the optimized design scheme is output.

Benefits of technology

It improves the global search capability and multi-objective optimization capability of university library building plans, avoids local optima, can handle complex nonlinear and nonconvex optimization problems, and improves the efficiency and convergence speed of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783540B_ABST
    Figure CN119783540B_ABST
Patent Text Reader

Abstract

This invention relates to an intelligent optimization method for the floor plan of a university library building. The invention pertains to the technical field of building floor plan optimization methods. It determines design parameters and initializes the design population. Based on the initial design population, a Levy flight coefficient is introduced, and a new position vector is obtained by combining the global optimal solution with another randomly selected design scheme, resulting in a new design population. A cooperation factor F and an adaptive factor f are introduced, and design constraints are avoided by moving towards a safe region. The scheme is updated, and the top 50 individuals are selected to form a new population. The previously obtained design schemes are evaluated, selected, and iterated based on their fitness functions. The analysis results are then output. This invention enhances global search capabilities, avoids local optima, improves multi-objective optimization capabilities, does not rely on gradient information, and can handle complex nonlinear and nonconvex optimization problems.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of building plane optimization methods, and is an intelligent optimization method for a building plane of a university library. BACKGROUND

[0002] A university library is different from a public library and is mainly used by teachers and students in a university. In recent years, with the digitization of books and data, the function of a university library gradually evolves in the direction of public self-study, discussion and conference. Consequently, the function of the building plane of a university library is reformed and optimized. As a large public building, a university library has the characteristics of multi-function, complex flow lines and complex lighting requirements. Therefore, the optimization requirement of the building plane of a university library is complex, time-consuming and labor-consuming. An intelligent optimization method for a building plane can greatly help the optimization of the building plane of a university library.

[0003] APO algorithm is particularly suitable for the automation of prompt engineering, can significantly improve the performance of prompt and has interpretability. Compared with traditional methods, APO does not need to adjust hyperparameters or model training, thereby simplifying the optimization process. In addition, the flexibility of the APO algorithm enables it to adapt to various complex problems and is suitable for machine learning, firewall rule configuration, resource scheduling and the like. SUMMARY

[0004] In view of the deficiencies of the prior art, the application provides an intelligent optimization method for a building plane of a university library, which aims at various shortcomings of the current intelligent optimization method for a building plane.

[0005] The application provides the following technical scheme:

[0006] An intelligent optimization method for a building plane of a university library, the method comprises the following steps:

[0007] Step 1: determining design parameters and initializing a design population;

[0008] Step 2: introducing a Levy flight coefficient according to the initial design population, combining a global optimal solution and another randomly selected design scheme to obtain a new position vector and a new design population;

[0009] Levy The step length generation expression is specifically as follows:

[0010]

[0011] Levy The flight step length generation determines the movement amplitude of a design individual in a search space, wherein, , is a scale parameter determined by Levy flight parameters β :

[0012]

[0013] in, Gamma It is the gamma function. β It is control Levy The parameters for flight distribution typically range from 1 to 2;

[0014] Step 3: Introduce the cooperation factor F and update the design scheme position based on the three randomly selected design scheme positions;

[0015] Step 4: Introduce adaptive factors f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum.

[0016] Step 5: Avoid violating design constraints by moving to the safe zone;

[0017] Step 6: Merge the design position update schemes obtained in Steps 3-5 and select the top 50 individuals to form a new population; evaluate, select, and iterate the design schemes obtained in the previous steps based on their fitness functions;

[0018] Step 7: Output the optimized design scheme and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results.

[0019] Preferably, step 2 specifically comprises:

[0020] Step 2.1: Calculate the new location for each design scheme This allows the algorithm to move towards the global optimum, Best. The global search capability is enhanced by introducing the Levy flight coefficient, Levy(λ), which is expressed as follows:

[0021]

[0022] Where α is a random number; Levy(λ) is a random walking step size generated based on the Levy step size, and λ is a parameter of Levy flight.

[0023] Step 2.2: By combining the globally optimal solution with another randomly selected design scheme Explore new design spaces, represented by the following formula:

[0024]

[0025] in, S It is the speed coefficient, which controls the magnitude of changes in the design scheme.

[0026] Step 2.3: Merge the candidate positions obtained in the first two steps into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal results in both stages, the equation is expressed as follows:

[0027]

[0028] The sort function sorts the individuals in the new population based on their fitness values, from smallest to largest, and selects the top 50 individuals to form the new population. .

[0029] Preferably, step 3 specifically comprises:

[0030] A cooperation factor F is introduced to control the degree to which the design scheme converges with other schemes. The current design scheme is refined by combining the positions of three randomly selected design schemes, and its position update is expressed by the following formula:

[0031]

[0032] in, , , These are candidate solutions randomly selected from the current population, and r1≠r2≠r3. ≠ When rand < 0.5, the algorithm uses the cooperation factor F to explore potential design possibilities through random movement; when rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design scheme.

[0033] Preferably, step 4 specifically comprises:

[0034] Introducing adaptive factors f, Adjust the search intensity based on the current iteration number by adjusting the step size. f To enhance the search for the global optimum, the position update equation is as follows:

[0035]

[0036] f The search strength function is adjusted based on the current iteration number as follows:

[0037]

[0038] Where T represents the total number of iterations, t represents the current iteration number, and rand is a random number that introduces randomness to f.

[0039] Preferably, step 5 specifically comprises:

[0040] To avoid violating design constraints, the position is updated by moving towards a safe region, as expressed by the following formula:

[0041]

[0042] in Rand is a random number uniformly distributed between 0 and 1. Safe is a safe zone to avoid problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change its current position significantly. When rand < 0.5, the algorithm actively avoids design constraints and randomly changes its position to avoid potential dangers.

[0043] Preferably, step 6 specifically comprises:

[0044] Step 6.1: Merge the obtained candidate positions into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal result in the three stages, the equation is expressed as follows:

[0045]

[0046]

[0047]

[0048] Step 6.2: Evaluate the design scheme obtained in the previous step based on its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, the area ratio of each functional space, and the area ratio of natural lighting. Its mathematical expression is as follows:

[0049]

[0050] in, 、 、 These are weighting coefficients; , , These are evaluation functions representing space utilization rate, the area ratio of each functional space, and the area ratio of natural lighting, respectively.

[0051] If the design solution does not yet meet all design goals and constraints, the iteration returns to the design exploration phase to continue searching for a better solution.

[0052] Preferably, step 7 specifically comprises:

[0053] Step 7.1: Develop a script in Python using the ezdxf library to integrate the algorithm results, convert the optimized design parameters extracted from the APO algorithm into CAD graphic elements, automate the CAD task, and save the created graphics as DXF or DWG format files, i.e., output as CAD format files;

[0054] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;

[0055] Step 7.3: Using Python and the rhinoscriptsyntax library, write a script to read JSON format data, create a 3DM format file, and output the 3DM file;

[0056] Step 7.4: Use Rhino's Python API and Grasshopper's Python scripting capabilities (using the ghpythonlib library) to write a script to automate the following four steps: Open Rhino and load the 3DM file; Set up Ladybug, Honeybee, and Human components in Grasshopper; Pass the geometric information from the 3DM file to the Ladybug, Honeybee, and Human components; Perform lighting, thermal comfort, and pedestrian flow simulation analyses respectively; Run the analyses and obtain the results.

[0057] Step 7.5: Output the analysis results as a JPG file.

[0058] A smart optimization system for the floor plan of a university library, the system comprising:

[0059] An initialization module, which determines design parameters and designs population initialization;

[0060] The selection module, based on the initial design population, introduces the Levy flight coefficient, combines the global optimal solution with another randomly selected design scheme to obtain a new position vector and a new design population;

[0061] The cooperation module introduces a cooperation factor F, which updates the design scheme position by combining the positions of three randomly selected design schemes.

[0062] An adaptive module that introduces an adaptive factor. f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum.

[0063] By moving to a safe area, violations of design constraints can be avoided;

[0064] The selection iteration module merges the design position update schemes and selects the first 50 individuals to form a new population; the design schemes obtained in the previous step are evaluated, selected, and iterated according to their fitness functions;

[0065] The output module outputs the optimized design scheme and combines it with Grasshopper to perform simulation analysis of lighting, thermal comfort, and pedestrian flow, and outputs the analysis results.

[0066] A computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement an intelligent optimization method for the architectural plan of a university library.

[0067] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a method for intelligent optimization of the architectural plan of a university library.

[0068] The present invention has the following beneficial effects:

[0069] Compared with the prior art, the present invention:

[0070] Compared to existing intelligent optimization methods for building floor plans, the intelligent optimization method for university library building floor plans based on the APO algorithm proposed in this invention enhances global search capabilities, avoids local optima, and improves multi-objective optimization capabilities. It does not rely on gradient information and can handle complex nonlinear and nonconvex optimization problems. Compared to the traditional PSO algorithm, the APO algorithm has an adaptive mechanism, eliminating the need for manual parameter adjustment. It can dynamically adjust weight and velocity factors according to the characteristics of the problem, accelerating the particle search speed and allowing the algorithm to converge to the optimal solution more quickly. Furthermore, it is easily parallelized, which can improve the efficiency of the algorithm. Attached Figure Description

[0071] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0072] Figure 1 The diagram shown is a flowchart of the overall solution of this invention.

[0073] Figure 2 The diagram shown is a functional space diagram of the present invention.

[0074] Figure 3 The diagram shown is a schematic diagram of the present invention. Detailed Implementation

[0075] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0076] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0077] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0078] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0079] The present invention will be described in detail below with reference to specific embodiments. Specific Implementation Example 1:

[0081] according to Figures 1 to 3 As shown, the specific optimization technical solution adopted by the present invention to solve the above-mentioned technical problems is: The present invention relates to an intelligent optimization method for the architectural plan of a university library.

[0082] A method for intelligent optimization of the floor plan of a university library building, the method comprising the following steps:

[0083] Step 1: Determine the design parameters and design the population initialization;

[0084] Step 2: Based on the initial population design, introduce the Levy flight coefficient, combine the global optimal solution and another randomly selected design scheme to obtain a new position vector, and obtain a new design population;

[0085] Levy The step size generation expression is as follows:

[0086]

[0087] Levy The flight stride length generation determines the range of movement of the designed individual in the search space, where, , It is by Levy Flight parameters β Determined scale parameters:

[0088]

[0089] in, Gamma It is the gamma function. β It is control Levy The parameters for flight distribution typically range from 1 to 2;

[0090] Step 3: Introduce the cooperation factor F and update the design scheme position based on the three randomly selected design scheme positions;

[0091] Step 4: Introduce adaptive factors f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum.

[0092] Step 5: Avoid violating design constraints by moving to the safe zone;

[0093] Step 6: Merge the design position update schemes obtained in Steps 3-5 and select the top 50 individuals to form a new population; evaluate, select, and iterate the design schemes obtained in the previous steps based on their fitness functions;

[0094] Step 7: Output the optimized design scheme and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results. Specific Implementation Example 2:

[0096] The only difference between Embodiment 2 and Embodiment 1 of this application is that:

[0097] Step 2 specifically involves:

[0098] Step 2.1: Calculate the new location for each design scheme This allows the algorithm to move towards the global optimum, Best. The global search capability is enhanced by introducing the Levy flight coefficient, Levy(λ), which is expressed as follows:

[0099]

[0100] Where α is a random number; Levy(λ) is a random walking step size generated based on the Levy step size, and λ is a parameter of Levy flight;

[0101] Step 2.2: By combining the globally optimal solution with another randomly selected design scheme Explore new design spaces, represented by the following formula:

[0102]

[0103] in, S It is the speed coefficient, which controls the magnitude of changes in the design scheme;

[0104] Step 2.3: Merge the candidate positions obtained in the first two steps into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal results in both stages, the equation is expressed as follows:

[0105]

[0106] The sort function sorts the individuals in the new population based on their fitness values, from smallest to largest, and selects the top 50 individuals to form the new population. . Specific Implementation Example 3:

[0108] The only difference between Embodiment 3 and Embodiment 2 of this application is that:

[0109] Step 3 specifically involves:

[0110] A cooperation factor F is introduced to control the degree to which the design scheme converges with other schemes. The current design scheme is refined by combining the positions of three randomly selected design schemes, and its position update is expressed by the following formula:

[0111]

[0112] in, , , These are candidate solutions randomly selected from the current population, and r1≠r2≠r3. ≠ When rand < 0.5, the algorithm uses the cooperation factor F to explore potential design possibilities through random movement; when rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design scheme. Specific Implementation Example 4:

[0114] The only difference between Embodiment 4 and Embodiment 3 of this application is that:

[0115] Step 4 specifically involves:

[0116] Introducing adaptive factors f, Adjust the search intensity based on the current iteration number by adjusting the step size. f To enhance the search for the global optimum, the position update equation is as follows:

[0117]

[0118] f The search strength function is adjusted based on the current iteration number as follows:

[0119]

[0120] Where T represents the total number of iterations, t represents the current iteration number, and rand is a random number that introduces randomness to f. Specific Implementation Example 5:

[0122] The difference between Embodiment 5 and Embodiment 4 of the present invention lies only in:

[0123] Step 5 specifically involves:

[0124] To avoid violating design constraints, the position is updated by moving towards a safe region, as expressed by the following formula:

[0125]

[0126] in Rand is a random number uniformly distributed between 0 and 1. Safe is a safe zone to avoid problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change its current position significantly. When rand < 0.5, the algorithm actively avoids design constraints and randomly changes its position to avoid potential dangers. Specific Implementation Example Six:

[0128] The difference between Embodiment Six and Embodiment Five of the present invention lies only in:

[0129] Step 6 specifically involves:

[0130] Step 6.1: Merge the obtained candidate positions into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal result in the three stages, the equation is expressed as follows:

[0131]

[0132]

[0133]

[0134] Step 6.2: Evaluate the design scheme obtained in the previous step based on its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, the area ratio of each functional space, and the proportion of natural lighting area. Its mathematical expression is as follows:

[0135]

[0136] in, 、 、 These are weighting coefficients; , , Evaluation functions representing space utilization rate, area ratio of each functional space, and area ratio of natural lighting, respectively;

[0137] If the design solution does not yet meet all design goals and constraints, the iteration returns to the design exploration phase to continue searching for a better solution. Specific Implementation Example 7:

[0139] The difference between Embodiment Seven and Embodiment Six of the present invention lies only in:

[0140] Step 7 specifically includes:

[0141] Step 7.1: Develop a script in Python using the ezdxf library to integrate the algorithm results, convert the optimized design parameters extracted from the APO algorithm into CAD graphic elements, automate the CAD task, and save the created graphics as DXF or DWG format files, i.e., output as CAD format files;

[0142] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;

[0143] Step 7.3: Using Python and the rhinoscriptsyntax library, write a script to read JSON format data, create a 3DM format file, and output the 3DM file;

[0144] Step 7.4: Using Rhino's Python API and Grasshopper's Python scripting capabilities, write a script to automate the following four steps: Open Rhino and load the 3DM file; Set up Ladybug, Honeybee, and Human components in Grasshopper; Pass the geometric information from the 3DM file to the Ladybug, Honeybee, and Human components; Perform lighting, thermal comfort, and pedestrian flow simulation analyses respectively; Run the analyses and obtain the results.

[0145] Step 7.5: Output the analysis results as a JPG file. Specific Implementation Example 8:

[0147] The difference between Embodiment 8 and Embodiment 7 of the present invention lies only in:

[0148] This invention provides an intelligent optimization system for the floor plan of a university library, the system comprising:

[0149] An initialization module, which determines design parameters and designs population initialization;

[0150] The selection module, based on the initial design population, introduces the Levy flight coefficient, combines the global optimal solution with another randomly selected design scheme to obtain a new position vector and a new design population;

[0151] The cooperation module introduces a cooperation factor F, which updates the design scheme position by combining the positions of three randomly selected design schemes.

[0152] An adaptive module that introduces an adaptive factor. f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum.

[0153] By moving to a safe area, violations of design constraints can be avoided;

[0154] The selection iteration module merges the design position update schemes and selects the first 50 individuals to form a new population; the design schemes obtained in the previous step are evaluated, selected, and iterated according to their fitness functions;

[0155] The output module outputs the optimized design scheme and combines it with Grasshopper to perform simulation analysis of lighting, thermal comfort, and pedestrian flow, and outputs the analysis results. Specific Implementation Example Nine:

[0157] The difference between Embodiment Nine and Embodiment Eight of the present invention lies only in:

[0158] The present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a method for intelligent optimization of the architectural plan of a university library. Specific Implementation Example 10:

[0160] The only difference between Embodiment 10 and Embodiment 9 of the present invention is that:

[0161] This invention provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements a method for intelligent optimization of the architectural plan of a university library. Specific Implementation Example Eleven:

[0163] The only difference between Embodiment Eleven and Embodiment Ten of this invention is that:

[0164] This invention addresses the various shortcomings of current intelligent optimization methods for building plans. The purpose of this invention is to propose a more comprehensive, objective, and efficient intelligent optimization method for university library building plans based on the APO algorithm.

[0165] This invention proposes an intelligent optimization method for the floor plan of university library buildings based on the APO algorithm. The invention provides the following technical solutions:

[0166] A method for intelligent optimization of the floor plan of a university library building based on the APO algorithm, the method comprising the following steps:

[0167] Step 1: Define design parameters and design population initialization.

[0168] Step 2: Based on the initial population design, introduce the Levy flight coefficient to enhance the global search capability of the algorithm, and combine the global optimal solution with another randomly selected design scheme to obtain a new position vector, thus obtaining a new design population;

[0169] Step 3: Based on the design population obtained in Step 3, introduce the cooperation factor F, and update the design scheme positions by combining the positions of the three randomly selected design schemes;

[0170] Step 4: Introduce an adaptive factor f to adjust the search intensity based on the current iteration number, thereby enhancing the search for the global optimum.

[0171] Step 5: Avoid violating design constraints by moving to the Safe area.

[0172] Step 6: Merge the design position update schemes obtained in Steps 3-5, and select the top 50 individuals to form a new population; for the design schemes obtained in the previous steps, perform design evaluation, selection, and iteration based on their fitness functions;

[0173] Step 7: Output the optimized design scheme and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results;

[0174] Preferably, step 1 specifically comprises:

[0175] Step 1.1: Define the design parameters in the APO algorithm, including the basic attributes of each functional space. Functional spaces include entrance spaces (cashier hall, information retrieval and consultation service space, lobby reception and management space), paper reading spaces (general open-shelf book stacks, periodical reading rooms, special document reading areas, professional document reading areas), research spaces (self-study reading areas, individual research rooms, multi-person research rooms, research desks), public activity spaces (multi-functional activity hall, exhibition area, living service area), information reading spaces (electronic reading room, multimedia reading room), librarian use spaces (technical service area, administrative management area, information technology area), and circulation spaces. Basic attributes include the area (unit: square meters), location (represented using location vectors), and distance (unit: meters) of each space.

[0176] Step 1.2; Convert the initial design scheme into a digital format, including CAD files and Rhino models. For CAD files, export them in DXF or DWG format: In AutoCAD, export the floor plan as DXF or DWG format, which contains all the geometric information and attribute data of the design scheme.

[0177] Parsing DXF / DWG files: Use specialized parsing tools or programming languages ​​(Python's ezdxf library) to read DXF / DWG files and extract parameters from the design scheme, including room dimensions (length, width, height), traffic core location, stairwell location, location and dimensions (length, width, height) of internal partitions, and location and dimensions (length, width, height) of doors and windows.

[0178] Convert to an algorithm-readable format: Convert the extracted data into a format that the algorithm can read, such as CSV, JSON, or XML, which contains the specific values ​​of all parameters in the design scheme.

[0179] So that the APO algorithm can read the specific values ​​and parameters in the design scheme;

[0180] Develop a data import interface in the APO algorithm to read the converted files described above;

[0181] Implement data parsing functionality in the interface to map data from the file to variables and parameters in the algorithm;

[0182] Step 1.3: Based on the determined design parameters, define a data structure to store these parameters. In programming, this requires defining a class or data structure (list or dictionary) containing all necessary fields.

[0183] Write a function to parse data files. Write a function to read CSV, JSON, or XML files and convert them into data structures (such as lists or dictionaries) in your chosen programming language.

[0184] Step 1.4: Map the parsed data to the parameters in the APO algorithm, which involves assigning values ​​from the data structure to variables in the algorithm;

[0185] Develop a data import interface for the APO algorithm. This interface uses the functions described above to read and parse data files and map the data to algorithm parameters.

[0186] Test the data import interface to ensure it can correctly read files, parse data, and map data to algorithm parameters;

[0187] Integrate the data interface into the initialization process of the APO algorithm.

[0188] Initialize the system based on the imported data, creating an initial population containing multiple design schemes. Each design scheme (individual design) represents a potential architectural floor plan, with its parameter range defined by the design parameters.

[0189] The initialization process can be represented as:

[0190] (1)

[0191] in, Represents the initial position vector of the i-th design scheme, and represents the specific values ​​of all parameters in the design scheme; A random number between 0 and 1 is generated to assign a random initial value to each design parameter, thereby increasing the diversity of the population. and These represent the upper and lower bounds of the design parameters, respectively. They define the range of values ​​for each design parameter, ensuring that the design scheme conforms to the constraints of actual architectural design.

[0192] Preferably, step 2 specifically comprises:

[0193] Step 2.1: Calculate the new location for each design scheme This allows the algorithm to move towards the global optimum, Best. The global search capability is enhanced by introducing the Levy flight coefficient, Levy(λ), which is expressed as follows:

[0194] (2)

[0195] Here, α is a random number that simulates the degree to which the designer draws inspiration from the current best design solution; Levy(λ) is a random walking step size generated based on the Levy step size, and λ is a parameter of Levy flight that controls the shape of the step size distribution.

[0196] Step 2.2: By combining the globally optimal solution with another randomly selected design scheme Explore new design spaces, represented by the following formula:

[0197] (3)

[0198] Where S is the speed coefficient, which controls the magnitude of changes in the design scheme.

[0199] Step 2.3: Merge the candidate positions obtained in the first two steps into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal results in both stages, the equation is expressed as follows:

[0200] (4)

[0201] (5)

[0202] (6)

[0203] The sort function sorts the individuals in the new population based on their fitness values, from smallest to largest, and selects the top 50 individuals to form the new population. .

[0204] Preferably, step 3 specifically comprises:

[0205] A cooperation factor F is introduced to control the degree to which the design scheme converges with other schemes. The current design scheme is refined by combining the positions of three randomly selected design schemes, and its position update is expressed by the following formula:

[0206] (7)

[0207] Variables r1, r2, and r3 are random integers between 1 and N-1 (excluding i). , , These are candidate solutions randomly selected from the current population, and r1≠r2≠r3.

[0208] ≠ When rand < 0.5, the algorithm uses the cooperation factor F to explore potential design possibilities through random movement. When rand ≥ 0.5, the algorithm quickly changes position after discovering a feasible design possibility. The Levy flight factor is used here to enhance the algorithm's ability to quickly find design possibilities and ensure the effective selection of possible design solutions.

[0209] Preferably, step 4 specifically comprises:

[0210] An adaptive factor f is introduced to adjust the search intensity based on the current iteration number. The step size f is adjusted to enhance the exploration of the global optimum. The position update equation is shown below:

[0211] (8)

[0212] f. The search strength function is adjusted based on the current iteration number as follows:

[0213] (9)

[0214] Where T represents the total number of iterations, t represents the current iteration number, and rand is a random number that introduces randomness to f.

[0215] Preferably, step 5 specifically comprises:

[0216] To avoid violating design constraints, the position is updated by moving towards the safe region (Safe).

[0217] (10)

[0218] in Rand is a random number uniformly distributed between 0 and 1. Safe is a safe zone to avoid problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change its current position significantly. When rand < 0.5, the algorithm actively avoids design constraints and randomly changes its position to avoid potential dangers.

[0219] Preferably, step 6 specifically comprises:

[0220] Step 6.1: Merge the obtained candidate positions into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal result in the three stages, the equation is expressed as follows:

[0221] (11)

[0222] (12)

[0223] (13)

[0224] Step 6.2: Evaluate the design scheme obtained in the previous step based on its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, the area ratio of each functional space, and the area ratio of natural lighting. Its mathematical expression is as follows:

[0225] (14)

[0226] Among them, w1, w2, and w3 are weighting coefficients; , , These are evaluation functions representing space utilization rate, the area ratio of each functional space, and the area ratio of natural lighting, respectively.

[0227] If the design solution does not yet meet all design goals and constraints, the iteration returns to the design exploration phase to continue searching for a better solution.

[0228] Preferably, step 7 specifically comprises:

[0229] Step 7.1: Develop a script in Python using the ezdxf library to integrate the algorithm results, convert the optimized design parameters extracted from the APO algorithm into CAD graphic elements, automate the CAD task, and save the created graphics as DXF or DWG format files, i.e., output as CAD format files;

[0230] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;

[0231] Step 7.3: Using Python and the rhinoscriptsyntax library, write a script to read JSON format data, create a 3DM format file, and output the 3DM file;

[0232] Step 7.4: Use Rhino's Python API and Grasshopper's Python scripting capabilities (using the ghpythonlib library) to write a script to automate the following four steps: Open Rhino and load the 3DM file, set up the Ladybug, Honeybee, and Human components in Grasshopper, pass the geometry information from the 3DM file to the Ladybug, Honeybee, and Human components, run the analysis and obtain the results;

[0233] Step 7.5: Output the analysis results as a JPG file.

[0234] Preferably, the Levy flight stride generation expression is as follows:

[0235] (15)

[0236] Levy flight stride generation determines the range of movement of the designed individual in the search space, where... , It is a scale parameter determined by the Levy flight parameter β.

[0237] (16) Γ is the gamma function, and β is a parameter that controls the Levy flight distribution, usually taking a value between 1 and 2.

[0238] Preferably, each fitness function is as follows:

[0239] The space utilization evaluation function is: ; It refers to the effective usable area inside the library; This refers to the total floor area of ​​the library.

[0240] The evaluation function for the area ratio of each functional space is as follows: ; It is the actual area of ​​the i-th functional space; is the ideal area of ​​the i-th functional space; n is the total number of functional spaces;

[0241] The evaluation function for the proportion of naturally lit area is: ; It is the area that can receive natural light; It is the total floor area of ​​the library.

[0242] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or N embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of the present invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified. Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0243] The above description is merely a preferred embodiment of a method for intelligent optimization of the floor plan of a university library building. The scope of protection for this method is not limited to the above embodiments; all technical solutions falling within this conceptual framework are within the scope of protection of this invention. It should be noted that for those skilled in the art, any improvements and variations made without departing from the principles of this invention should also be considered within the scope of protection of this invention.

Claims

1. A method for intelligent optimization of the architectural plan of a university library, characterized by: The method includes the following steps: Step 1: Determine the design parameters and design the population initialization; The design parameters in the APO algorithm are clearly defined as follows: the basic attributes of each functional space, including entrance space, paper reading space, research space, public activity space, information reading space, staff use space, and circulation space; the basic attributes include the area, location, and distance of each space. Step 2: Based on the initial population design, introduce the Levy flight coefficient, combine the global optimal solution and another randomly selected design scheme to obtain a new position vector, and obtain a new design population; Levy The step size generation expression is as follows: Levy The flight stride length generation determines the range of movement of the designed individual in the search space, where, , It is by Levy Flight parameters β Determined scale parameters: in, Γ It is the gamma function. β It is control Levy The parameters for flight distribution take values ​​between 1 and 2; Step 2 specifically involves: Step 2.1: Calculate the new location for each design scheme This allows it to move towards the global optimum (Best) by introducing the Levy flight coefficient (Levy). β To enhance the algorithm's global search capability, the following formula can be used: Where α is a random number; Levy( β () is a random walking step size generated based on the Levy step size. β These are the parameters for Levy's flight; Step 2.2: By combining the globally optimal solution with another randomly selected design scheme Explore new design spaces, represented by the following formula: in, S It is the speed coefficient, which controls the magnitude of changes in the design scheme; Step 2.3: Merge the candidate positions obtained in the first two steps into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal results in both stages, the equation is expressed as follows: The sort function sorts the individuals in the new population based on their fitness values, from smallest to largest, and selects the top 50 individuals to form the new population. ; Step 3: Introduce the cooperation factor F and update the design scheme position based on the three randomly selected design scheme positions; Step 4: Introduce adaptive factors f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum. Step 5: Avoid violating design constraints by moving to the safe zone; Step 6: Merge the design position update schemes obtained in Steps 3-5 and select the top 50 individuals to form a new population; evaluate, select, and iterate the design schemes obtained in the previous steps based on their fitness functions; The design schemes obtained in the preceding steps are evaluated based on their fitness function. The fitness function comprehensively considers the design objectives, including space utilization, the area ratio of each functional space, and the area ratio of natural lighting. Its mathematical expression is as follows: in, 、 、 These are weighting coefficients; , , Evaluation functions representing space utilization rate, area ratio of each functional space, and area ratio of natural lighting, respectively; If the design solution does not meet all design goals and constraints, the iteration returns to the design exploration stage to continue searching for a better solution. Step 7: Output the optimized design scheme and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results; Step 7 specifically includes: Step 7.1: Develop a script in Python using the ezdxf library to integrate the algorithm results, convert the optimized design parameters extracted from the APO algorithm into CAD graphic elements, automate the CAD task, and save the created graphics as DXF or DWG format files, i.e., output as CAD format files; Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format; Step 7.3: Using Python and the rhinoscriptsyntax library, write a script to read JSON format data, create a 3DM format file, and output the 3DM file; Step 7.4: Using Rhino's Python API and Grasshopper's Python scripting capabilities, write a script to automate the following four steps: Open Rhino and load the 3DM file; Set up Ladybug, Honeybee, and Human components in Grasshopper; Pass the geometric information from the 3DM file to the Ladybug, Honeybee, and Human components; Perform lighting, thermal comfort, and pedestrian flow simulation analyses respectively; Run the analyses and obtain the results. Step 7.5: Output the analysis results as a JPG file.

2. The method according to claim 1, characterized in that: Step 3 specifically involves: A cooperation factor F is introduced to control the degree to which the design scheme converges with other schemes. The current design scheme is refined by combining the positions of three randomly selected design schemes, and its position update is expressed by the following formula: in, , , These are candidate solutions randomly selected from the current population, and r1≠r2≠r3. ≠ When rand < 0.5, the algorithm uses the cooperation factor F to explore potential design possibilities through random movement; when rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design scheme.

3. The method according to claim 1, characterized in that: Step 4 specifically involves: Introducing adaptive factors f, Adjust the search intensity based on the current iteration number by adjusting the step size. f To enhance the search for the global optimum, the position update equation is as follows: f The search strength function is adjusted based on the current iteration number as follows: Where T represents the total number of iterations, t represents the current iteration number, and rand is a random number that introduces randomness to f.

4. The method according to claim 3, characterized in that: Step 5 specifically involves: To avoid violating design constraints, the position is updated by moving towards a safe region, as expressed by the following formula: in Rand is a random number uniformly distributed between 0 and 1. Safe is a safe zone to avoid problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change its current position significantly. When rand < 0.5, the algorithm actively avoids design constraints and randomly changes its position to avoid potential dangers.

5. The method according to claim 1, characterized in that: Step 6 specifically involves: Step 6.1: Merge the obtained candidate positions into a new solution. These solutions are sorted according to their fitness, and the top 50 individuals are selected to form a new population. To obtain the optimal result in the three stages, the equation is expressed as follows: 。 6. A smart optimization system for the architectural plan of a university library, the system operating based on the method of claim 1, characterized in that: The system includes: An initialization module, which determines design parameters and designs population initialization; The selection module, based on the initial design population, introduces the Levy flight coefficient, combines the global optimal solution with another randomly selected design scheme to obtain a new position vector and a new design population; The cooperation module introduces a cooperation factor F, which updates the design scheme position by combining the positions of three randomly selected design schemes. An adaptive module that introduces an adaptive factor. f The search intensity is adjusted based on the current iteration number to enhance the exploration of the global optimum. By moving to a safe area, violations of design constraints can be avoided; The selection iteration module merges the design position update schemes and selects the first 50 individuals to form a new population; the design schemes obtained in the previous step are evaluated, selected, and iterated according to their fitness functions; The output module outputs the optimized design scheme and combines it with Grasshopper to perform simulation analysis of lighting, thermal comfort, and pedestrian flow, and outputs the analysis results.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method as claimed in any one of claims 1-5.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Global optimization algorithm for simulating green-head duck behaviors

    CN111783349A