Energy-saving method for air conditioning water system of subway station based on modelica model and genetic algorithm
By combining the Modelica model and genetic algorithm, a simulation model of the subway station air conditioning water system was established, and the parameters of chilled water and cooling water were optimized. This solved the problems of high energy consumption and difficult control of the subway station air conditioning water system, and achieved the reduction of system energy consumption and the extension of equipment life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU METRO DESIGN & RES INST CO LTD
- Filing Date
- 2025-05-30
- Publication Date
- 2026-08-04
AI Technical Summary
The water system for air conditioning in subway stations suffers from high energy consumption and difficulty in regulation. Existing control methods, such as PID controllers, are prone to oscillation when the load changes, and intelligent control methods, such as fuzzy control and neural networks, have limitations and are difficult to handle high-dimensional or multivariable problems.
An energy-saving method based on Modelica model and genetic algorithm is adopted. Through precise modeling, intelligent optimization and closed-loop control, a simulation model of the subway station air conditioning water system is established. The control strategy is optimized by using genetic algorithm and combined with the joint simulation interface of Python and MATLAB to optimize the chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow rate.
It has reduced the energy consumption of the air conditioning water system, improved energy-saving effect, shortened response time, reduced the number of equipment start-ups and shutdowns and mechanical wear, extended equipment life, supported rapid adaptation to subway stations of different sizes, and solved the problems of high energy consumption and difficult control.
Smart Images

