A water-cooled magnet optimization method and system
By combining population initialization, geometric verification, and penalty models with local search and global crossover mutation operations, and integrating the integral derivation of the Biot-Savart law, the design of water-cooled magnets is optimized, solving the problem of low efficiency in traditional methods and achieving a fast and efficient optimal coil structure configuration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing water-cooled magnet design methods cannot efficiently balance global search breadth and local optimization accuracy, resulting in long development cycles and high costs. Traditional algorithms are ineffective in handling complex optimization tasks with multiple variables and strong constraints.
A water-cooled magnet optimization method is adopted, which optimizes the coil structure configuration by using population initialization, pre-geometric verification, asymmetric penalty model, local search and global crossover mutation operations, combined with the analytical formula of axial magnetic field derived by the integral of Biot-Savart law.
It enables rapid and automatic output of the optimal coil structure configuration, shortens the R&D cycle, improves the success rate of finding the global optimal configuration, and meets engineering manufacturing standards.
Smart Images

Figure CN122154107A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of steady-state strong magnetic field devices, specifically to a water-cooled magnet optimization method and system. Background Technology
[0002] Strong magnetic fields are important extreme conditions that provide a unique physical environment for scientific research, where the structure of matter and its transformation processes can change. Strong magnetic field experimental devices, as an effective method for obtaining high magnetic fields, have become an irreplaceable and crucial tool for conducting cutting-edge basic research in condensed matter physics, materials science, chemistry, and life sciences.
[0003] Water-cooled resistive magnets are one of the main experimental devices in steady-state strong magnetic field laboratories. To cope with extremely high Joule heat and enormous electromagnetic forces, high-performance water-cooled magnets typically employ a biter-type structure. Their core consists of multiple nested coaxial coils, and during fabrication, thin metal sheets (such as copper alloy sheets) with cooling holes are alternately stacked with insulating sheets. During operation, high-pressure deionized water flows rapidly through the cooling holes, carrying away megawatt-level heat.
[0004] With ever-increasing demands for magnetic field strength and experimental aperture, the design of water-cooled magnets has become extremely complex. A complete water-cooled magnet design involves not only the inner and outer diameters of each coil, the thickness of each coil, and the number of coils per turn, but more importantly, the precise allocation of different types of coil segments (such as combinations of single-turn, double-turn, triple-turn, and quadruple-turn structures). These geometric and electrical parameters are interdependent and directly determine the magnet's central magnetic field strength, total power consumption, and the final physical height of the coils.
[0005] Currently, parameter design and optimization still face significant bottlenecks in the research and development of water-cooled magnets. Traditional design methods heavily rely on manual experience and iterative calculations using simulation software. Designers need to manually set parameters and perform numerical simulations; if the coil height exceeds limits or the magnetic field strength fails to meet standards, parameters must be readjusted blindly. When dealing with multi-coil combinations with strict physical and geometric constraints (e.g., an absolute height limit for each coil), relying on manual trial and error makes it extremely difficult to find the globally optimal solution between minimizing operating power and accurately achieving the target magnetic field, resulting in a lengthy and costly development cycle.
[0006] On the other hand, conventional single numerical optimization algorithms perform poorly when dealing with nonlinear problems with mixed integer programming characteristics. Because the number of coil turns is a discrete value and a strict high-penalty mechanism is introduced, traditional local search algorithms are extremely sensitive to initial parameters and are prone to getting trapped in local optima; while single global heuristic algorithms often converge slowly in the later stages when faced with a large search space, making it difficult to efficiently and accurately complete the joint optimization of multiple parameters.
[0007] In summary, existing water-cooled magnet design methods cannot efficiently handle complex optimization tasks with multiple variables and strong constraints. Therefore, there is an urgent need in this field for a water-cooled magnet optimization method and system that can balance the breadth of the global search with the accuracy of local optimization, thereby automatically and efficiently outputting the optimal coil structure configuration. Summary of the Invention
[0008] The technical problem to be solved by this invention is how to provide a water-cooled magnet optimization method and system that can take into account both the breadth of global search and the accuracy of local optimization, so as to automatically and efficiently output the optimal coil structure configuration.
[0009] This invention solves the above-mentioned technical problems through the following technical means: a water-cooled magnet optimization method, comprising the following steps:
[0010] S1. Population initialization, where the population refers to the set of candidate configurations consisting of multiple individuals in a single iteration calculation, and each individual represents a candidate configuration scheme for the water-cooled magnet. S2. Perform a preliminary geometric check on each individual in the population. For individuals that fail the check, return a penalty value as the overall fitness value. For individuals that pass the check, calculate the central axial magnetic field and the total power consumption of the system. Use the asymmetric penalty model combined with the total power consumption to calculate the overall fitness value. S3. Determine if the current iteration meets the set local search triggering conditions. If it does, sort the individuals in the current population from smallest to largest based on their overall fitness value, and select the top... Each individual is used as the initial solution for local optimization, enters the local search phase, obtains the current local optimization result, and executes S4; if the local search triggering condition is not met, S4 is executed directly. S4. Perform global crossover and mutation operations to generate a new generation of candidate populations; S5. Check if the set termination condition is met. If not, return to S2. If yes, output the total power consumption and central axial magnetic field of the system corresponding to the global optimal solution, and generate the configuration scheme of the water-cooled magnet.
[0011] Further, S1 includes: During population initialization, Within the interval, a set of real-valued weight vectors is randomly generated. The maximum allowable physical assembly height of the coil is considered as a total budget. Using the real-valued weight vectors, the target allocation heights allocated to single-turn, double-turn, triple-turn, and quadruple-turn areas are dynamically divided proportionally. After obtaining the respective target allocation heights, they are divided by the actual physical thickness of the corresponding single-turn, double-turn, triple-turn, and quadruple-turn areas, respectively. The resulting values are rounded down to calculate the actual number of disks allocated to the single-turn, double-turn, triple-turn, and quadruple-turn areas of the coil. This is used as an initial individual. Multiple initial individuals are used as an initial population. Each individual has multiple coils, with the i-th coil numbered as i. Each coil includes a single-turn area, a double-turn area, a triple-turn area, and a quadruple-turn area.
[0012] Furthermore, the preliminary geometric verification of each individual in the population, and the return of a penalty value as the overall fitness value for individuals that fail the verification, includes: The actual stacked physical height of each individual in the population is accumulated to determine if it exceeds the maximum engineering capacity limit. If it does, the individual fails the verification, and a penalty value is returned as the overall fitness value. The penalty value is calculated using the following formula: In the formula, The weight for global height exceeding the limit penalty; This represents the actual height difference between the i-th coil and the upper limit in an individual.
[0013] Furthermore, the process of determining the central axial magnetic field and the total power consumption of the system for the verified individuals includes: The actual stacked physical height of each individual in the population is accumulated to determine whether it exceeds the maximum engineering capacity limit. If no limit is exceeded, the individual is deemed to have passed the geometric verification. For the individuals that have passed the verification, the unit equivalent single-turn dissipation power factor of each coil of the individual is calculated. ,in, The preset reference operating power for each coil, , , , These represent the reference number of turns in the single-turn, double-turn, triple-turn, and quadruple-turn zones, respectively; and the total power consumption of the system. In the formula, The total number of coils in an individual. Let be the unit equivalent single-turn power dissipation factor of the i-th coil in the individual. , , , This represents the actual number of disk plates in the single-turn, double-turn, triple-turn, and quadruple-turn regions of the i-th coil in an individual. For a single coil, calculate the equivalent surface current density for each turns segment. , The inner diameter of the coil. The outer diameter of the coil. The current flowing through the coil, The effective single-layer structural thickness within each turn segment; at the origin, using the formula... Calculate the axial magnetic field within each turn segment, where... and The absolute coordinates of the start and end points along the central axis for each segment of turns are given. Represents the permeability of free space. It is an inverse hyperbolic sine function; it iterates through all turns of all coils in the individual, sums up the axial magnetic field calculation results of each turn segment, and obtains the central axial magnetic field. .
[0014] Furthermore, the calculation of the comprehensive fitness value using the asymmetric penalty model combined with total power consumption includes: If the calculated magnetic field does not meet the standard, that is Apply magnetic field penalty term If there is redundancy overflow in the calculated magnetic field, i.e. Apply magnetic field penalty terms In the formula, The target's central magnetic field; Penalty weight for insufficient magnetic field; For the magnetic field overflow penalty weight, The calculated magnetic field penalty term Total power consumption of the system The overall fitness value of an individual is obtained by algebraically summing the results.
[0015] Furthermore, the local search triggering conditions include: Set a fixed iteration interval period. When the current iteration number is greater than 0 and is an integer multiple of the iteration interval period, the local search trigger condition is met; otherwise, the local search trigger condition is not met.
[0016] Furthermore, the local search step includes: Define the discrete parameter vector of the current individual as follows: , Discrete parameter vector The total dimension, multiplied by the total number of coils in an individual, is the discrete parameter vector. The total dimension; Discrete parameter vector The The actual number of disks in each dimension Represents the transpose operation; defines a surrogate pseudo-gradient operator. ,in, for or The unit vector corresponding to the metal disk plate. Indicates the overall fitness value; if Iterate through each dimension and define the direction of adjustment of the parameter with the largest decrease in comprehensive fitness value as the proxy gradient direction for this iteration; After determining the surrogate gradient direction, when updating the parameters along the surrogate gradient direction, assume the first... Dimensional variable belongs to the first The coil is calculated in real time. Current actual stacking height of each coil Distance to the set absolute height limit The difference generates the dynamic damping coefficient. Using the aforementioned dynamic damping coefficient, the next generation of... Actual number of disks In the formula, Indicates the current generation The actual number of disk platters in the dimension. The set baseline is continuously updated with a step size; For symbolic functions, The rounding operator is used to round down. The actual number of disks in each dimension of the next generation is used as the new disk combination scheme. The overall fitness value is calculated. If the overall fitness value is lower than the overall fitness value corresponding to the initial solution of the local optimization, then in-situ replacement is performed in the population, and the initial solution of the local optimization is replaced with the new disk combination scheme as the current local optimization result. Otherwise, the initial solution of the local optimization is used as the current local optimization result.
[0017] Furthermore, the mutation operation involves replacing the scaling factor in the DE algorithm with a dynamic mutation scaling factor, and generating a mutation vector according to the mutation operation steps in the DE algorithm. This mutation vector represents the mutated offspring individual. The formula for calculating the dynamic mutation scaling factor is as follows: In the formula, The basic probability constant of variation; For the first The average radius of the coil to which the dimension variable belongs; This is the maximum radius of the outermost coil of the magnet; This is the set topology magnification factor; The crossover operation involves crossing the mutated vector with the parent solution vector. During this crossover, the increment of the cumulative physical height of the coil is calculated. ,like If the mutation vector is not accepted, the number of disks in the corresponding dimension of the original parent generation will be forcibly retained. This represents the current actual stacking height of the coils in the mutated offspring. This represents the upper limit of the absolute height of the coil in the mutated offspring individual; After completing the mutation and crossover operations, the resulting child solution vectors are rounded down to integers. Next, boundary bounce checks are performed to extract the pre-defined allowable range for the number of turn plates in each nested coil region. , This is the lower limit for the number of disk platters. This represents the upper limit for the number of disk platters, for any dimension. If the number of disks after mutation and crossover operations If it rebounds to the lower limit, then it will be cut off. ;like Then cut it down to the upper limit. After the boundary bounce verification process, a new generation of candidate populations that meet the engineering assembly boundary constraints are output.
[0018] Further, S5 includes: The set termination conditions include whether the maximum set number of iterations has been reached, or whether the decrease in the global optimal comprehensive fitness value within several consecutive generations is lower than the preset convergence threshold. If the termination conditions are not met, the new generation of candidate population is returned to step S2 to continue closed-loop iteration. If the termination conditions are met, the optimization main loop is stopped, the total system power consumption and central axial magnetic field performance index corresponding to the global optimal solution are output, and the final physical assembly scheme containing the specific configuration number of single, double, triple, and quadruple turn disks inside each coil and the corresponding actual stacking height is generated.
[0019] The present invention also provides a water-cooled magnet optimization system, which performs the above-described method, comprising: An initialization unit is used for population initialization. Here, the population refers to a set of candidate configurations consisting of multiple individuals in a single iteration calculation, where each individual represents a candidate configuration scheme for the water-cooled magnet. The individual evaluation unit is used to perform preliminary geometric verification on each individual in the population. For individuals that fail the verification, a penalty value is returned as the comprehensive fitness value. For individuals that pass the verification, the central axial magnetic field and the total power consumption of the system are calculated. The comprehensive fitness value is calculated by combining the asymmetric penalty model with the total power consumption. The local optimization unit determines whether the current iteration satisfies the set local search trigger conditions. If the conditions are met, individuals in the current population are sorted from smallest to largest based on their overall fitness value, and the top-performing individuals are selected. Each individual is used as the initial solution for local optimization, enters the local search phase, obtains the current local optimization result, and executes S4; if the local search triggering condition is not met, the global optimization unit is executed directly. The global optimization unit is used to perform global crossover and mutation operations to generate a new generation of candidate populations; The optimization result output unit is used to check whether the set termination conditions are met. If not, it returns to the individual evaluation unit. If so, it outputs the total power consumption and central axial magnetic field of the system corresponding to the global optimal solution and generates the configuration scheme of the water-cooled magnet.
[0020] The advantages of this invention are: (1) This invention performs local search when the local search triggering condition is met, and performs global crossover and mutation operations when the local search triggering condition is not met. This deeply integrates the global algorithm (responsible for crossover and mutation) with the local optimization method (responsible for depth search). In the early stage of the broad optimization, the global algorithm can maintain the diversity of the solution group and conduct a large-scale search in the discrete combinatorial space. The local algorithm performs a fine search similar to gradient descent with the current excellent individual as the starting point. This combination of global exploration and local development perfectly overcomes the defects of traditional single numerical algorithms in multivariable mixed integer programming, which are prone to premature convergence or extremely slow convergence. It greatly improves the success rate of finding the global optimal configuration scheme, takes into account the breadth of global search and the accuracy of local optimization, and automatically and efficiently outputs the best coil structure configuration.
[0021] (2) To address the complex physical contour requirements of water-cooled magnets, this invention constructs a multi-dimensional penalty and truncation system in the fitness function. First, a linear penalty is applied to any single coil exceeding the absolute height limit. Once any height violation is detected, the system immediately returns the maximum penalty value and terminates the evaluation of that individual early, avoiding subsequent complex magnetic field calculations. In addition, an asymmetric secondary penalty is used for magnetic field deviation (heavy penalty for insufficient magnetic field, light penalty for magnetic field overflow). Through the combined guidance of this penalty and early termination system, the system not only avoids wasting valuable computing power on absolutely infeasible geometric configurations, but also forces the population to converge rapidly towards the Pareto front that minimizes total operating power and precisely matches the target center magnetic field, while satisfying strict spatial geometric limits, directly outputting a feasible solution that meets engineering manufacturing standards.
[0022] (3) This system abandons the traditional mode of calling external large-scale commercial software for finite element mesh generation and iteration, and directly incorporates the analytical formula for the axial magnetic field (analytical solution of the inverse hyperbolic sine function) derived by integral derivation based on Biot-Savart's law. This formula is based on rigorous fundamental electromagnetic theory and basic physical parameters for underlying algorithm solution, and completely rejects the use of any artificial correction coefficients or empirical compensation to fit the data, ensuring the absolute scientificity and physical consistency of the calculation logic under drastic changes in different geometric parameters. Under this rigorous premise, the analytical formula reduces the evaluation time of a single magnet scheme from several minutes or even hours in traditional finite element simulation to the millisecond level, making it possible to support tens of thousands of massive population iterations, and greatly shortening the R&D cycle of magnet design from several weeks to a few minutes. Attached Figure Description
[0023] Figure 1 This is a flowchart of a water-cooled magnet optimization method disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of the multi-coil nesting and single / double / triple / quadruple turn structure distribution of a water-cooled magnet in an optimization method for water-cooled magnets disclosed in an embodiment of the present invention. Figure 3 This is a sub-flowchart of fitness calculation and penalty mechanism determination in a water-cooled magnet optimization method disclosed in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. 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.
[0025] Example 1 like Figure 1 and Figure 2 As shown, Embodiment 1 of the present invention provides a method for optimizing a water-cooled magnet, comprising the following steps: S1, Population Initialization First, the system receives global physical parameters (such as total operating current, target central magnetic field, and thickness of conductive disks and insulating sheets) and algorithm parameters, and reads the maximum allowable assembly height for each coil, as well as the upper and lower limits for the number of disks in single-turn, double-turn, triple-turn, and quadruple-turn structures. In conventional optimization algorithms, the initialization process typically generates integer quantities of various disks blindly and randomly within given upper and lower limits. However, in water-cooled magnets, the physical thicknesses of single, double, triple, and quadruple-turn disks are different, and they are all constrained by the total height of the same coil. If generated purely randomly, the total height of the stacked disks is easily exceeded, resulting in a large number of physically unassembleable solutions at the initial stage. To solve this problem, this invention no longer blindly generates the number of disks, but instead generates the number of disks based on an initialization mapping mechanism based on physical height budget allocation. The initialization mapping mechanism based on physical height budget allocation includes: During population initialization, firstly in consecutive... Within the interval, a set of smooth real-valued weight vectors is randomly generated. The maximum allowable physical assembly height of the coil is considered as a total budget. Using the aforementioned real-valued weight vectors, the target allocation heights for single-turn, double-turn, triple-turn, and quadruple-turn zones are dynamically divided proportionally. After obtaining the respective target allocation heights, they are divided by the actual physical thickness of the corresponding single-turn, double-turn, triple-turn, and quadruple-turn zones, and the resulting values are rounded down to accurately calculate the actual number of discrete disks that can be processed in the single-turn, double-turn, triple-turn, and quadruple-turn zones. In this method, an individual represents a complete candidate configuration scheme for the water-cooled magnet, mathematically represented as a set of discrete values, specifically corresponding to the actual allocation number of disks with single, double, triple, and quadruple turns within each nested coil; the population refers to the set of candidate configurations composed of multiple individuals containing different combinations of disk numbers in a single iteration calculation.
[0026] This method ensures that regardless of how the algorithm randomly generates the proportional weights, the total physical stacking height of the final mapped discrete disk combination will never exceed the set engineering limit. This completely avoids the computational waste of generating a large number of height-exceeding invalid solutions during the initialization phase of conventional algorithms, thus achieving a high physical feasibility rate for the initial population. This lays a very high-quality foundation for subsequent efficient optimization. This processing method can directly ensure that the actual stacking height of all individuals in the generated initial population is strictly controlled within the set engineering boundary range.
[0027] S2, Hierarchical Fitness Assessment like Figure 3 As shown, a parallel traversal of the population is initiated, splitting the evaluation process into two levels: pre-geometric verification and subsequent electromagnetic calculation. First, a low-computational-cost pre-geometric verification is performed: the actual stacked physical height of each individual in the population is accumulated to determine if it exceeds the maximum engineering capacity limit. If it exceeds the limit, the individual is deemed to violate physical assembly constraints, fails the verification, and a penalty value is returned as the individual's overall fitness value. The subsequent evaluation process for that individual is terminated prematurely. The penalty value is calculated using the following formula: In the formula, The basic truncation maximum constant set for the system; The global height over-limit penalty weight set by the user in the algorithm console; This represents the actual height difference (in millimeters) of the i-th coil exceeding the upper limit in an individual. This constant-level mechanism, combined with a linear penalty, ensures that invalid configurations are absolutely eliminated in population selection. Here, configuration refers to an assembly scheme with a defined physical height and structure, formed by stacking a specific number of single-turn, double-turn, triple-turn, or quadruple-turn metal discs for each nested coil in the water-cooled magnet. It should be noted that in this embodiment, an individual has multiple coils, with the i-th coil numbered i. Each coil includes a single-turn region, a double-turn region, a triple-turn region, and a quadruple-turn region, for example... Figure 2 The four coils from the inside out are considered as one unit. Each coil has four turns, three turns, double turns, and single turns from top to bottom.
[0028] If no limit is exceeded, the individual passes the geometric verification. For individuals that pass the geometric verification, the central axial magnetic field is calculated. Total power consumption of the system Finally, using an asymmetric penalty model (applying a high-weight penalty for cases where the magnetic field does not meet the standard and a low-weight penalty for cases where the magnetic field has redundancy overflow) combined with the total power consumption, the overall fitness value of each individual is calculated.
[0029] The total power consumption of the system The calculation process is as follows: extract the pre-set reference operating power of each coil. This parameter is not derived from the high-overhead electrothermal coupling physical simulation performed ad hocly in each iteration of the optimization algorithm, but rather from real measurement data of this type of water-cooled magnet in past actual operation, or from known prior engineering benchmark values calibrated through previous high-precision finite element simulations (bound to a set benchmark turns configuration). This mechanism aims to transform the massive volume resistance and dynamic Joule heating calculations into a linear surrogate model with extremely low overhead. Based on this set benchmark operating power... Combined with the reference number of turns, the unit equivalent single-turn power dissipation factor of each coil is calculated. ,in, , , , These represent the base number of turns for the single-turn, double-turn, triple-turn, and quadruple-turn regions, respectively. Then, the total system power consumption under the current evaluation configuration is calculated using the principle of linear superposition. In the formula, The total number of coils in an individual. Let be the unit equivalent single-turn power dissipation factor of the i-th coil in the individual. , , , Let represent the actual number of disk plates in the single-turn, double-turn, triple-turn, and quadruple-turn regions of the i-th coil in an individual.
[0030] The central axial magnetic field The calculation process is as follows: Given the uneven current density distribution in the single-turn, double-turn, triple-turn, and quadruple-turn regions within the coil, a segmented calculation method is used to obtain the central axial magnetic field. Specifically, based on the existing principle of approximating the actual 3D spiral conductive stacked path as a 2D continuous axisymmetric current density block, the effective single-layer structural thickness within each turn segment is calculated. (For details, see LK Forbes, S. Crozier and DM Doddrell, "Rapid computation of static fields produced by thick circularsolenoids," in IEEE Transactions on Magnetics, vol. 33, no. 5, pp. 4405-4410, Sept. 1997, doi: 10.1109 / 20.620453.), and extract the equivalent surface current density corresponding to each number of turns segment. , The inner diameter of the coil. The outer diameter of the coil. The current flowing through the coil; subsequently, at the origin (height) () through formula Calculate the axial magnetic field within each turn segment, where... and The absolute coordinates of the start and end points along the central axis for each segment of turns are given. Represents the permeability of free space. It is an inverse hyperbolic sine function; it iterates through all turns of all coils in the individual, sums up the axial magnetic field calculation results of each turn segment, and obtains the central axial magnetic field. .
[0031] The specific process for evaluating magnetic field performance using an asymmetric penalty model and calculating the overall fitness value of each individual is as follows: If the calculated magnetic field does not meet the standard (i.e. Apply a high-weight penalty, namely the magnetic field penalty term. If the calculated magnetic field has redundancy overflow (i.e. Apply a low-weight penalty, namely the magnetic field penalty term. In the formula, The target's central magnetic field; Penalty weights for insufficient magnetic field (e.g., value) (magnitude) Weights for magnetic field overflow penalties (e.g., values) Quantity, meets This asymmetric quadratic penalty model not only severely punishes substandard configurations but also allows for the retention of over-performance configurations with adequate engineering safety margins. Finally, the magnetic field penalty term calculated above is... Total power consumption of the system By performing algebraic summation, the overall fitness value of the individual can be obtained. This comprehensive fitness value serves as the sole quantitative indicator driving the evolution and survival of the fittest in the next generation of the population.
[0032] S3, Local Infinite Element Search and Discrete Pseudo-Gradient Descent Mechanism First, determine if the current iteration number meets the set local search trigger condition. Specifically, set a fixed iteration interval (e.g., 50 generations). When the current iteration number is greater than 0 and an integer multiple of this interval, the local search trigger condition is met. Based on the overall fitness value calculated in the previous stage, sort the individuals in the current population from smallest to largest, and select the individuals with the smallest overall fitness value. Five individuals are used as the initial solutions for local optimization and enter the local search phase.
[0033] The local search phase utilizes a discrete pseudo-gradient descent algorithm, which is an improvement on the traditional continuous gradient descent algorithm specifically designed for water-cooled magnets. This paper clarifies the underlying technical logic and differences between using the discrete pseudo-gradient descent algorithm and the traditional continuous gradient descent algorithm: The traditional continuous gradient descent algorithm heavily relies on the differentiability of the objective function in continuous space, using mathematical partial derivatives to guide the search direction. However, the number of disks in a water-cooled magnet is essentially a discrete integer variable, and the system's objective function includes nonlinear, discontinuous, and asymmetric penalty terms such as height redline truncation. If the traditional continuous gradient is forcibly used, the calculated floating-point update result, after forced rounding, is highly susceptible to rounding oscillations in the actual physical configuration, or may directly trigger height truncation due to small accumulated errors (i.e., continuous differentiation fails). In contrast, the discrete pseudo-gradient descent algorithm proposed in this invention abandons the abstract solution of continuous partial derivatives and instead uses the system's smallest physical processing unit (i.e., one metal disk) as the basic perturbation. The fundamental difference between the two lies in the fact that the traditional continuous gradient descent algorithm indicates the extreme value of the geometric tangent descent in a continuous mathematical space, while the discrete pseudo-gradient descent algorithm directly probes in a discrete integer state space, indicating the actual assembly direction in which the overall fitness value decreases the fastest and is practically feasible among adjacent physical entity configurations. Based on the above principles, the mechanism for solving the descent direction and updating the step size in the traditional algorithm has been modified, and the specific process is as follows: 1. Discretization Reconstruction of Gradient Descent Direction: In differential evolution logic, to meet the standard format for fast matrix operations in computers, the multi-level physical data involved in an individual is flattened into a one-dimensional vector, i.e., a discrete parameter vector. The discrete parameter vector is the product of the total number of coils in an individual coil and the number of turns in each coil. The total dimension, assuming there are five coils, each with single-turn, double-turn, triple-turn, and quadruple-turn regions, and the discrete parameter vector. The total dimension is 20. Specifically, the discrete parameter vector of the current individual is defined as follows: ,in, Discrete parameter vector Total dimension, Discrete parameter vector The The actual number of disks in each dimension The transpose operation, in the specific execution of the local search, involves sequentially probing adjacent integer spaces for each coil of the selected initial solution (i.e., individual units), that is, adding or removing single physical processing units (i.e.,... or Metal disk, corresponding to unit vector The test was conducted. The discrete changes in the overall fitness value after adding or removing disks were calculated, and a surrogate pseudo-gradient operator was defined. This formula essentially constructs a new objective function for evaluating local physical energy efficiency gains: if This indicates that adding or removing disks in this dimension can reduce the system cost. By traversing each dimension, the rate of change of the overall fitness value brought about by the addition or removal of actual disks is quantified using a surrogate pseudo-gradient operator. The parameter adjustment direction with the largest decrease in overall fitness value (i.e. the highest physical energy efficiency benefit) is defined as the surrogate gradient direction of this iteration.
[0034] 2. Dynamic Damping Constraints of the Step-Size Update Mechanism: After determining the surrogate gradient direction, to prevent continuous updates along this direction from causing the configuration to exceed the physical boundary, this invention abandons the fixed learning rate (step size) and introduces a dynamic damping mechanism based on the physical boundary. When updating parameters along the surrogate gradient direction, it is assumed that the step size is... Dimensional variable belongs to the first The coil is calculated in real time. Current actual stacking height of each coil Distance to the set absolute height limit The difference (i.e., the remaining physical assembly margin). A dynamic damping coefficient less than 1 is generated based on this remaining margin. This formula shows that when there is still redundancy in coil height, near When the coil height approaches the physical assembly limit, It exhibits a linear and rapid decline and approaches a certain value. Based on this dynamic damping coefficient, the parameter update step size in this dimension is reduced proportionally to avoid exceeding the height limit after the number of disks increases. Specifically, the dynamic damping coefficient is substituted into the parameter update closed-loop formula to obtain the next generation of the [missing information - likely a specific parameter update step size]. Actual number of disks The actual number of platters in each dimension of the next generation is used as the new platter combination scheme, where, Indicates the current generation The actual number of disk platters in the dimension. The set baseline is continuously updated with a step size; This is a sign function, used only to extract the positive and negative directions of the optimization. This is the floor operator. From the parameter update closed-loop formula, it can be seen that the dynamic damping coefficient... Directly used as a multiplier for continuous step sizes At the underlying physical logic level, the jump in the variable's range when it approaches the red line is forcibly stopped. The adjusted continuous parameters are rounded down again and precisely mapped to the number of valid integer disks after integerization. Finally, the overall fitness value of the new disk combination scheme (i.e., the new solution) generated by the local search is calculated. If the overall fitness value of the new disk combination scheme is lower than the final fitness value of the initial solution of the local optimization, then in-situ replacement is performed in the population, replacing the initial solution of the local optimization with the new disk combination scheme as the current local optimization result; otherwise, the initial solution of the local optimization is used as the current local optimization result, and S4 is executed. If the current iteration does not meet the above local search triggering conditions, this step is skipped directly, and S4 is executed directly.
[0035] S4. When the local search triggering condition is not met, perform global crossover and mutation operations to generate a new generation of candidate populations. The specific process is as follows: Based on the current population's overall fitness distribution, the conventional Differential Evolution (DE) algorithm is specifically modified to perform global crossover and mutation evolution. Traditional DE algorithms apply a uniform scaling factor to all variables during mutation and crossover, and blindly exchange gene fragments. This can easily disrupt the magnetic field contribution of the sensitive coil in water-cooled magnet optimization and generate a large number of highly out-of-limit, invalid offspring. Therefore, this invention focuses on the following physical improvements to the mutation scaling factor allocation mechanism and the crossover and recombination process.
[0036] 1. Introducing anisotropic mutation of physical topology weights (improved scaling factor): This invention abandons the globally uniform mutation scaling factor in the traditional DE algorithm. An anisotropic variation strategy based on the radial position of the coils is employed. Specifically, the water-cooled magnet exhibits significant asymmetric physical sensitivity: inner coils (such as those with smaller radial dimensions) contribute greatly to the central magnetic field, and even a slight disturbance in the number of disks can cause violent magnetic field oscillations; while outer coils contribute less to the magnetic field, but their large size is crucial in determining the system's total power consumption and overall size. Accordingly, the system assigns different variation weights based on the radial position of the coils. For inner magnetic field-sensitive coils, a smaller variation scaling factor is assigned for fine-tuning of the magnetic field; for outer power-sensitive coils, a larger variation scaling factor is assigned for large-step exploration of low-power configurations. Its dynamic variation scaling factor... The calculation formula is set as follows In the formula, The basic probability constant of variation; For the first The average radius of the coil to which the dimension variable belongs; This is the maximum radius of the outermost coil of the magnet; The topological scaling factor is set; this invention uses a dynamic mutation scaling factor to replace the scaling factor in the differential evolution algorithm, and generates a mutation vector, i.e., the mutated offspring individual, according to the mutation operation steps in the differential evolution algorithm.
[0037] 2. Geometric Height Prediction-Based Crossover (Improved Crossover Operator): To address the shortcomings of traditional algorithms that easily lead to height violations when crossing mutated vectors with parent solution vectors, the system introduces a pre-judgment height mechanism. When determining whether to replace a mutated offspring (i.e., the new quantity of a certain type of disk) into a specific coil dimension of the current individual, the incremental physical height of the coil due to this crossover operation is pre-calculated at the underlying level. If the prediction and calculation result in... (That is, the introduction of new segments will cause the cumulative height of the coil to exceed the absolute red line), the crossover operator will trigger interception in this dimension, rejecting the mutated genes and forcibly retaining the number of disks in the corresponding dimension of the original parent generation, thus avoiding the generation of invalid offspring from the source of the algorithm. This represents the current actual stacking height of the coils in the mutated offspring. This represents the upper limit of the absolute height of the coil in the mutated offspring.
[0038] 3. Discretization and Boundary Bounce Verification: After the above crossover and mutation operations, the resulting offspring solution vectors may contain floating-point numbers or out-of-bounds values. This invention performs a two-step verification on all newly generated offspring individuals: First, integerization is performed. The floor function is called. First, the continuous floating-point solution vector is forcibly converted into a valid discrete integer disk allocation quantity. Second, boundary bounce verification is performed to extract the preset engineering allowable range for the number of disks in each nested coil turn area. , This is the lower limit for the number of disk platters. This represents the maximum number of disk platters. (For any dimension) If the 1st crossover after mutation The actual number of discs in each dimension Then it will be forcibly cut off and rebound to the lower limit. (For example, removing negative numbers and setting them to zero); if Then cut it down to the upper limit. After processing by this verification mechanism, a new generation of candidate populations that meet the engineering assembly boundary constraints is output and put into the next round of closed-loop iteration.
[0039] S5. Convergence Determination and Physical Configuration Output The system checks whether the current state meets the set termination conditions. These conditions include whether the maximum set number of iterations has been reached, or whether the decrease in the global optimal comprehensive fitness value within several consecutive generations is lower than a preset convergence threshold. If the termination conditions are not met, the new generation of candidate population is returned to step S2 to continue closed-loop iteration; if the termination conditions are met, the optimization main loop is stopped. Finally, after the optimization main loop ends, the system extracts the best-performing discrete combination that perfectly matches the actual processing conditions. In other words, the data of the individual with the smallest comprehensive fitness value in the population after meeting the set termination conditions is extracted as the global optimal solution. The system outputs the total power consumption and central axial magnetic field performance index corresponding to the global optimal solution, and generates the final physical assembly scheme, which includes the specific configuration number of single, double, triple, and quadruple turn disks inside each coil and the corresponding actual stacking height.
[0040] The principles and effects of the above-described method of the present invention will be analyzed and explained below. (In conjunction with...) Figure 2 The figure shown is a 2D axial cross-sectional schematic diagram of a water-cooled magnet with nested multi-coil structures and single / double / triple / quadruple turn distributions. This figure reflects the discrete solution vector execution performed by the underlying computational kernel of this invention during electromagnetic evaluation. Geometric boundary The specific process of continuous physics field data mapping and analytical derivation. The analytical derivation of the computational kernel for this physical section includes the following three cascaded steps: 1. Reconstruction of Solid Boundaries in Discrete Axial Dimensions (Z-axis): After the kernel receives a set of discrete disk quantity solution vectors from the optimization algorithm, the model first performs geometric reconstruction in the Z-axis direction. Based on the preset thickness of a single metal conductive disk and the thickness of the insulating layer, the solid boundary is calculated through algebraic accumulation. Figure 2 The starting and ending height coordinates of these four structural sections with different number of turns (single-turn section, double-turn section, three-turn section, and four-turn section) are calculated, and the overall physical assembly height of the coil is obtained by summing them. This height data is used to trigger... Figure 3Geometric criteria for the truncation mechanism of medium computing power.
[0041] 2. Physical Mapping of Radial (R-axis) Dimension and Equivalent Volume Current Density: After defining the solid boundary along the Z-axis, differences in the number of parallel / series turns in different structural segments result in variations in current density distribution within the same coil. This invention extracts the radial inner and outer diameters of the corresponding coil and, combined with the total global operating current and the calculated actual physical height, performs a physical state conversion. This mapping mechanism, at the algorithm's underlying level, equivalently transforms the originally spirally stacked discrete disk conductive entities into four continuous and uniformly distributed components on the cross-section. An axisymmetric volume current density block is used to transform a discrete structure into a physical model suitable for solving continuous algebraic equations.
[0042] 3. Memory-level algebraic direct calculation and axial definite integral: After completing the homogenized current density equivalence and spatial geometric delineation, for... Figure 2 The thick-walled cylindrical model shown is used to perform definite integrals of the algebraic equations for the internal threads of cylindrical blocks with different current densities and start and end heights. Finally, based on the principle of linear superposition, the system algebraically adds up the magnetic field contributions generated at the origin by all coaxially nested coil blocks with different numbers of turns, and outputs the evaluation result of the central axial magnetic field of this configuration.
[0043] Combination Figure 3 The diagram shown is a sub-flowchart for calculating the fitness value and determining the penalty mechanism in this invention. To address the physical dimensional constraints and electromagnetic evaluation computational overhead in water-cooled magnet design, this method introduces a hierarchical verification truncation mechanism and an asymmetric evaluation model into the evaluation process. 1. Geometric Dimension Pre-verification and Layered Evaluation Truncation Mechanism After the main loop passes the individual solution vector into the subprocess, the system constructs an evaluation truncation mechanism based on computational complexity hierarchy. Given that the system overhead of geometric addition operations (such as calculating cumulative height) is far lower than that of electromagnetic definite integral operations (such as evaluating inverse hyperbolic sine), the system splits the evaluation process into two levels: pre-geometric verification and subsequent electromagnetic calculation. The system first performs geometric verification based on the solution vector, determining whether the actual height of any coil exceeds the preset engineering physical upper limit. If the height is determined to exceed the limit during the geometric pre-verification stage, the system determines that the solution does not meet the physical assembly requirements, terminates the subsequent electromagnetic calculation process for that individual, applies a penalty value, and triggers evaluation truncation (i.e., ...). Figure 3 The "Return penalty value and terminate evaluation early" branch in the document.
[0044] This process scheduling mechanism filters out solutions that do not meet configuration constraints through a preliminary geometric verification step, avoiding the need to perform subsequent complex inverse hyperbolic sine electromagnetic analytical integral calculations on them. This mechanism reduces the overhead of ineffective definite integral calculations, concentrates computer resources on geometrically feasible individuals, and improves the overall evaluation efficiency of a single population iteration.
[0045] 2. Asymmetric magnetic field penalty mechanism combined with engineering working conditions For individuals that pass the initial height verification, the superposition value of the central axial magnetic field is calculated and compared with the set target magnetic field. In this step, the system adopts an asymmetric penalty strategy: if the calculated magnetic field is less than the target magnetic field, it is determined that the performance does not meet the standard, and the system applies a higher weight penalty value; if the calculated magnetic field is greater than or equal to the target magnetic field, the system applies only a lower weight penalty value.
[0046] The asymmetric weighting strategy incorporates the physical characteristics of water-cooled magnets operating at high power: As cooling water temperature rises, the resistivity of the conductor increases and local thermal expansion occurs, leading to a reduction and attenuation of the actual central magnetic field. Therefore, a moderate magnetic field overflow during the theoretical optimization phase is a necessary safety margin in engineering implementation. This mechanism, by adjusting the penalty weights during the evaluation phase, preserves a turns configuration with specific engineering tolerance margins during algorithm evolution.
[0047] 3. Overall fitness output Finally, the magnetic field penalty value is added to the total power consumption of the system to generate the overall fitness value of the individual. Based on the overall fitness value, the evolutionary algorithm is driven to seek the optimal combination of discrete turns that minimizes the total power consumption of the system, under the condition of satisfying the set geometric assembly limits.
[0048] Ultimately, this invention deeply integrates a global differential evolution algorithm (responsible for crossover and mutation) with a local discrete pseudo-gradient descent algorithm (responsible for depth search). In the broad initial optimization phase, the global algorithm maintains the diversity of the solution group, traversing a wide range of discrete combinations such as single-turn, double-turn, triple-turn, and quadruple-turn algorithms. When an evolutionary cycle is triggered, the local algorithm uses the current best individual as the starting point for a fine-grained search similar to gradient descent. This combination of global exploration and local development perfectly overcomes the shortcomings of traditional single numerical algorithms in multivariate mixed integer programming, which are prone to premature convergence or extremely slow convergence, greatly improving the success rate of finding the globally optimal turn number configuration.
[0049] Example 2 Embodiment 2 of the present invention also provides a water-cooled magnet optimization system, which executes the water-cooled magnet optimization method described in Embodiment 1 above, including: An initialization unit is used for population initialization. Here, the population refers to a set of candidate configurations consisting of multiple individuals in a single iteration calculation, where each individual represents a candidate configuration scheme for the water-cooled magnet. The individual evaluation unit is used to perform preliminary geometric verification on each individual in the population. For individuals that fail the verification, a penalty value is returned as the comprehensive fitness value. For individuals that pass the verification, the central axial magnetic field and the total power consumption of the system are calculated. The comprehensive fitness value is calculated by combining the asymmetric penalty model with the total power consumption. The local optimization unit determines whether the current iteration satisfies the set local search trigger conditions. If the conditions are met, individuals in the current population are sorted from smallest to largest based on their overall fitness value, and the top-performing individuals are selected. Each individual is used as the initial solution for local optimization, enters the local search phase, obtains the current local optimization result, and executes S4; if the local search triggering condition is not met, the global optimization unit is executed directly. The global optimization unit is used to perform global crossover and mutation operations to generate a new generation of candidate populations; The optimization result output unit is used to check whether the set termination conditions are met. If not, it returns to the individual evaluation unit. If so, it outputs the total power consumption and central axial magnetic field of the system corresponding to the global optimal solution and generates the configuration scheme of the water-cooled magnet.
[0050] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing water-cooled magnets, characterized in that, Includes the following steps: S1. Population initialization, where the population refers to the set of candidate configurations consisting of multiple individuals in a single iteration calculation, and each individual represents a candidate configuration scheme for the water-cooled magnet. S2. Perform a preliminary geometric check on each individual in the population. For individuals that fail the check, return a penalty value as the overall fitness value. For individuals that pass the check, calculate the central axial magnetic field and the total power consumption of the system. Use the asymmetric penalty model combined with the total power consumption to calculate the overall fitness value. S3. Determine if the current iteration meets the set local search triggering conditions. If it does, sort the individuals in the current population from smallest to largest based on their overall fitness value, and select the top... Each individual is used as the initial solution for local optimization, enters the local search phase, obtains the current local optimization result, and executes S4; if the local search triggering condition is not met, S4 is executed directly. S4. Perform global crossover and mutation operations to generate a new generation of candidate populations; S5. Check if the set termination condition is met. If not, return to S2. If yes, output the total power consumption and central axial magnetic field of the system corresponding to the global optimal solution, and generate the configuration scheme of the water-cooled magnet.
2. The water-cooled magnet optimization method according to claim 1, characterized in that, S1 includes: During population initialization, Within the interval, a set of real-valued weight vectors is randomly generated. The maximum allowable physical assembly height of the coil is considered as a total budget. Using the real-valued weight vectors, the target allocation heights allocated to single-turn, double-turn, triple-turn, and quadruple-turn areas are dynamically divided proportionally. After obtaining the respective target allocation heights, they are divided by the actual physical thickness of the corresponding single-turn, double-turn, triple-turn, and quadruple-turn areas, respectively. The resulting values are rounded down to calculate the actual number of disks allocated to the single-turn, double-turn, triple-turn, and quadruple-turn areas of the coil. This is used as an initial individual. Multiple initial individuals are used as an initial population. Each individual has multiple coils, with the i-th coil numbered as i. Each coil includes a single-turn area, a double-turn area, a triple-turn area, and a quadruple-turn area.
3. The water-cooled magnet optimization method according to claim 1, characterized in that, The preliminary geometric verification of each individual in the population, and the return of a penalty value as the overall fitness value for individuals that fail the verification, includes: The actual stacked physical height of each individual in the population is accumulated to determine if it exceeds the maximum engineering capacity limit. If it does, the individual fails the verification, and a penalty value is returned as the overall fitness value. The penalty value is calculated using the following formula: In the formula, The weight for global height exceeding the limit penalty; This represents the actual height difference between the i-th coil and the upper limit in an individual.
4. The water-cooled magnet optimization method according to claim 1, characterized in that, The process of determining the central axial magnetic field and the total power consumption of the system for the verified individuals includes: The actual stacked physical height of each individual in the population is accumulated to determine whether it exceeds the maximum engineering capacity limit. If no limit is exceeded, the individual is deemed to have passed the geometric verification. For the individuals that have passed the verification, the unit equivalent single-turn dissipation power factor of each coil of the individual is calculated. ,in, The preset reference operating power for each coil, , , , These represent the reference number of turns in the single-turn, double-turn, triple-turn, and quadruple-turn zones, respectively; and the total power consumption of the system. In the formula, The total number of coils in an individual. Let be the unit equivalent single-turn power dissipation factor of the i-th coil in the individual. , , , The actual number of disk plates in the single-turn, double-turn, triple-turn, and quadruple-turn regions of the i-th coil in an individual; For a single coil, calculate the equivalent surface current density for each turns segment. , The inner diameter of the coil. The outer diameter of the coil. The current flowing through the coil, The effective single-layer structural thickness within each turn segment; at the origin, using the formula... Calculate the axial magnetic field within each turn segment, where... and The absolute coordinates of the start and end points along the central axis for each segment of turns are given. Represents the permeability of free space. It is an inverse hyperbolic sine function; it iterates through all turns of all coils in the individual, sums up the axial magnetic field calculation results of each turn segment, and obtains the central axial magnetic field. .
5. The water-cooled magnet optimization method according to claim 4, characterized in that, The calculation of the overall fitness value using the asymmetric penalty model combined with total power consumption includes: If the calculated magnetic field does not meet the standard, that is Apply magnetic field penalty term If there is redundancy overflow in the calculated magnetic field, i.e. Apply magnetic field penalty term In the formula, The target's central magnetic field; Penalty weight for insufficient magnetic field; For the magnetic field overflow penalty weight, The calculated magnetic field penalty term Total power consumption of the system The overall fitness value of an individual is obtained by algebraically summing the results.
6. The water-cooled magnet optimization method according to claim 1, characterized in that, The local search triggering conditions include: Set a fixed iteration interval period. When the current iteration number is greater than 0 and is an integer multiple of the iteration interval period, the local search trigger condition is met; otherwise, the local search trigger condition is not met.
7. The method for optimizing a water-cooled magnet according to claim 1, characterized in that, The local search process includes: Define the discrete parameter vector of the current individual as follows: , Discrete parameter vector The total dimension, multiplied by the total number of coils in an individual, is the discrete parameter vector. The total dimension; Discrete parameter vector The The actual number of disks in each dimension Represents the transpose operation; defines a surrogate pseudo-gradient operator. ,in, for or The unit vector corresponding to the metal disk plate. Indicates the overall fitness value; if Iterate through each dimension and define the direction of adjustment of the parameter with the largest decrease in comprehensive fitness value as the proxy gradient direction for this iteration; After determining the surrogate gradient direction, when updating the parameters along the surrogate gradient direction, assume the first... Dimensional variable belongs to the first The coil is calculated in real time. Current actual stacking height of each coil Distance to the set absolute height limit The difference generates the dynamic damping coefficient. Using the aforementioned dynamic damping coefficient, the next generation of... Actual number of disks In the formula, Indicates the current generation. The actual number of disk platters in the dimension. The set baseline is continuously updated with a step size; For symbolic functions, The rounding operator is used to round down. The actual number of disks in each dimension of the next generation is used as the new disk combination scheme. The overall fitness value is calculated. If the overall fitness value is lower than the overall fitness value corresponding to the initial solution of the local optimization, then in-situ replacement is performed in the population, and the initial solution of the local optimization is replaced with the new disk combination scheme as the current local optimization result. Otherwise, the initial solution of the local optimization is used as the current local optimization result.
8. The water-cooled magnet optimization method according to claim 7, characterized in that, The mutation operation involves replacing the scaling factor in the DE algorithm with a dynamic mutation scaling factor, and generating a mutation vector according to the mutation operation steps in the DE algorithm. The mutation vector represents the mutated offspring individual. The formula for calculating the dynamic variation scaling factor is as follows: In the formula, The basic probability constant of variation; For the first The average radius of the coil to which the dimension variable belongs; This is the maximum radius of the outermost coil of the magnet; This is the set topology magnification factor; The crossover operation involves crossing the mutated vector with the parent solution vector. During this crossover, the increment of the cumulative physical height of the coil is calculated. ,like If the mutation vector is not accepted, the number of disks in the corresponding dimension of the original parent generation will be forcibly retained. This represents the current actual stacking height of the coils in the mutated offspring. This represents the upper limit of the absolute height of the coil in the mutated offspring individual; After completing the mutation and crossover operations, the resulting child solution vectors are rounded down to integers. Next, boundary bounce checks are performed to extract the pre-defined allowable range for the number of turn plates in each nested coil region. , This is the lower limit for the number of disk platters. This represents the upper limit for the number of disk platters, for any dimension. If the number of disks after mutation and crossover operations If it rebounds to the lower limit, then it will be cut off. ;like Then cut it down to the upper limit. After the boundary bounce verification process, a new generation of candidate populations that meet the engineering assembly boundary constraints are output.
9. The method for optimizing a water-cooled magnet according to claim 1, characterized in that, S5 includes: The set termination conditions include whether the maximum set number of iterations has been reached, or whether the decrease in the global optimal comprehensive fitness value within several consecutive generations is lower than the preset convergence threshold. If the termination conditions are not met, the new generation of candidate population is returned to step S2 to continue closed-loop iteration. If the termination conditions are met, the optimization main loop is stopped, the total system power consumption and central axial magnetic field performance index corresponding to the global optimal solution are output, and the final physical assembly scheme containing the specific configuration number of single, double, triple, and quadruple turn disks inside each coil and the corresponding actual stacking height is generated.
10. A water-cooled magnet optimization system, characterized in that, The method of any one of claims 1-9 comprises: An initialization unit is used for population initialization. Here, the population refers to a set of candidate configurations consisting of multiple individuals in a single iteration calculation, where each individual represents a candidate configuration scheme for the water-cooled magnet. The individual evaluation unit is used to perform preliminary geometric verification on each individual in the population. For individuals that fail the verification, a penalty value is returned as the comprehensive fitness value. For individuals that pass the verification, the central axial magnetic field and the total power consumption of the system are calculated. The comprehensive fitness value is calculated by combining the asymmetric penalty model with the total power consumption. The local optimization unit determines whether the current iteration satisfies the set local search trigger conditions. If the conditions are met, individuals in the current population are sorted from smallest to largest based on their overall fitness value, and the top-performing individuals are selected. Each individual is used as the initial solution for local optimization, enters the local search phase, obtains the current local optimization result, and executes S4; if the local search triggering condition is not met, the global optimization unit is executed directly. The global optimization unit is used to perform global crossover and mutation operations to generate a new generation of candidate populations; The optimization result output unit is used to check whether the set termination conditions are met. If not, it returns to the individual evaluation unit. If yes, it outputs the total power consumption of the system and the central axial magnetic field corresponding to the global optimal solution, and generates the configuration scheme of the water-cooled magnet.