University library building plane intelligent optimization method
Through the intelligent optimization method of building planes of university libraries based on APO algorithm, the complex problem of building plane optimization needs of university libraries is solved, efficient and intelligent optimization effects are achieved, and multi-objective optimization capabilities and optimization efficiency are improved.
Patent Information
- Application Number
- CN202411977914.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The requirements for building floor plan optimization in college libraries are complex, the existing methods are time-consuming and labor-intensive, and there is a lack of efficient and intelligent optimization methods.
An intelligent optimization method for building graphic of university libraries based on APO algorithm is adopted. By determining design parameters and population initialization, Levy flight coefficient and cooperation factor are introduced, and the design solution position is updated and optimized by combining adaptive factors and safe area movement.
It enhances the global search capability, avoids local optimization, improves the multi-objective optimization capability, can handle complex nonlinear and non-convex optimization problems, and improves optimization efficiency and effect.
Smart Images

Figure CN119783540A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of building plane optimization methods, and is an intelligent optimization method for building planes of university libraries. Background Art
[0002] University libraries are different from public libraries. They are mainly used by teachers and students in universities. In recent years, with the digitization of books and materials, the functions of university libraries have gradually evolved towards public self-study, discussion, and conference. What follows is the transformation and optimization of the building plane functions of university libraries. As large public buildings, university libraries have the characteristics of multifunctional buildings, complex flow lines, and complex lighting requirements. Therefore, the optimization requirements for the building plane of university libraries are complex, time-consuming, and labor-intensive. A method for intelligently optimizing the building plane can greatly help the optimization of the library plane.
[0003] The APO algorithm is particularly suitable for the automation of prompt engineering, which can significantly improve the performance of prompts and make them explainable. Compared with traditional methods, APO does not require the adjustment of hyperparameters or model training, thus simplifying the optimization process. In addition, the flexibility of the APO algorithm enables it to adapt to a variety of complex problems and is suitable for machine learning, firewall rule configuration, resource scheduling and other fields. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method for intelligent optimization of the building plane of a university library, which addresses the various shortcomings of the current intelligent optimization methods for the building plane.
[0005] The present invention provides the following technical solutions:
[0006] A method for intelligent optimization of the building plane of a university library, the method comprising the following steps:
[0007] Step 1: Determine the design parameters and initialize the design population;
[0008] Step 2: According to the design initial population, the Levy flight coefficient is introduced, and the new position vector is obtained by combining the global optimal solution and another randomly selected design solution to obtain a new design population;
[0009] The specific expression for generating the Levy step size is:
[0010]
[0011] Levy flight step generation determines the movement range of the design individual in the search space, where u~N(0,σ 2 ), v~N(0,1), σ is the scale parameter determined by the Levy flight parameter β:
[0012]
[0013] Among them, Γ is the gamma function, β is the parameter that controls the Levy flight distribution, usually between 1 and 2;
[0014] Step 3: Introduce the cooperation factor F and update the design position by combining the three randomly selected design positions;
[0015] Step 4: Introduce the adaptive factor f to adjust the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution;
[0016] Step 5: Avoid violating design constraints by moving to the safe area;
[0017] Step 6: Combine the design position update schemes obtained in steps 3-5 and select the first 50 individuals to form a new population; evaluate, select and iterate the design schemes obtained in the previous order according to their fitness functions;
[0018] Step 7: Output the optimized design plan and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results.
[0019] Preferably, the step 2 is specifically:
[0020] Step 2.1: Calculate the new position of each design solution Make it move towards the global optimal solution Best, and enhance the global search ability of the algorithm by introducing the Levy flight coefficient Levy (λ), which is expressed by the following formula:
[0021]
[0022] Among them, α is a random number; Levy(λ) is the random walk step length generated according to the Levy step length, and λ is the parameter of the Levy flight.
[0023] Step 2.2: By combining the global optimal solution and another randomly selected design solution To explore new design spaces, we can express it as follows:
[0024]
[0025] Among them, S is the speed coefficient, which controls the amplitude of the design change.
[0026] Step 2.3: Combine the candidate positions obtained in the first two steps into a new solution Position new1 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in both stages, the equations are expressed as follows:
[0027]
[0028] new = sort(Position new1 )
[0029]
[0030] Among them, sort is to sort the new population according to their fitness values, from small to large, and select the first 50 individuals to form a new population
[0031] Preferably, the step 3 is specifically:
[0032] The cooperation factor F is introduced to control the degree to which the design scheme approaches other schemes. The current design scheme is refined by combining the positions of the three randomly selected design schemes. Its position update is expressed by the following formula:
[0033]
[0034] in, is a candidate solution 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 movements. When rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design solution.
[0035] Preferably, the step 4 is specifically:
[0036] The adaptive factor f is introduced to adjust the search intensity according to the current number of iterations. The exploration of the global optimal solution is enhanced by adjusting the step size f. The position update equation is shown as follows:
[0037]
[0038] f adjusts the search intensity function according to the current number of iterations as follows:
[0039]
[0040] Among them, T represents the total number of iterations, t represents the current number of iterations, and rand is a random number that introduces randomness to f.
[0041] Preferably, the step 5 is specifically:
[0042] Avoid violating the design constraints by moving to the safe area, and express its position update as follows:
[0043]
[0044] Where β is a random number uniformly distributed between 0 and 1, and safe is a safe area that avoids problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change the current position significantly. When rand < 0.5, the algorithm actively avoids the design constraints and randomly changes the position to avoid potential dangers.
[0045] Preferably, the step 6 is specifically:
[0046] Step 6.1: Merge the obtained candidate positions into a new solution Position new2 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in the three stages, the equations are expressed as follows:
[0047]
[0048] new = sort(Position new2 )
[0049]
[0050] Step 6.2: The design scheme obtained in the previous step is evaluated according to its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, area ratio of each functional space, and natural light area ratio. Its mathematical expression is as follows:
[0051]
[0052] Among them, w1, w2, w3 are weight coefficients; U space , S proportion , L light The evaluation functions represent the space utilization rate, the area ratio of each functional space, and the area ratio of natural lighting respectively.
[0053] If the design solution does not meet all design goals and constraints, iterate back to the design exploration phase to continue looking for a better solution.
[0054] Preferably, the step 7 is specifically:
[0055] 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 CAD tasks, and save the created graphics as DXF or DWG format files, that is, output them as CAD format files;
[0056] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;
[0057] Step 7.3: Use Python and rhinoscriptsyntax library to write a script to read JSON format data, create 3DM format file, and output 3DM file;
[0058] 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 geometry information in the 3DM file to Ladybug, Honeybee, and Human components, perform lighting, thermal comfort, and crowd flow simulation analysis, run the analysis, and obtain the results;
[0059] Step 7.5: Output the analysis results as a jpg format file.
[0060] An intelligent optimization system for building plane of university library, the system comprising:
[0061] An initialization module, wherein the initialization module determines design parameters and initializes the design population;
[0062] A selection module, wherein the selection module introduces a Levy flight coefficient according to the design initial population, combines the global optimal solution and another randomly selected design solution to obtain a new position vector, and obtains a new design population;
[0063] A cooperation module, wherein the cooperation module introduces a cooperation factor F and updates the design solution position in combination with three randomly selected design solution positions;
[0064] An adaptive module, wherein the adaptive module introduces an adaptive factor f and adjusts the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution;
[0065] Avoid violating design constraints by moving to the safe area;
[0066] A selection iteration module is used to combine the design position update schemes and select the first 50 individuals to form a new population; the design schemes obtained in the previous sequence are evaluated, selected, and iterated according to their fitness functions;
[0067] The output module outputs the optimized design scheme and combines Grasshopper to perform lighting, thermal comfort, and crowd flow simulation analysis, and outputs the analysis results.
[0068] A computer-readable storage medium stores a computer program, which is executed by a processor to implement an intelligent optimization method for a university library building plane.
[0069] A computer device comprises a memory and a processor, wherein the memory stores a computer program and the processor implements an intelligent optimization method for the building plane of a university library when executing the computer program.
[0070] The present invention has the following beneficial effects:
[0071] Compared with the prior art, the present invention has the following advantages:
[0072] Compared with the existing building plan intelligent optimization method, the university library building plan intelligent optimization method based on the APO algorithm proposed in the present invention enhances the global search capability, avoids local optimality, and improves the multi-objective optimization capability. It does not rely on gradient information and can handle complex nonlinear and non-convex optimization problems. Compared with the traditional PSO algorithm, the APO algorithm has an adaptive mechanism and does not require manual adjustment of parameters. The weight factor and speed factor can be adjusted dynamically according to the characteristics of the problem, which speeds up the search speed of particles and allows the algorithm to converge to the optimal solution faster. At the same time, it is easy to perform parallel processing, which can improve the efficiency of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0074] Figure 1 Shown is a flow chart of the overall solution of the present invention;
[0075] Figure 2 Shown is a functional space schematic diagram of the present invention;
[0076] Figure 3 Shown is a principle block diagram of the present invention. DETAILED DESCRIPTION
[0077] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0079] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0080] In addition, 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.
[0081] The present invention is described in detail below in conjunction with specific embodiments. Specific embodiment one:
[0083] according to Figures 1 to 3 As shown, the specific optimization technical solution adopted by the present invention to solve the above technical problems is: the present invention relates to an intelligent optimization method for the building plane of a university library.
[0084] A method for intelligent optimization of the building plane of a university library, the method comprising the following steps:
[0085] Step 1: Determine the design parameters and initialize the design population;
[0086] Step 2: According to the design initial population, the Levy flight coefficient is introduced, and the new position vector is obtained by combining the global optimal solution and another randomly selected design solution to obtain a new design population;
[0087] The specific expression for generating the Levy step size is:
[0088]
[0089] Levy flight step generation determines the movement range of the design individual in the search space, where u~N(0,σ 2 ), v~N(0,1), σ is the scale parameter determined by the Levy flight parameter β:
[0090]
[0091] Among them, Γ is the gamma function, β is the parameter that controls the Levy flight distribution, usually between 1 and 2;
[0092] Step 3: Introduce the cooperation factor F and update the design position by combining the three randomly selected design positions;
[0093] Step 4: Introduce the adaptive factor f to adjust the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution;
[0094] Step 5: Avoid violating design constraints by moving to the safe area;
[0095] Step 6: Combine the design position update schemes obtained in steps 3-5 and select the first 50 individuals to form a new population; evaluate, select and iterate the design schemes obtained in the previous order according to their fitness functions;
[0096] Step 7: Output the optimized design plan and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results. Specific embodiment 2:
[0098] The difference between the second embodiment of the present application and the first embodiment is that:
[0099] The step 2 is specifically as follows:
[0100] Step 2.1: Calculate the new position of each design solution Make it move towards the global optimal solution Best, and enhance the global search ability of the algorithm by introducing the Levy flight coefficient Levy (λ), which is expressed by the following formula:
[0101]
[0102] Among them, α is a random number; Levy(λ) is the random walk step length generated according to the Levy step length, and λ is the parameter of the Levy flight;
[0103] Step 2.2: By combining the global optimal solution and another randomly selected design solution To explore new design spaces, we can express it as follows:
[0104]
[0105] Among them, S is the speed coefficient, which controls the magnitude of the design change;
[0106] Step 2.3: Combine the candidate positions obtained in the first two steps into a new solution Position new1 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in both stages, the equations are expressed as follows:
[0107]
[0108] new = sort(Position new1 )
[0109]
[0110] Among them, sort is to sort the new population according to their fitness values, from small to large, and select the first 50 individuals to form a new population Specific embodiment three:
[0112] The difference between the third embodiment of the present application and the second embodiment is that:
[0113] The step 3 is specifically as follows:
[0114] The cooperation factor F is introduced to control the degree to which the design scheme approaches other schemes. The current design scheme is refined by combining the positions of the three randomly selected design schemes. Its position update is expressed by the following formula:
[0115]
[0116]
[0117] in, is a candidate solution 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 movements. When rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design solution. Specific embodiment four:
[0119] The difference between the fourth embodiment of the present application and the third embodiment is that:
[0120] The step 4 is specifically as follows:
[0121] The adaptive factor f is introduced to adjust the search intensity according to the current number of iterations. The exploration of the global optimal solution is enhanced by adjusting the step size f. The position update equation is shown as follows:
[0122]
[0123] f adjusts the search intensity function according to the current number of iterations as follows:
[0124]
[0125] Among them, T represents the total number of iterations, t represents the current number of iterations, and rand is a random number that introduces randomness to f. Specific embodiment five:
[0127] The difference between the fifth embodiment of the present invention and the fourth embodiment is that:
[0128] The step 5 is specifically as follows:
[0129] Avoid violating the design constraints by moving to the safe area, and express its position update as follows:
[0130]
[0131] Where β is a random number uniformly distributed between 0 and 1, and safe is a safe area that avoids problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change the current position significantly. When rand < 0.5, the algorithm actively avoids the design constraints and randomly changes the position to avoid potential dangers. Specific embodiment six:
[0133] The difference between the sixth embodiment of the present invention and the fifth embodiment is that:
[0134] The step 6 is specifically as follows:
[0135] Step 6.1: Merge the obtained candidate positions into a new solution Position new2 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in the three stages, the equations are expressed as follows:
[0136]
[0137] new = sort(Position new2 )
[0138]
[0139] Step 6.2: The design scheme obtained in the previous step is evaluated according to its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, area ratio of each functional space, and natural light area ratio. Its mathematical expression is as follows:
[0140]
[0141] Among them, w1, w2, w3 are weight coefficients; U space , S proportion , L light The evaluation functions representing space utilization, area ratio of each functional space, and natural lighting area ratio respectively;
[0142] If the design solution does not meet all design goals and constraints, iterate back to the design exploration phase to continue looking for a better solution. Specific embodiment seven:
[0144] The difference between the seventh embodiment of the present invention and the sixth embodiment is that:
[0145] Step 7 is as follows:
[0146] 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 CAD tasks, and save the created graphics as DXF or DWG format files, that is, output them as CAD format files;
[0147] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;
[0148] Step 7.3: Use Python and rhinoscriptsyntax library to write a script to read the data in JSON format, create a 3DM format file, and output the 3DM file;
[0149] Step 7.4: Use Rhino's Python API and Grasshopper's Python scripting capabilities 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 geometry information in the 3DM file to Ladybug, Honeybee, and Human components, perform lighting, thermal comfort, and crowd flow simulation analysis, run the analysis, and obtain the results;
[0150] Step 7.5: Output the analysis results as a jpg format file. Specific embodiment eight:
[0152] The difference between the eighth embodiment of the present invention and the seventh embodiment is that:
[0153] The present invention provides a university library building plane intelligent optimization system, the system comprising:
[0154] An initialization module, wherein the initialization module determines design parameters and initializes the design population;
[0155] A selection module, wherein the selection module introduces a Levy flight coefficient according to the design initial population, combines the global optimal solution and another randomly selected design solution to obtain a new position vector, and obtains a new design population;
[0156] A cooperation module, wherein the cooperation module introduces a cooperation factor F and updates the design solution position in combination with three randomly selected design solution positions;
[0157] An adaptive module, wherein the adaptive module introduces an adaptive factor f and adjusts the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution;
[0158] Avoid violating design constraints by moving to the safe area;
[0159] A selection iteration module is used to combine the design position update schemes and select the first 50 individuals to form a new population; the design schemes obtained in the previous sequence are evaluated, selected, and iterated according to their fitness functions;
[0160] The output module outputs the optimized design scheme and combines Grasshopper to perform lighting, thermal comfort, and crowd flow simulation analysis, and outputs the analysis results. Specific embodiment nine:
[0162] The difference between the ninth embodiment of the present invention and the eighth embodiment is that:
[0163] The invention provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement an intelligent optimization method for a university library building plane. Specific embodiment ten:
[0165] The difference between the tenth embodiment of the present invention and the ninth embodiment is that:
[0166] The present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements an intelligent optimization method for a university library building plane when executing the computer program. Specific embodiment eleven:
[0168] The difference between the eleventh embodiment of the present invention and the tenth embodiment is that:
[0169] The present invention aims at various shortcomings of current building plane intelligent optimization methods, and aims to propose a more comprehensive, more objective and more efficient university library building plane intelligent optimization method based on APO algorithm.
[0170] The present invention proposes an intelligent optimization method for the building plane of a university library based on the APO algorithm, and the present invention provides the following technical solutions:
[0171] A method for intelligent optimization of university library building plane based on APO algorithm, the method comprising the following steps:
[0172] Step 1: Clarify design parameters and initialize the design population
[0173] Step 2: Based on the designed initial population, the Levy flight coefficient is introduced to enhance the global search capability of the algorithm and a new position vector is obtained by combining the global optimal solution and another randomly selected design solution to obtain a new design population;
[0174] Step 3: Based on the design population obtained in step 3, introduce the cooperation factor F, and update the design position in combination with the three randomly selected design positions;
[0175] Step 4: Introduce the adaptive factor f to adjust the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution
[0176] Step 5: Avoid violating design constraints by moving to the safe area
[0177] Step 6: Combine the design position update schemes obtained in steps 3-5, select the first 50 individuals to form a new population; perform design evaluation, selection, and iteration on the design schemes obtained in the previous order according to their fitness functions;
[0178] Step 7: Output the optimized design plan and combine it with Grasshopper to perform lighting, thermal comfort, and crowd flow simulation analysis, and output the analysis results;
[0179] Preferably, the step 1 is specifically:
[0180] Step 1.1: Clarify the design parameters in the APO algorithm, including: the basic attributes of each functional space. Functional space includes entrance space (cashier hall, information retrieval and consulting service space, lobby reception and management space), paper reading space (general open-shelf library reading area, newspaper and magazine reading room, special document reading, professional document reading), research space (self-study reading area, personal research room, multi-person research room, research special seat), public activity space (multi-functional activity hall, exhibition area, life service area), information reading space (electronic reading room, multimedia reading room), librarian use space (technical service area, administrative management area, information technology area), and traffic space; the basic attributes include the area (unit: square meters), position (expressed by position vector), and distance (unit: meter) of each space.
[0181] Step 1.2; Convert the initial design into digital formats, including CAD files, Rhino models, and for CAD files, export to DXF or DWG formats: In AutoCAD, export the floor plan to DXF or DWG formats, which contain all the geometric information and attribute data in the design.
[0182] Parsing DXF / DWG files: Use specialized parsing tools or programming languages (Python's ezdxf library) to read DXF / DWG files and extract the parameters in the design plan, including room dimensions (length, width, height), traffic core location, stairwell location, internal partition location and dimensions (length, width, height), door and window location and dimensions (length, width, height).
[0183] Convert to 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 solution.
[0184] So that the APO algorithm can read the specific values and parameters in the design plan;
[0185] Develop a data import interface in the APO algorithm to read the above converted files;
[0186] Implement data parsing function in the interface to map the data in the file to the variables and parameters in the algorithm;
[0187] Step 1.3: Based on the determined design parameters, define a data structure to store these parameters. In programming, you need to define a class or data structure (list or dictionary) that contains all the necessary fields.
[0188] Write a function to parse a data file. Write a function that reads a CSV, JSON, or XML file and converts it into a data structure (such as a list or dictionary) in the programming language you are using.
[0189] Step 1.4: Mapping the parsed data to the parameters in the APO algorithm involves assigning the values in the data structure to the variables in the algorithm;
[0190] Develop a data import interface in the APO algorithm that uses the above functions to read and parse the data file and map the data to the algorithm parameters;
[0191] Test the data import interface to ensure that it can correctly read files, parse data, and map data to algorithm parameters;
[0192] Integrate the data interface into the initialization process of the APO algorithm
[0193] Initialize according to the imported data and create an initial population containing multiple design solutions. Each design solution (design individual) represents a potential building plan layout, and the parameter range is defined by the design parameters described in claim 3.
[0194] The initialization process can be expressed as:
[0195]
[0196] in, It represents the initial position vector of the i-th design scheme, and represents the specific values of all parameters in the design scheme; Rand generates random numbers between 0 and 1, which are used to assign a random initial value to each design parameter, increasing the diversity of the population; ub and lb represent the upper and lower bounds of the design parameters, respectively, which define the value range of each design parameter to ensure that the design scheme meets the actual limitations of architectural design.
[0197] Preferably, the step 2 is specifically:
[0198] Step 2.1: Calculate the new position of each design solution Make it move towards the global optimal solution Best, and enhance the global search ability of the algorithm by introducing the Levy flight coefficient Levy (λ), which is expressed by the following formula:
[0199]
[0200] Among them, α is a random number that simulates the degree to which the designer draws on the current best design solution; Levy(λ) is the random walk step generated according to the Levy step size, and λ is the parameter of the Levy flight, which controls the shape of the step size distribution.
[0201] Step 2.2: By combining the global optimal solution and another randomly selected design solution To explore new design spaces, we can express it as follows:
[0202]
[0203] Among them, S is the speed coefficient, which controls the amplitude of the design change.
[0204] Step 2.3: Combine the candidate positions obtained in the first two steps into a new solution Position new1 , sort these solutions according to fitness, and select the first 50 individuals to form a new population
[0205] To obtain the optimal results in both stages, the equations are expressed as follows:
[0206]
[0207] new = sort(Position new1 ) (5)
[0208]
[0209] Among them, sort is to sort the new population according to their fitness values, from small to large, and select the first 50 individuals to form a new population
[0210] Preferably, the step 3 is specifically:
[0211] The cooperation factor F is introduced to control the degree to which the design scheme converges to other schemes. The current design scheme is refined by combining the positions of the three randomly selected design schemes, and its position update is expressed by the following formula:
[0212]
[0213] Variables r1, r2, and r3 are random integers between 1 and N-1 (excluding i).
[0214] is a candidate solution randomly selected from the current population, and r1≠r2≠r3,
[0215] When rand < 0.5, the algorithm uses the cooperation factor F to explore potential design possibilities through random motion. When rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design solution. 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.
[0216] Preferably, the step 4 is specifically:
[0217] The adaptive factor f is introduced to adjust the search intensity according to the current number of iterations. The exploration of the global optimal solution is enhanced by adjusting the step size f. The position update equation is shown as follows:
[0218]
[0219] f adjusts the search intensity function according to the current number of iterations as follows:
[0220]
[0221] Among them, T represents the total number of iterations, t represents the current number of iterations, and rand is a random number that introduces randomness to f.
[0222] Preferably, the step 5 is specifically:
[0223] Avoid violating the design constraints by moving to the safe area Safe, and express its position update as follows:
[0224] Where β is a random number uniformly distributed between 0 and 1, and Safe is a safe area that avoids problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change the current position significantly. When rand < 0.5, the algorithm actively avoids the design constraints and randomly changes the position to avoid potential dangers.
[0225] Preferably, the step 6 is specifically:
[0226] Step 6.1: Merge the obtained candidate positions into a new solution Position new2 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in the three stages, the equations are expressed as follows:
[0227]
[0228] new = sort(Position new2 ) (12)
[0229]
[0230] Step 6.2: The design scheme obtained in the previous step is evaluated according to its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, area ratio of each functional space, and natural light area ratio. Its mathematical expression is as follows:
[0231]
[0232] Among them, w1, w2, w3 are weight coefficients; U space , S proportion , L light The evaluation functions represent the space utilization rate, the area ratio of each functional space, and the area ratio of natural lighting respectively.
[0233] If the design solution does not meet all design goals and constraints, iterate back to the design exploration phase to continue looking for a better solution.
[0234] Preferably, the step 7 is specifically:
[0235] 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 CAD tasks, and save the created graphics as DXF or DWG format files, that is, output them as CAD format files;
[0236] Step 7.2: Extract the optimized design parameters from the APO algorithm and save them in JSON format;
[0237] Step 7.3: Use Python and rhinoscriptsyntax library to write a script to read JSON format data, create 3DM format file, and output 3DM file;
[0238] 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 in the 3DM file to the Ladybug, Honeybee, and Human components, run the analysis, and get the results;
[0239] Step 7.5: Output the analysis results as a jpg format file.
[0240] Preferably, the Levy flight step length generation expression is as follows:
[0241]
[0242] The Levy flight step size determines the movement range of the design individual in the search space, where u~
[0243] N(0,σ 2 ), v~N(0,1), σ is the scale parameter determined by the Levy flight parameter β,
[0244]
[0245] Γ is the gamma function, and β is the parameter that controls the Levy flight distribution, which usually takes a value between 1 and 2.
[0246] Preferably, each fitness function is specifically:
[0247] The space utilization evaluation function is: A used A is the effective use area inside the library; total is the total floor area of the library;
[0248] The evaluation function of the area ratio of each functional space is: A i,actual is the actual area of the i-th functional space; A i,ideal is the ideal area of the ith functional space; n is the total number of functional spaces;
[0249] The evaluation function of the natural lighting area ratio is: A daylit is the area that can receive natural light; A total is the total floor area of the library.
[0250] In the description of this specification, the description of reference terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0251] The above is only a preferred implementation of a method for intelligent optimization of the building plane of a university library. The protection scope of the method for intelligent optimization of the building plane of a university library is not limited to the above embodiment. All technical solutions under this idea belong to the protection scope of the present invention. It should be pointed out that for those skilled in the art, several improvements and changes without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for intelligent optimization of the building plane of a university library, characterized by: The method comprises the following steps: Step 1: Determine the design parameters and initialize the design population; Step 2: According to the design initial population, the Levy flight coefficient is introduced, and the new position vector is obtained by combining the global optimal solution and another randomly selected design solution to obtain a new design population; The specific expression for generating the Levy step size is: Levy flight step generation determines the movement range of the design individual in the search space, where u~N(0,σ 2 ), v~N(0,1), σ is the scale parameter determined by the Levy flight parameter β: Among them, Γ is the gamma function, β is the parameter that controls the Levy flight distribution, usually between 1 and 2; Step 3: Introduce the cooperation factor F and update the design position by combining the three randomly selected design positions; Step 4: Introduce the adaptive factor f to adjust the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution; Step 5: Avoid violating design constraints by moving to the safe area; Step 6: Combine the design position update schemes obtained in steps 3-5 and select the first 50 individuals to form a new population; evaluate, select and iterate the design schemes obtained in the previous order according to their fitness functions; Step 7: Output the optimized design plan and combine it with Grasshopper to perform lighting, thermal comfort, and pedestrian flow simulation analysis, and output the analysis results.
2. The method according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.1: Calculate the new position of each design solution Make it move towards the global optimal solution Best, and enhance the global search ability of the algorithm by introducing the Levy flight coefficient Levy (λ), which is expressed by the following formula: Among them, α is a random number; Levy(λ) is the random walk step length generated according to the Levy step length, and λ is the parameter of the Levy flight; Step 2.2: By combining the global optimal solution and another randomly selected design solution To explore new design spaces, we can express it as follows: Among them, S is the speed coefficient, which controls the magnitude of the design change; Step 2.3: Combine the candidate positions obtained in the first two steps into a new solution Position new1 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in both stages, the equations are expressed as follows: new=sort(Position new1 ) Among them, sort is to sort the new population according to their fitness values, from small to large, and select the first 50 individuals to form a new population 3. The method according to claim 2, characterized in that: The step 3 is specifically as follows: The cooperation factor F is introduced to control the degree to which the design scheme approaches other schemes. The current design scheme is refined by combining the positions of the three randomly selected design schemes. Its position update is expressed by the following formula: in, is a candidate solution 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 movements. When rand ≥ 0.5, the algorithm quickly changes position after discovering the possibility of a feasible design solution.
4. The method according to claim 1, characterized in that: The step 4 is specifically as follows: The adaptive factor f is introduced to adjust the search intensity according to the current number of iterations. The exploration of the global optimal solution is enhanced by adjusting the step size f. The position update equation is shown as follows: f adjusts the search intensity function according to the current number of iterations as follows: Among them, T represents the total number of iterations, t represents the current number of iterations, and rand is a random number that introduces randomness to f.
5. The method according to claim 4, characterized in that: The step 5 is specifically as follows: Avoid violating the design constraints by moving to the safe area, and express its position update as follows: Where β is a random number uniformly distributed between 0 and 1, and safe is a safe area that avoids problems or constraints. When rand ≥ 0.5, the design constraint boundary is close, and the algorithm will immediately dodge and change the current position significantly. When rand < 0.5, the algorithm actively avoids the design constraints and randomly changes the position to avoid potential dangers.
6. The method according to claim 1, characterized in that: The step 6 is specifically as follows: Step 6.1: Merge the obtained candidate positions into a new solution Position new2 , sort these solutions according to fitness, and select the first 50 individuals to form a new population To obtain the optimal results in the three stages, the equations are expressed as follows: Step 6.2: The design scheme obtained in the previous step is evaluated according to its fitness function. The fitness function comprehensively considers the design objectives, including space utilization, area ratio of each functional space, and natural light area ratio. Its mathematical expression is as follows: Among them, w1, w2, w3 are weight coefficients; U space , S proportion , L light The evaluation functions representing space utilization, area ratio of each functional space, and natural lighting area ratio respectively; If the design solution does not meet all design goals and constraints, iterate back to the design exploration phase to continue looking for a better solution.
7. The method according to claim 6, characterized in that: Step 7 is as follows: 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 CAD tasks, and save the created graphics as DXF or DWG format files, that is, output them 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: Use Python and rhinoscriptsyntax library to write a script to read the data in JSON format, create a 3DM format file, and output the 3DM file; Step 7.4: Use Rhino's Python API and Grasshopper's Python scripting capabilities 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 geometry information in the 3DM file to Ladybug, Honeybee, and Human components, perform lighting, thermal comfort, and crowd flow simulation analysis, run the analysis, and obtain the results; Step 7.5: Output the analysis results as a jpg format file.
8. An intelligent optimization system for the building plan of a university library, characterized by: The system comprises: An initialization module, wherein the initialization module determines design parameters and initializes the design population; A selection module, wherein the selection module introduces a Levy flight coefficient according to the design initial population, combines the global optimal solution and another randomly selected design solution to obtain a new position vector, and obtains a new design population; A cooperation module, wherein the cooperation module introduces a cooperation factor F and updates the design solution position in combination with three randomly selected design solution positions; An adaptive module, wherein the adaptive module introduces an adaptive factor f and adjusts the search intensity according to the current number of iterations to enhance the exploration of the global optimal solution; Avoid violating design constraints by moving to the safe area; A selection iteration module is used to combine the design position update schemes and select the first 50 individuals to form a new population; the design schemes obtained in the previous sequence are evaluated, selected, and iterated according to their fitness functions; The output module outputs the optimized design scheme and combines Grasshopper to perform lighting, thermal comfort, and crowd flow simulation analysis, and outputs the analysis results.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to claims 1-7.
10. 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 method of claims 1-7 is implemented.
Citation Information
Patent Citations
Building multi-objective optimization design method based on performance orientation
CN106295029A
Global optimization algorithm for simulating green-head duck behaviors
CN111783349A
Three-dimensional surface WSN (Wireless Sensor Network) coverage method based on improved salat swarm optimization algorithm
CN117459946A
Assembly line machine type and quantity configuration method and system and related device
CN118898320A
High-robustness meta-heuristic optimization method
CN119180297A