Figure CN120630753B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy optimization and intelligent control technology for rail transit buildings, and in particular to an energy-saving method for the water system of subway station air conditioning based on the Modelica model and genetic algorithm. Background Technology
[0002] To alleviate urban traffic congestion, urban rail transit systems, especially subway systems, are receiving increasing attention. The average annual electricity consumption of subway stations in my country reaches 1.8 million to 2.3 million kWh, with ventilation and air conditioning systems alone accounting for over 40% of the total energy consumption, and water systems accounting for 60% to 65% of the overall air conditioning system energy consumption. Therefore, scholars both domestically and internationally are increasingly focusing on the energy-saving issues of air conditioning water systems.
[0003] Currently, most subway stations in China still use PID controllers. These controllers adjust the speed of variable frequency fans or water pumps to reduce energy consumption while maintaining comfort. Based on changes in indoor and outdoor loads, PID control can dynamically adjust the output of air conditioning equipment, reducing unnecessary energy waste. However, PID control methods suffer from difficulties in parameter tuning and debugging. They are prone to oscillations when the load and operating conditions of the air conditioning system change, resulting in poor control performance. Furthermore, this traditional control method struggles to handle systems with nonlinear, time-varying, and complex characteristics.
[0004] With the development of artificial intelligence, scholars have proposed new research methods to optimize the air conditioning water system of subway stations, such as fuzzy control, reinforcement learning, and neural networks. However, these methods all have limitations, such as difficulty in handling high-dimensional or multivariate problems, difficulty in convergence or slow convergence speed, difficulty in applying to real-world scenarios, and high requirements for data and computing resources. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide an energy-saving method for subway station air conditioning water systems based on Modelica model and genetic algorithm. Through the technical path of "precise modeling-intelligent optimization-closed-loop control", it systematically solves the industry problem of "high energy consumption and difficult control" of subway station air conditioning water systems, and provides an innovative solution for the construction of smart rail transit.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0007] In a first aspect, an energy-saving method for a subway station air conditioning water system based on the Modelica model and a genetic algorithm is disclosed, the method comprising:
[0008] A simulation model of a subway station air conditioning water system was built using the Modelica language and Dymola software.
[0009] The population of the established simulation model was initialized, and a genetic algorithm was implemented using MATLAB to obtain an optimized control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system.
[0010] Based on the optimized control strategy, a Dymola-MATLAB co-simulation interface was constructed using Python.
[0011] Based on the joint simulation interface, the optimal control strategy for the subway station air conditioning water system is obtained through iterative optimization using a genetic algorithm.
[0012] Furthermore, a simulation model of the subway station air conditioning water system was established in Dymola software based on the Modelica language, including:
[0013] Based on the actual structure of the subway station's air conditioning water system, the key components for modeling were determined, including the chilled water circulation environment and the cooling water circulation environment.
[0014] A chilled water circulation environment model was built using the Modelica language in Dymola software. This model includes chiller units, terminal equipment, and chilled water pumps, and the chilled water circulation process was configured.
[0015] A cooling water circulation environment model was built using the Modelica language in Dymola software. This model includes chillers, cooling towers, and cooling water pumps, and the cooling water circulation process was configured.
[0016] Create custom component models for chilled water pumps and cooling water pumps, and input actual performance curve parameters;
[0017] Select and integrate other standard components from Dymola's HVAC component library to complete the modeling of the entire air conditioning water system.
[0018] Furthermore, the established simulation model is initialized with a population, and a genetic algorithm is implemented using MATLAB to obtain an optimized control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system, including:
[0019] Based on the established Modelica model of the air conditioning water system, the key control parameters to be optimized are determined, including chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow rate.
[0020] Initialize the genetic algorithm population in MATLAB, setting the population size, number of iterations, and optimization objective function;
[0021] The fitness function is defined as the reciprocal of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population.
[0022] The calculation is iterated until the termination condition is met, and the optimized control strategy is obtained.
[0023] Furthermore, the fitness function is defined as the reciprocal of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population, including:
[0024] The fitness function is defined as the reciprocal of the objective function;
[0025] Using a fitness function and a proportional selection method, individuals are selected, and based on the roulette wheel selection mechanism, individuals with higher fitness are selected from the current population to serve as parents.
[0026] For the selected parent individuals, perform a single-point crossover operation according to the preset crossover probability to generate new offspring individuals;
[0027] For newly generated offspring individuals, a single-point mutation operation is performed according to a preset mutation probability, and random perturbation is applied within its value range;
[0028] New individuals generated through selection, crossover, and mutation are combined with some of the original, superior individuals to create a new generation of population.
[0029] Furthermore, based on the optimized control strategy, a Dymola-MATLAB co-simulation interface is constructed using Python, including:
[0030] Based on the optimized control strategy, the Modelica model is configured with the interface environment of Python and Dymola through the Dymola simulation environment;
[0031] Establish a communication connection with the Modelica simulation model by calling the Dymola API using Python;
[0032] Set up a data interaction interface between Python and MATLAB to enable bidirectional transmission of optimization parameters;
[0033] Configure the simulation files exported from the Modelica model to associate with the Python interface;
[0034] Verify the communication stability of the co-simulation interface and establish a complete co-simulation platform.
[0035] Furthermore, based on the co-simulation interface, the optimal control strategy for the subway station air conditioning water system is obtained through iterative optimization using a genetic algorithm, including:
[0036] The optimization parameters generated by the genetic algorithm are input into the Modelica model according to the co-simulation interface;
[0037] The total energy consumption of the air conditioning water system under different parameter combinations was calculated using the Modelica model simulation.
[0038] Based on the simulation results, a genetic algorithm is used to iteratively optimize the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate until the preset energy consumption minimization target is met.
[0039] The system outputs the optimal control strategy, including the best combination of parameters for chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate, to achieve energy saving in the subway station air conditioning water system.
[0040] Secondly, an energy-saving system for subway station air conditioning water systems based on the Modelica model and genetic algorithms includes:
[0041] The Modelica simulation module is used to build simulation models of subway station air conditioning water systems in Dymola software based on the Modelica language.
[0042] The genetic algorithm optimization module is used to initialize the population of the established simulation model. The genetic algorithm is implemented using MATLAB to obtain the optimal control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system.
[0043] The interface module is used to build a Dymola-MATLAB co-simulation interface using Python based on the optimized control strategy.
[0044] The control module is used to obtain the optimal control strategy for the subway station air conditioning water system through iterative optimization using a genetic algorithm based on the co-simulation interface.
[0045] Thirdly, a computing device, comprising:
[0046] One or more processors;
[0047] A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0048] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0049] The above-described solution of the present invention has at least the following beneficial effects:
[0050] By combining high-precision Modelica modeling with global optimization using genetic algorithms, the energy consumption of the air conditioning water system is reduced, improving energy efficiency. Multi-parameter collaborative optimization avoids system efficiency losses caused by single-parameter adjustments, enhancing overall energy efficiency. It adapts to 8760 hours of load variation throughout the year, including complex operating conditions such as seasonal transitions and passenger flow fluctuations. Real-time response time is reduced by 50%, and temperature control accuracy reaches ±0.5℃ (compared to ±1.5℃ using traditional methods). The optimization strategy reduces equipment start-up and shutdown frequency, reducing mechanical wear of key equipment (pumps, chillers) by 40% and extending expected lifespan by 30%. The automated optimization process will adjust... The trial period has been shortened from 2 weeks to 2 days. The parameter configuration is compatible with the existing BAS system, requiring no hardware modification. The modular design supports rapid adaptation to subway stations of different sizes. The pioneering Modelica-GA co-simulation framework solves the technical bottleneck of multi-software collaboration. The real number encoding and dynamic probability adjustment mechanism improve the algorithm convergence speed by 40%, and the interface error is <0.5%, ensuring the reliability of the optimization results. Through the technical path of "precise modeling - intelligent optimization - closed-loop control", the system systematically solves the industry problem of "high energy consumption and difficult control" of subway station air conditioning water system, providing an innovative solution for the construction of smart rail transit. Attached Figure Description
[0051] Figure 1 This is a flowchart illustrating an energy-saving method for a subway station air conditioning water system based on the Modelica model and genetic algorithm, provided by an embodiment of the present invention.
[0052] Figure 2 This is a schematic diagram of an energy-saving water system for subway station air conditioning based on the Modelica model and genetic algorithm, provided by an embodiment of the present invention.
[0053] Figure 3 This is a schematic diagram of a Modelica model for an energy-saving method for a subway station air conditioning water system based on a Modelica model and a genetic algorithm, provided by an embodiment of the present invention.
[0054] Figure 4 This is a schematic diagram of the genetic algorithm flow of a subway station air conditioning water system based on the Modelica model and genetic algorithm, provided by an embodiment of the present invention. Detailed Implementation
[0055] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0056] like Figure 1As shown, an embodiment of the present invention proposes an energy-saving method for a subway station air conditioning water system based on the Modelica model and a genetic algorithm. The method includes the following steps:
[0057] Step 11: Establish a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language;
[0058] Step 12: Initialize the population of the established simulation model, implement the genetic algorithm using MATLAB, and obtain the optimal control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system.
[0059] Step 13: Based on the optimized control strategy, construct the Dymola-MATLAB co-simulation interface using Python;
[0060] Step 14: Based on the co-simulation interface, the optimal control strategy for the subway station air conditioning water system is obtained through iterative optimization using a genetic algorithm.
[0061] In this embodiment of the invention, a model of the air conditioning water system that closely matches the actual system is created using Modelica, ensuring the accuracy of the optimization basis. The global search capability of the genetic algorithm can overcome the limitations of local optima, achieving system-level energy consumption minimization. Multi-parameter collaborative optimization avoids system efficiency losses caused by adjusting a single parameter, adaptively adjusting genetic algorithm parameters to cope with seasonal load fluctuations, and responding in real time to changes in indoor and outdoor environmental parameters to maintain optimal operating conditions. The Python interface enables seamless integration with commercial software, the modular design supports rapid adaptation to subway stations of different sizes, and the automated optimization process reduces manual debugging workload. Under the goal of minimizing energy consumption, it automatically meets indoor temperature and humidity comfort requirements, equipment operational stability constraints, and critical equipment lifespan guarantees. The Modelica model supports subsequent integration with BIM / CIM digital twin systems, the genetic algorithm framework can be extended to other optimization objectives, and the interface protocol is compatible with mainstream building automation systems. This effectively solves the industry pain points of "high energy consumption and difficult control" in subway station air conditioning systems, providing an energy-saving solution for smart subway construction.
[0062] In a preferred embodiment of the present invention, step 11 above, which involves establishing a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language, may include:
[0063] Step 111: Based on the actual structure of the subway station's air conditioning water system, determine the key components for modeling, including the chilled water circulation environment and the cooling water circulation environment;
[0064] Step 112: Use the Modelica language in Dymola software to build a chilled water circulation environment model. This model includes chiller units, terminal equipment and chilled water pumps, and configures the chilled water circulation process.
[0065] Step 113: Use the Modelica language in Dymola software to build a cooling water circulation environment model. This model includes chiller units, cooling towers and cooling water pumps, and configures the cooling water circulation process.
[0066] Step 114: Create custom component models for the chilled water pump and cooling water pump, and input the actual performance curve parameters;
[0067] Step 115: Select and integrate other standard components from Dymola's HVAC component library to complete the modeling of the entire air conditioning water system.
[0068] In this embodiment of the invention, the actual structure of the subway station air conditioning water system is modeled to ensure a high degree of consistency between the simulation model and the actual system, thereby improving the accuracy of the optimization results. The simulation model includes chilled water circulation and cooling water circulation, avoiding errors caused by model simplification. Custom pump models are input with actual performance parameters, making the simulation closer to real operating conditions. Standard equipment is quickly integrated using the Dymola HVAC component library, reducing repetitive modeling work. The complete circulation process of chilled water and cooling water is accurately simulated, providing a reliable simulation environment for subsequent genetic algorithm optimization. The model supports steady-state and transient simulations, accurately reflecting dynamic processes such as load changes and equipment start-up and shutdown, ensuring the effectiveness of the optimization strategy in actual operation.
[0069] In this embodiment of the invention, the specific steps include:
[0070] Step 111: During the data collection phase, gather design drawings and technical specifications for the subway station's air conditioning water system. Conduct on-site measurements and record the pipeline layout and installation locations of key equipment. Compile performance parameter tables for equipment such as chillers, pumps, and cooling towers. The main components of the chilled water circulation environment include chillers (including the evaporator side), chilled water pump sets (including variable frequency control systems), air conditioning terminal units (fan coil units, air handling units, etc.), and the chilled water circulation piping system. The main components of the cooling water circulation environment include chillers (including the condenser side), cooling water pump sets, cooling tower units, and the cooling water circulation piping system. Compile an equipment parameter list, including rated power, flow range, and temperature control range. Collect performance curve data for each piece of equipment and determine the system control logic and operating strategy.
[0071] Step 112: In Dymola software, a chilled water circulation environment model is built using the Modelica language. This model includes chiller units, terminal devices, and chilled water pumps, and the chilled water circulation process is configured. The chiller unit includes setting key parameters such as cooling capacity and COP, and configuring the evaporator-side water circuit connection interface. The chilled water pump includes defining the pump's rated parameters and setting the variable frequency control logic. The terminal devices include selecting the model and setting the heat exchange parameters. After passing through the chiller unit's condenser, the chilled water is sent to the terminal devices by the chilled water pump, and then returns to the chiller unit, forming a chilled water pump circulation.
[0072] Step 113: In Dymola software, a cooling water circulation environment model is built using the Modelica language. This model includes a chiller unit, a cooling tower, and a cooling water pump, and the cooling water circulation process is configured. The modeling of the cooling system components includes modeling the chiller unit condenser side, setting the cooling water pump parameters, and modeling the cooling tower performance. The construction of the circulation environment includes establishing the cooling water circulation pipeline connection, setting the cooling water design operating parameters, and configuring the cooling tower control strategy. The cooling water is sent to the cooling tower after passing through the chiller unit evaporator and then sent back to the chiller unit by the chilled water pump, forming a cooling water circulation.
[0073] Step 114: Collect performance curve data provided by the pump manufacturer, and organize key curves such as flow rate-head and flow rate-efficiency; build a basic pump model based on Modelica language, import the measured performance curve data, set the parameter adjustment interface, verify the model output under operating conditions, and adjust the parameters to ensure the accuracy of the model.
[0074] Step 115: Add necessary auxiliary equipment such as valves and sensors from the library, and configure the safety protection device model; unify the units of parameters for each component of the system, and set the simulation environment parameters; perform steady-state condition verification, execute dynamic response tests, and adjust model parameters to improve accuracy; encapsulate the complete air conditioning water system model into a reusable composite component, set standardized input and output interfaces, and generate model documentation; export the model as an MO file format, and call the MO file through the Python environment. When values are assigned to the input interface parameters (including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate) in Python, the Modelica model can be driven to perform simulation calculations and return the output interface parameters (total system energy consumption).
[0075] In a preferred embodiment of the present invention, step 12 above, which initializes the population of the established simulation model and uses MATLAB to implement a genetic algorithm to obtain an optimized control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system, may include:
[0076] Step 121: Based on the established Modelica model of the air conditioning water system, determine the key control parameters to be optimized, including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate.
[0077] Step 122: Initialize the genetic algorithm population in MATLAB, setting the population size, number of iterations, and optimization objective function;
[0078] Step 123: The fitness function is defined as the reciprocal of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population.
[0079] Step 124: Iterate the calculation until the termination condition is met to obtain the optimized control strategy.
[0080] In this embodiment of the invention, core control variables such as chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate are optimized, directly impacting key aspects of system energy consumption. The genetic algorithm avoids getting trapped in local optima through population iteration, ensuring the optimal parameter combination is found under all operating conditions, thus improving overall system energy efficiency. While reducing energy consumption, the fitness function constraint ensures improved indoor temperature and humidity comfort and equipment operational stability. The optimization strategy automatically adapts to seasonal and instantaneous load changes, avoiding frequent manual adjustments, shortening system adjustment response time, preventing equipment overload or frequent start-stop, and reducing mechanical wear on water pumps and chillers.
[0081] In this embodiment of the invention, the specific steps include:
[0082] Step 121: Set the input interface of the subway station air conditioning water system simulation model, including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate, as the optimization objects of the genetic algorithm; set the chilled water outlet temperature to a dynamic adjustment range of 5-10℃, which affects the chiller unit efficiency; set the cooling tower outlet temperature to a dynamic adjustment range of 25-35℃, which determines the condenser working state; set the cooling water pump flow rate to be adjusted according to 50-100% of the rated flow rate, which is related to the pump energy consumption and heat exchange effect.
[0083] Step 122: Based on the parameter dimensions (usually 50-200 individuals), the number of iterations is determined based on convergence testing (default 100-500 generations); the objective function is to minimize the total system energy consumption, which is calculated using the following process: Among them, P el For the system's instantaneous energy consumption, For the instantaneous energy consumption of the chiller unit, This refers to the instantaneous energy consumption of the chilled water pump. For the instantaneous energy consumption of the cooling water pump, This refers to the instantaneous energy consumption of the cooling tower. Among them, E elThe annual energy consumption of the air conditioning water system. To calculate the energy consumption of the air conditioning water system in hour k, the annual energy consumption of the system was simulated using Modelica's built-in solver (Dassl). Latin hypercube sampling (LHS) was used to generate the initial population to ensure uniform coverage of the parameter space. Each individual was encoded as a real number vector in the form of [chilled water temperature, cooling tower temperature, water pump flow rate].
[0084] Step 123: The fitness function is defined as the reciprocal of the objective function. A penalty term is introduced to handle constraint violations (such as a sharp drop in fitness when temperature and humidity exceed the limits). The roulette wheel selection method is used to prioritize the retention of individuals with high fitness. The selected individuals are subjected to simulated binary crossover (SBX) to exchange some parameter values. Polynomial mutation is applied to the parameters according to probability to maintain population diversity. Parent and offspring individuals are merged. The new generation of the population is selected according to fitness ranking. The best individual in each generation and its objective function value are recorded.
[0085] Step 124: Convergence condition determination: the optimal individual fitness change rate is <0.01% for 10 generations, reaching the preset iteration number (e.g., 200 generations); output the global optimal parameter combination as chilled water temperature setpoint, cooling tower temperature setpoint and water pump flow regulation curve; generate parameter-energy consumption relationship graph to guide the adjustment of operation strategy and obtain the optimized control strategy.
[0086] In a preferred embodiment of the present invention, step 123 above, where the fitness function is defined as the reciprocal of the objective function, and individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population, may include:
[0087] Step 1231: The fitness function is defined as the reciprocal of the objective function;
[0088] Step 1232: Using the fitness function and the proportional selection method, individuals are selected. According to the roulette wheel selection mechanism, individuals with higher fitness are selected from the current population as parents.
[0089] Step 1233: For the selected parent individuals, perform a single-point crossover operation according to the preset crossover probability to generate new offspring individuals;
[0090] Steps 1234: For the newly generated offspring individuals, perform a single-point mutation operation according to the preset mutation probability, and randomly perturb within its value range;
[0091] Steps 1235 involve combining the new individuals generated through selection, crossover, and mutation operations with some of the superior original individuals to generate a new generation of population.
[0092] In this embodiment of the invention, a proportional selection method and a roulette wheel selection mechanism are employed. High-fitness individuals are selected as parents based on the fitness function, ensuring that high-quality individuals participate in genetic operations, driving the population towards the optimization goal, and accelerating the algorithm's convergence to the optimal or near-optimal solution. In the optimization of subway station air conditioning water systems, this method can quickly find a combination of low-energy consumption, high comfort, and stability operating parameters, saving resources and time. Single-point crossover is performed on the selected parents to generate offspring, combining superior features to increase population diversity. Single-point mutation is performed on the offspring, randomly perturbing and breaking local optima to explore a broader solution space. New individuals are combined with some excellent original individuals to form a new generation of the population, both driving evolution and introducing new features while retaining excellent individuals to maintain stability and avoiding the impact of poor individuals on performance, ensuring the algorithm's robustness.
[0093] In this embodiment of the invention, the specific steps include:
[0094] Step 1231: Based on the simulation results of the Modelica model, obtain the total system energy consumption value for each individual and calculate the fitness value. Where f is the objective function, F j Let f be the fitness of individual j in the population, and f be the reciprocal of the objective function f for that individual, ensuring that the lower the energy consumption, the higher the fitness.
[0095] Step 1232: Calculate the probability of each individual being selected according to the proportional selection method formula. Map the selection probability of each individual sequentially to the (0,1) interval to form non-overlapping probability regions. Use a random number generator to generate a number of random numbers between 0 and 1 equal to the population size. Check which individual's probability region each random number falls into. The individual corresponding to that region is selected as the parent individual. Repeat this process until a sufficient number of parent individuals are selected.
[0096] Step 1233: The selected parent individuals are grouped in pairs based on their proximity to each other. To improve the crossover probability, a single-point crossover operation is performed on the chromosomes of adjacent individuals. The crossover position is randomly selected, and the chromosomes are exchanged from that position, similar to gene division and recombination in biological evolution. In this way, the two offspring individuals will each possess certain characteristics of their respective parents. By utilizing crossover, it is possible for parent individuals to combine in the offspring to form individuals with higher fitness.
[0097] Steps 1234: For each newly generated offspring individual, perform mutation judgment. For each offspring individual, generate a random number between 0 and 1 and compare this random number with the preset mutation probability. For the offspring individual determined to be mutated, perform the operation on each bit of its chromosome. For each gene, randomly generate a new value within its value range to replace the original value, thus completing the single-point mutation operation.
[0098] Step 1235: Calculate the fitness value of all original individuals in the current population, sort them from high to low fitness, select some original individuals with high fitness according to the pre-set retention ratio (e.g., retain the top 20% of individuals in the original population with high fitness), merge the new individuals generated by selection, crossover and mutation operations with the selected excellent original individuals to form a new generation of population, and prepare for the next round of genetic algorithm iteration.
[0099] In a preferred embodiment of the present invention, step 13 above, which involves constructing a Dymola-MATLAB co-simulation interface using Python based on an optimized control strategy, may include:
[0100] Step 131: Based on the optimized control strategy, configure the Python and Dymola interface environment for the Modelica model through the Dymola simulation environment.
[0101] Step 132: Establish a communication connection with the Modelica simulation model by calling the Dymola API via Python;
[0102] Step 133: Set up the data interaction interface between Python and MATLAB to achieve bidirectional transmission of optimization parameters;
[0103] Step 134: Configure the connection between the simulation file exported from the Modelica model and the Python interface;
[0104] Step 135: Verify the communication stability of the co-simulation interface and establish a complete co-simulation platform.
[0105] In this embodiment of the invention, a Python interface bridges Dymola and MATLAB (genetic algorithm optimization), overcoming the limitations of traditional single-platform simulation. Optimization parameters and simulation results are transmitted bidirectionally in real time. The Python interface ensures that the optimization parameters received by the Dymola simulation model are transmitted without distortion. The interface has a built-in data verification function that can automatically detect and repair transmission anomalies, improving system fault tolerance. It provides plug-and-play co-simulation templates, enabling rapid deployment even for non-professional developers. Interface scheduling enables the offloading of computational tasks between Dymola and MATLAB, reducing reliance on high-performance computers and lowering hardware costs. The interface platform supports parallel optimization of multiple subway station models and can be extended to city-level air conditioning system cluster management. The co-simulation interface is naturally compatible with BIM / CIM systems, providing real-time optimization capabilities for smart subway operation and maintenance. Through this innovative cross-platform co-simulation interface, the technical challenge of "model-algorithm" collaboration in complex system optimization is solved, providing a standardized implementation path for intelligent optimization of building energy systems.
[0106] In this embodiment of the invention, the specific steps include:
[0107] Step 131: Confirm that the Dymola software is correctly installed and the license is activated. Simultaneously, install the Python environment and set the environment variable to point to the Dymola installation directory, ensuring it accurately points to the Dymola installation directory. Configure the environment path for Python to call Dymola executable programs and verify that basic communication functions are working correctly.
[0108] Step 132 involves using a Python script to precisely load the target Modelica model file, meticulously initializing model simulation parameters (such as time step and solver type), and properly setting up the model's basic operating environment to lay a solid foundation for subsequent simulation work. Regarding communication link construction, a stable and reliable inter-process communication channel is built, data transmission protocols and formats are carefully configured, and a heartbeat detection mechanism is introduced to comprehensively ensure the stability and reliability of the communication connection. Functional verification testing is then conducted, executing simple and representative model simulation commands to fully verify the correctness of parameter settings and the completeness of result acquisition functions. Furthermore, the error handling mechanism under abnormal conditions is thoroughly tested to ensure the system can operate stably in various complex scenarios.
[0109] Step 133, the data exchange protocol design involves defining the data structure for parameter transmission, formulating data serialization / deserialization rules, setting up a data verification mechanism, establishing a parameter transmission channel from Python to MATLAB, implementing a result feedback channel from MATLAB to Python, configuring data caching and retransmission mechanisms, and achieving bidirectional transmission.
[0110] Step 134: Export the Modelica model as an executable simulation file, perform necessary lightweight processing on the model file, add the metadata information required by the interface; establish the mapping relationship between model variables and interface parameters, configure parameter conversion rules and unit unification, set default parameter values and valid ranges; develop automatic loading and initialization scripts, realize the function of batch parameter setting, and build an automatic result extraction mechanism.
[0111] Step 135: Perform functional testing through single-call integrity testing, continuous operation stability testing, and boundary condition testing. Evaluate and optimize communication latency, test the performance of large data transmission, and optimize resource usage configuration to achieve performance optimization. Platform deployment includes encapsulating complete interfaces into independent modules, writing user manuals, and preparing error code manuals and troubleshooting guides.
[0112] In a preferred embodiment of the present invention, step 14 above, which involves obtaining the optimal control strategy for the subway station air conditioning water system through iterative optimization using a genetic algorithm based on a co-simulation interface, may include:
[0113] Step 141: Input the optimization parameters generated by the genetic algorithm into the Modelica model according to the co-simulation interface;
[0114] Step 142: Calculate the total energy consumption of the air conditioning water system under different parameter combinations using Modelica simulation.
[0115] Step 143: Based on the simulation results, use a genetic algorithm to iteratively optimize the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate until the preset energy consumption minimization target is met.
[0116] Step 144: Output the optimal control strategy, including the best parameter combination of chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow rate, to achieve energy saving of the subway station air conditioning water system.
[0117] In this embodiment of the invention, closed-loop optimization using genetic algorithms and Modelica simulations overcomes local optima limitations, simultaneously adjusting chilled water temperature, cooling water temperature, and pump flow rate to avoid system efficiency losses caused by adjusting a single parameter. The optimization strategy automatically adapts to the 8760-hour load variations of the subway station throughout the year, including seasonal changes and passenger flow fluctuations. Parameter combinations can be dynamically adjusted, reducing system response time by 50% and ensuring optimal performance under any operating conditions. The optimization strategy avoids frequent equipment start-ups and overload operation, extends the lifespan of pumps and chillers, and the parameter combinations are rigorously verified through simulation, reducing the risk of system oscillation.
[0118] In this embodiment of the invention, the specific steps include:
[0119] Step 141: The system operating parameters are expressed in a structured manner using real-number encoding. The three key parameters—cooling water flow rate (cwflow), chilled water outlet temperature (KM), and cooling tower outlet temperature (OP)—are encoded as real-number vectors of length 3, where each gene position corresponds to a normalized value of a parameter (e.g., [0.5, 0.5, 0.5] indicates that all three parameters take the median value, which actually corresponds to 30m). 3 / h, 7℃ and 29℃). During the genetic algorithm iteration process, the system automatically parses the output optimization parameter matrix, extracts the encoded chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow rate values, and verifies them through preset feasible ranges (e.g., chilled water temperature 5-9℃, cooling water flow rate 25-35m³ / h, 7℃ and 29℃). 3 / h etc.); For parameters that exceed limits, the system will automatically correct them based on boundary values to ensure that all parameters meet physical constraints. The corrected parameters will be converted into floating-point arrays that the Modelica model can recognize and written to the model input variable interface in batches through the co-simulation interface. After the parameter injection is completed, the system will check the update status of each target parameter in real time to verify the integrity of the parameter injection, and record detailed parameter modification logs, including timestamps, original parameter values, corrected values and other key information, to provide complete data traceability support for subsequent optimization process analysis and system debugging.
[0120] Step 142: Set the simulation time range (e.g., 8760 hours per year) and step size (1 hour recommended). Select the Dassl or CVODE solver, balancing calculation speed and accuracy. Configure the output variable list, including at least the total system energy consumption, power consumption of each device, and key temperature indicators. Start the Modelica model simulation, monitor the calculation progress in real time, capture simulation anomalies (such as divergence or timeout), trigger the automatic recovery process, extract the simulation result file (.mat or .csv format), and analyze the total energy consumption and auxiliary indicators.
[0121] Step 143: Calculate the fitness value (the reciprocal of the objective function) based on the simulation results. Where f is the objective function, F j Let be the fitness of individual j in the population, and be the reciprocal of the objective function f for that individual. Based on the fitness value of each individual, a selection algorithm (such as roulette wheel selection) is used to select a certain number of individuals as parents, as shown in the formula: Among them, F j P represents the fitness of individual j in the population. j Let be the probability of individual j being selected in the population. Each individual's probability of selection can be sequentially assigned a probability region. Connecting all probability regions forms the interval (0, 1). Then, a random number between 0 and 1 is generated, the same number as the population size. If this random number appears in a certain probability region, the individual corresponding to that region is selected for the next generation. Clearly, individuals with higher fitness have a higher probability of being selected and replicated for the next generation, while individuals with lower fitness are more likely to be eliminated.
[0122] To improve the global search capability of genetic algorithms, the crossover and mutation probabilities can be automatically updated with the fitness during iterative calculations. This requires first introducing the expected value EX and variance DX of the fitness, as follows: Here, n represents the number of individuals in the population. As the genetic algorithm iterates, individuals with high fitness in the offspring are copied and retained, while individuals with low fitness are eliminated. Therefore, the overall fitness of the population will gradually increase, while the number of individuals that can be retained will gradually increase, and these individuals will mostly be similar individuals with high fitness, thus gradually decreasing.
[0123] The population similarity coefficient ρ can be introduced using the expected value EX and variance DX of fitness F. The crossover probability P can be improved by using the population similarity coefficient ρ. c and the probability of mutation P m , Where h1 is an adjustable constant, h1∈(0,+∞); h2 is an adjustable constant, h2∈(0,1), and the crossover probability P increases with the increase of the population similarity coefficient ρ. c This will decrease the mutation probability P. m This will increase the probability of crossover and mutation, making it more similar to the actual biological evolution process.
[0124] To improve the crossover probability P c A single-point crossover operation is performed on the chromosomes of two adjacent individuals, randomly selecting the crossover point, and the chromosomes are exchanged from that point onwards, similar to gene division and recombination in the process of biological evolution. For example, suppose two parent individuals... for: Assuming crossover starts from the 3rd position, the crossover will result in two new offspring individuals. They are respectively: In this way, the two offspring individuals each possess certain characteristics of their respective parents. Crossover can then be used to combine parent individuals into offspring with higher fitness, thereby improving the mutation probability P. m Mutations occur at every individual in the parent generation, and this mutation property allows the solution process to randomly search the entire space where solutions exist.
[0125] The fitness of the best individual is recorded in each generation. If the improvement is less than 0.1% for 10 consecutive generations, the system is considered to have converged. When the maximum number of iterations (e.g., 200 generations) is reached, the system is forcibly terminated and the current best solution is output.
[0126] Step 144: Extract the individual with the highest fitness from the final iteration results of the genetic algorithm, decode its real-valued encoded vector, and obtain the specific values of chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate; verify whether the parameters are within the engineering feasible range (e.g., chilled water temperature 5-9℃, cooling water pump flow rate 25-35m³ / h). 3 / h), round the critical value, input the optimal parameters into the Modelica model for verification simulation, and confirm that the total energy consumption of the system is consistent with the algorithm prediction (deviation <1%); list the optimal parameter combination and its allowable fluctuation range (such as the chilled water temperature setpoint 7.2℃±0.3℃) to achieve energy saving of the subway station air conditioning water system.
[0127] like Figure 2As shown, embodiments of the present invention also provide an energy-saving system 20 for a subway station air conditioning water system based on the Modelica model and genetic algorithm, comprising:
[0128] Modelica simulation module 21 is used to build a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language.
[0129] The genetic algorithm optimization module 22 is used to initialize the population of the established simulation model, implement the genetic algorithm using MATLAB, and obtain the optimized control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system.
[0130] Interface module 23 is used to build a Dymola-MATLAB co-simulation interface using Python based on the optimized control strategy;
[0131] The control module 24 is used to obtain the optimal control strategy of the subway station air conditioning water system through iterative optimization using a genetic algorithm based on the co-simulation interface.
[0132] The invention will be further illustrated below with reference to examples:
[0133] This invention relates to an energy-saving method for subway station air conditioning water systems based on the Modelica model and genetic algorithm, comprising the following steps:
[0134] Step 1, refer to the appendix Figure 3 This paper establishes a simulation model of a subway station's air conditioning water system in the Modelica language environment. The simulation model is mainly divided into two parts: a chilled water system and a cooling water system. The chilled water system includes chillers, terminals, and chilled water pumps; the cooling water system includes chillers, cooling towers, and cooling water pumps. Chilled water passes through the chiller condenser and is then pumped to the terminals, returning to the chiller, forming a chilled water pump cycle. Cooling water passes through the chiller evaporator and is then pumped to the cooling tower, returning to the chiller, forming a cooling water cycle. This example establishes a model of the air conditioning water system of a subway station in Guangzhou. In the established air conditioning water system model, different chilled water outlet temperatures, cooling tower outlet temperatures, and cooling water pump flow rates (Input) will result in different total energy consumption (Output) of the air conditioning water system. Therefore, the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate are not explicitly labeled with specific values in the model, but are instead presented as input interfaces. This allows a genetic algorithm (GA) in Python to optimize the input and find the maximum output.
[0135] The above subway station air conditioning water system model is encapsulated and exported as an MO file. By calling this file in Python software and providing the specific values of the Input in Python, the Output can be calculated in the Modelica model.
[0136] Simultaneously, by calling the genetic algorithm code written in MATLAB from Python, a joint simulation using Python, Modelica, and MATLAB was achieved.
[0137] The specific process of using a genetic algorithm in MATLAB is as follows: First, input the initial value of Input, calculate Output. If it is not the optimal individual (i.e., Input), then perform selection, crossover, and mutation operations on the individual until the optimal individual is output within the number of iterations.
[0138] Step 2: Set the input interface of the subway station air conditioning water system simulation model, including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate, as the optimization objects of the genetic algorithm. Set the output interface of the subway station air conditioning water system simulation model: total energy consumption of the air conditioning water system, E. el Calculated by the following process: Among them, P el For the system's instantaneous energy consumption, For the instantaneous energy consumption of the chiller unit, This refers to the instantaneous energy consumption of the chilled water pump. For the instantaneous energy consumption of the cooling water pump, This refers to the instantaneous energy consumption of the cooling tower. Among them, E el The annual energy consumption of the air conditioning water system. The annual energy consumption of the air conditioning water system is simulated using Modelica's built-in solver (Dassl) to obtain the energy consumption of the system in the kth hour.
[0139] Step 3: Configure the interface between the Modelica model and the MATLAB genetic algorithm using Python.
[0140] ① Create an instance of the Dymola interface so that Dymola's functions can be called later.
[0141] dymola = dymolaInterface()
[0142] ② Call the Dymola's simulateModel function to run the Modelica model and obtain the return value.
[0143] Package = dymola.simulateModel("model")
[0144] ③ Load all system runtime parameter combinations from the ini_value module and output these parameters.
[0145] load_ini = ini_value()
[0146] print('All system runtime parameter combinations include:')
[0147] print(load_ini)
[0148] ④ Initialize an empty list result and start looping through all parameter combinations load_ini.
[0149] result = []
[0150] for iin load_ini:
[0151] ⑤ For each parameter combination, call the `simulateMultiExtendedModel` function to run the model, passing in various parameters, and return the simulation status "ok" and the results "values". `ok,values = dymola.simulateMultiExtendedModel("model", 5097600, 28857600, 0, 0.0,`
[0152] "Dassl",0.0001,0.0,"res",
[0153] ["cw_Flow.threshold",
[0154] "t_target_KM.k","t_target_OP.k"],
[0155] [i],
[0156] ["statEnergy.summary.E_el_cons"],)
[0157] ⑥ Add the simulation results (values) to the result list and print the total system energy consumption for the current parameter combination.
[0158] result.append(values)
[0159] print(f"When the system's operating parameters are {i}, the total energy consumption is {[round(sum(j),2)for j invalues]}(kW·h)")
[0160] The above interface code can be used to perform joint simulation of the Modelica model and the MATLAB genetic algorithm.
[0161] Step 4: Obtain the optimal control strategy for the subway station's air conditioning water system through genetic algorithm simulation.
[0162] (1) Encoding method
[0163] This invention uses real number encoding to express system operating parameters. Encoding the system operating parameters with real numbers allows them to be represented as a data structure that can be operated by a genetic algorithm. In the genetic algorithm, each individual represents a unique system operating parameter. If an individual has a chromosome of [0.5, 0.5, 0.5], then this chromosome of length 3 represents that the three parameters all take the median value, namely, the cooling water flow rate (cwflow), the chilled water outlet temperature (KM), and the cooling tower outlet temperature (OP) are 30, 7, and 29, respectively.
[0164] (2) Objective function
[0165] The goal of model parameter optimization is to find a set of optimal system operating parameters to reduce the total system energy consumption. Therefore, the objective function f is the total system energy consumption:
[0166] min f = E_el_cons
[0167] E_el_cons is the total system energy consumption in Dymola.
[0168] (3) Fitness function
[0169] The fitness function F is constructed using the reciprocal of the objective function, as shown in equation (1.1):
[0170]
[0171] Among them, F j Let f be the fitness of individual j in the population, and f be the reciprocal of the objective function f for that individual.
[0172] The higher the energy consumption, the better the fitness of the system's operating parameters F. j The smaller the value, the easier it is to be eliminated in the algorithm iteration.
[0173] The method for selecting individuals based on fitness (replicating individuals with high fitness and eliminating individuals with low fitness) is proportional selection, as shown in equation (1.2):
[0174]
[0175] Among them, P j Let be the probability that individual j is selected in the population.
[0176] Each individual's probability of being selected can be sequentially assigned to a probability region. Connecting all probability regions forms the interval (0, 1). Then, a random number between 0 and 1 is generated, the same number as the population size. If this random number appears in a certain probability region, the individual corresponding to that region is selected for the next generation. Clearly, individuals with higher fitness have a higher probability of being selected and replicated for the next generation, while individuals with lower fitness are more likely to be eliminated.
[0177] (4) Crossover probability and mutation probability
[0178] To improve the global search capability of the genetic algorithm, the crossover probability and mutation probability can be automatically updated with the fitness F during the iterative calculation process. First, the expected value EX and variance DX of the fitness F need to be introduced, as shown in equations (1.3) and (1.4).
[0179]
[0180] Where n is the number of individuals in the population.
[0181] As the genetic algorithm iterates, individuals with high fitness in the offspring are copied and retained, while those with low fitness are eliminated. Therefore, the overall fitness of the population gradually increases, EX gradually increases, and at the same time, more individuals can be retained, which are mostly similar individuals with high fitness, DX gradually decreases.
[0182] The population similarity coefficient ρ can be introduced using the expected value EX and variance DX of fitness F, as shown in equation (1.5):
[0183]
[0184] As mentioned earlier, with the iterative calculation of the genetic algorithm, EX gradually increases and DX gradually decreases. Therefore, the population similarity coefficient ρ will gradually increase, indicating an improvement in the similarity of individuals in the population. The population similarity coefficient ρ can be used to improve the crossover probability P. c and the probability of mutation P m See equations (1.6) and (1.7).
[0185]
[0186] Where h1 is an adjustable constant, h1∈(0,+∞); h2 is an adjustable constant, h2∈(0,1).
[0187] As the population similarity coefficient ρ increases, the crossover probability P... c This will decrease the mutation probability P. m This will increase the probability of crossover and mutation, making it more similar to the actual biological evolution process.
[0188] (5) Single-point crossover operator
[0189] To improve the crossover probability P c A single-point crossover operation is performed on the chromosomes of two adjacent individuals, randomly selecting the crossover location, and the chromosomes are exchanged from that location, similar to gene division and recombination in the process of biological evolution. For example, suppose two parent individuals... for:
[0190]
[0191] Assuming crossover starts from the 3rd position, the crossover will result in two new offspring individuals. They are respectively:
[0192]
[0193] In this way, the two offspring individuals each possess certain characteristics of their respective parents. By using crossover, it is possible to combine parent individuals into offspring with higher fitness.
[0194] (6) Single-point mutation operator
[0195] To improve the mutation probability P m Mutations occur at every individual in the parent generation. This mutation property allows the solution process to randomly search the entire space where solutions may exist, thus enabling the global optimal solution to be obtained to a certain extent.
[0196] (7) Algorithm Flow
[0197] The algorithm flow is as follows: Figure 4 As shown
[0198] ① Beginning:
[0199] Read the original model settings parameters to obtain the initial individual;
[0200] ② Initialize the population:
[0201] New individuals are generated using a random function and then combined with the initial individuals to form a population (n=50);
[0202] ③ Calculate fitness:
[0203] The fitness of an individual is calculated using the penalty function and the fitness function;
[0204] ④Choose:
[0205] Parent individuals are selected based on individual fitness using a proportional selection method.
[0206] ⑤ Crossover and mutation:
[0207] Perform crossover and mutation on the parent individuals based on the improved crossover and mutation probabilities to obtain the offspring population;
[0208] ⑥ Heredity:
[0209] In iterative genetic computation, if the deviation between the top 20% of individuals with the highest fitness in two generations of the population is less than the preset accuracy requirement, such as less than 0.0001, the iterative computation is considered to have converged and the computation can be terminated early; otherwise, the iterative computation will continue until the maximum number of generations (max step = 100).
[0210] ⑦ Termination:
[0211] Output the optimization results.
[0212] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An energy-saving method for subway station air conditioning water systems based on Modelica model and genetic algorithm, characterized in that, The method includes: A simulation model of a subway station air conditioning water system was built using the Modelica language and Dymola software. The population of the established simulation model was initialized, and a genetic algorithm was implemented using MATLAB to obtain an optimized control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system. Based on the optimized control strategy, a Dymola-MATLAB co-simulation interface was constructed using Python. This included: configuring the Modelica model within the Dymola simulation environment, setting up the interface between Python and Dymola; establishing a communication connection between Python and the Modelica simulation model by calling the Dymola API; setting up a data interaction interface between Python and MATLAB to achieve bidirectional transmission of optimization parameters; configuring the simulation files exported from the Modelica model to associate with the Python interface; verifying the communication stability of the co-simulation interface; and establishing a complete co-simulation platform. Based on the co-simulation interface, the optimal control strategy for the subway station air conditioning water system is obtained through iterative optimization using a genetic algorithm. This includes: inputting the optimization parameters generated by the genetic algorithm into the Modelica model using the co-simulation interface; simulating and calculating the total energy consumption of the air conditioning water system under different parameter combinations using the Modelica model; based on the simulation results, iteratively optimizing the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate using a genetic algorithm until the preset energy consumption minimization target is met; and outputting the optimal control strategy, including the best parameter combination of chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate, to achieve energy saving in the subway station air conditioning water system.
2. The energy-saving method for subway station air conditioning water systems based on the Modelica model and genetic algorithm according to claim 1, characterized in that, A simulation model of a subway station air conditioning water system was built using the Modelica language in the Dymola software, including: Based on the actual structure of the subway station's air conditioning water system, the key components for modeling were determined, including the chilled water circulation environment and the cooling water circulation environment. A chilled water circulation environment model was built using the Modelica language in Dymola software. This model includes chiller units, terminal equipment, and chilled water pumps, and the chilled water circulation process was configured. A cooling water circulation environment model was built using the Modelica language in Dymola software. This model includes chillers, cooling towers, and cooling water pumps, and the cooling water circulation process was configured. Create custom component models for chilled water pumps and cooling water pumps, and input actual performance curve parameters; Select and integrate other standard components from Dymola's HVAC component library to complete the modeling of the entire air conditioning water system.
3. The energy-saving method for subway station air conditioning water systems based on the Modelica model and genetic algorithm according to claim 2, characterized in that, The established simulation model is initialized with a population, and a genetic algorithm is implemented using MATLAB to obtain an optimal control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system. This strategy includes: Based on the established Modelica model of the air conditioning water system, the key control parameters to be optimized are determined, including chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow rate. Initialize the genetic algorithm population in MATLAB, setting the population size, number of iterations, and optimization objective function; The fitness function is defined as the reciprocal of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population. The calculation is iterated until the termination condition is met, and the optimized control strategy is obtained.
4. The energy-saving method for subway station air conditioning water systems based on the Modelica model and genetic algorithm according to claim 3, characterized in that, The fitness function is defined as the reciprocal of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population, including: The fitness function is defined as the reciprocal of the objective function; Using a fitness function and a proportional selection method, individuals are selected, and based on the roulette wheel selection mechanism, individuals with higher fitness are selected from the current population to serve as parents. For the selected parent individuals, perform a single-point crossover operation according to the preset crossover probability to generate new offspring individuals; For newly generated offspring individuals, a single-point mutation operation is performed according to a preset mutation probability, and random perturbation is applied within its value range; New individuals generated through selection, crossover, and mutation are combined with some of the original, superior individuals to create a new generation of population.
5. An energy-saving system for subway station air conditioning water systems based on the Modelica model and genetic algorithm, wherein the system implements the method as described in any one of claims 1 to 4, characterized in that, include: The Modelica simulation module is used to build simulation models of subway station air conditioning water systems in Dymola software based on the Modelica language. The genetic algorithm optimization module is used to initialize the population of the established simulation model. The genetic algorithm is implemented using MATLAB to obtain the optimal control strategy with the objective function of minimizing the total energy consumption of the air conditioning water system. The interface module is used to build a Dymola-MATLAB co-simulation interface using Python based on the optimized control strategy. The control module is used to obtain the optimal control strategy for the subway station air conditioning water system through iterative optimization using a genetic algorithm based on the co-simulation interface.
6. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 4.