APSIM-Cotton model parameter tuning method and system
The APSIM-Cotton model parameters are optimized through multi-threaded parallel computing and Latin hypercube sampling technologies, which solves the positioning problem in high-dimensional parameter space, improves computing efficiency and simulation accuracy, adapts to the cotton planting needs of different regions, and realizes efficient and accurate agricultural production simulation.
Patent Information
- Application Number
- CN202510877540.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-26
AI Technical Summary
The existing APSIM-Cotton model parameter optimization method has difficulty in quickly and accurately locating the optimal combination in high-dimensional parameter space, consumes high computing resources, and lacks adaptability to different ecological environments and agronomic backgrounds, resulting in deviations between simulation results and measured data, making it difficult to meet the needs of rapid response and wide application.
Using multi-threaded/multi-process architecture parallel computing and Latin hypercube sampling technologies, a large number of parameter combinations are generated. The simulation effect is evaluated through indicators such as mean square error, root mean square error and Nash efficiency coefficient, and the optimal parameter combination is screened to improve computing efficiency and simulation accuracy to meet the agricultural modeling needs of different regions.
The parameter optimization efficiency and simulation accuracy of the APSIM-Cotton model have been greatly improved, human intervention has been reduced, and the accuracy and automation level of agricultural production simulation have been improved, making it suitable for the formulation of cotton planting strategies in different regions.
Smart Images

Figure CN120707003A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural production simulation, and in particular to an APSIM-Cotton model parameter tuning method and system. Background Art
[0002] APSIM (Agricultural Production Systems Simulator) is a model widely used for agricultural production simulation. It can simulate agricultural ecological processes such as crop growth, soil moisture dynamics, and nutrient cycling, providing a scientific basis for agricultural production management and decision-making. The APSIM-Cotton model is a crop model used to simulate cotton growth and production and is a module of the APSIM model. In agricultural system modeling, parameter calibration (adjustment) is a key step in ensuring the accuracy of simulation results, especially in different regions, different crop varieties, and different environmental conditions. The rationality of model parameters directly determines the reliability of simulation predictions.
[0003] Currently, APSIM-Cotton parameter adjustment mainly relies on traditional trial-and-error methods, genetic algorithms (GA), Bayesian optimization (BO), etc. These methods have improved the adaptability and accuracy of model parameters to varying degrees, but they still have certain limitations:
[0004] 1. Trial-and-Error Method
[0005] The most common parameter tuning method is trial and error, which involves repeatedly adjusting model parameters based on experience to match measured data. While intuitive, this method relies heavily on the researcher's experience, is computationally expensive, and time-consuming, making it difficult to scale to large-scale data applications.
[0006] 2. Genetic Algorithm (GA)
[0007] Genetic algorithms optimize parameters by simulating biological evolution, making them more efficient than traditional trial-and-error methods. However, these methods can still converge slowly in high-dimensional parameter spaces and are sensitive to the choice of initial population, potentially leading to local optima.
[0008] 3. Bayesian Optimization (BO)
[0009] Bayesian optimization is a relatively new parameter tuning method that improves search efficiency by constructing surrogate models (such as Gaussian process regression). Although this method accounts for uncertainty during the optimization process, for problems with large parameter spaces and high computational complexity, the optimization process may still be limited by computing resources.
[0010] Although existing parameter optimization methods have improved the simulation accuracy of the APSIM model to a certain extent, they still face several prominent challenges in practical applications, especially in complex crop systems such as cotton:
[0011] First, high-dimensional parameter optimization is challenging. The APSIM-Cotton model includes numerous key parameters that describe crop development, physiology, and yield formation, such as thermal time requirements during the growth period (FRUDD1–FRUDD8), leaf area index development parameters (FLAI and RLAI), and yield building parameters (SCBOLL and PERCENT_L). These parameters interact strongly with each other in a nonlinear manner. Traditional optimization methods (such as single-point search or grid search) struggle to quickly and accurately identify the optimal combination within the high-dimensional parameter space, limiting improvements in model performance.
[0012] Secondly, optimization consumes a lot of computing resources. When conducting regional-scale modeling or multi-scenario simulations of cotton production systems, thousands of model runs are required. Especially when using global search strategies such as genetic algorithms (GA) and Bayesian optimization (BO), the computational workload is extremely large. The optimization process is often time-consuming and inefficient, making it difficult to meet the needs of fast-response applications.
[0013] Third, the model lacks adaptability. Due to the wide distribution of cotton-growing regions, the diverse varieties, and the significant differences in management methods, existing optimization methods often require resetting initial parameter values and boundary conditions when faced with different ecological environments or agronomic backgrounds. This lack of versatility and automated adaptability hinders the model's application across different regions.
[0014] Furthermore, the problem of local optimality traps is prominent. Faced with complex non-convex parameter spaces, some intelligent algorithms are prone to falling into local optimality and missing the global optimal solution. This leads to systematic deviations between simulation results and measured data, thereby reducing the reliability of predictions of key indicators such as cotton yield and water use.
[0015] Therefore, it is an urgent problem for those skilled in the art to propose an APSIM model parameter tuning method and system to solve the difficulties existing in the prior art. Summary of the Invention
[0016] In view of this, the present invention provides an APSIM-Cotton model parameter tuning method and system. By improving the parameter optimization method and constructing an intelligent parameter adjustment mechanism, the simulation accuracy and computational efficiency of the APSIM-Cotton model are improved, providing more reliable support for agricultural production decision-making. The system can not only effectively solve the optimization problems of the model under the coupling of multiple factors such as variety, environment, and management combination, but also improve the simulation accuracy and optimization efficiency, providing strong technical support for the formulation of climate-adaptive planting strategies in major cotton-producing areas such as Xinjiang.
[0017] In order to achieve the above object, the present invention adopts the following technical solutions:
[0018] An APSIM-Cotton model parameter tuning method, comprising:
[0019] S1. Define the APSIM-Cotton model parameter search space, select the APSIM-Cotton model parameters to be optimized, determine the search range of each APSIM-Cotton model parameter, and generate multiple initial parameter combinations;
[0020] S2, using a multi-threaded / multi-process architecture, runs multiple APSIM-Cotton instances simultaneously. Each thread runs a different parameter combination, generates simulation results for each parameter combination, and allocates computing resources through a task distribution mechanism.
[0021] S3. Perform error analysis on the simulation results of each parameter combination and the measured data, and generate an error analysis report;
[0022] S4. Use a multi-threaded batch reading strategy to screen the parameter combination with the smallest error and obtain the optimal parameter combination;
[0023] S5. Record the optimal parameter combination and apply it to the APSIM-Cotton model;
[0024] S6. Generate parameter optimization report, including: computing resource allocation status, error analysis report and optimal parameter combination.
[0025] In the above method, optionally, the APSIM-Cotton model parameters that need to be optimized in S1 include: crop growth parameters, soil parameters, and management measure parameters.
[0026] In the above method, optionally, Latin hypercube sampling or Sobol sequence is used in S1 to generate multiple initial parameter combinations.
[0027] The above method is optional. In S3, an error analysis is performed between the simulation results and the measured data for each parameter combination. Specifically, the simulation effect is evaluated by calculating the mean square error, the root mean square error, and the Nash efficiency coefficient.
[0028] An APSIM-Cotton model parameter tuning system, which executes any of the above-mentioned APSIM-Cotton model parameter tuning methods, comprising:
[0029] Parameter sampling module: generates multiple initial parameter combinations;
[0030] The computational parallelization module generates multiple APSIM-Cotton instances based on the parameter combinations generated by the parameter sampling module, and runs multiple APSIM-Cotton instances simultaneously to generate the final optimization results.
[0031] Run result analysis module: perform error analysis on the simulation results and measured data of each parameter combination;
[0032] Optimal parameter combination screening module: screening the parameter combination with the smallest error;
[0033] Parameter combination evaluation and visualization module: generates and displays parameter optimization reports.
[0034] The above system can optionally run a result parsing module to automatically extract the result file of the APSIM-Cotton model, process the data format, convert the time index, match the simulation results with the measured data, perform error analysis on the simulation results and measured data of each parameter combination, and generate the final Excel result file.
[0035] The above system has an optional parameter combination evaluation and visualization module, which calculates the mean square error, root mean square error and Nash efficiency coefficient, evaluates the simulation accuracy of the APSIM-Cotton model, selects the optimal model to draw a time series comparison chart, performs regression analysis, and evaluates the fit between the simulation results and the measured data.
[0036] Through the above technical solutions, it can be seen that compared with the existing technology, the present invention provides an APSIM-Cotton model parameter tuning method and system, which has the following beneficial effects: the present invention adopts a statistical optimization method to generate a large number of parameter combinations through Latin hypercube sampling (LHS) and other technologies, thereby avoiding the inefficiency of the random search method and improving the comprehensiveness and accuracy of the parameter search; a multi-threaded parallel computing architecture improves the optimization efficiency, adopts a multi-threaded / multi-process method to enable multiple APSIM-Cotton instances to run in parallel, greatly improving the computing efficiency, and can greatly reduce the computing time compared with traditional methods (such as trial and error method, genetic algorithm); through the mean square error (MSE) and root mean square error (R The simulation effect is comprehensively evaluated using multiple indicators such as MSE and Nash efficiency coefficient (NSE) to ensure that the optimized parameter combination can truly reflect the growth law of crops; the method of the present invention can be applied to the agricultural modeling needs of different regions, greatly improving the parameter optimization efficiency and simulation accuracy of the APSIM-Cotton model, improving the applicability of the APSIM-Cotton model, reducing manual intervention, and improving the accuracy and automation of agricultural production simulation; the present invention can not only effectively solve the optimization problem of the model under the coupling of multiple factors such as variety, environment, and management combination, but also improve the simulation accuracy and optimization efficiency, providing strong technical support for the formulation of climate-adaptive planting strategies in major cotton-producing areas such as Xinjiang. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0038] Figure 1 A flow chart of an APSIM-Cotton model parameter tuning method provided by the present invention;
[0039] Figure 2 A structural diagram of an APSIM-Cotton model parameter tuning system provided by the present invention;
[0040] Figure 3 A report diagram of growth period parameter adjustment and evaluation results in a specific embodiment provided by the present invention;
[0041] Figure 4 A report diagram showing soil moisture parameter adjustment and evaluation results in a specific embodiment of the present invention;
[0042] Figure 5 This is a report diagram of leaf area index parameter adjustment and evaluation results in the specific embodiment provided by the present invention.
[0043] Figure 6 This is a report diagram of the aboveground biomass parameter adjustment and evaluation results in the specific embodiment provided by the present invention.
[0044] Figure 7 This is a report diagram of commercial cotton yield parameter adjustment and evaluation results in the specific embodiment provided by the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0046] In this application, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or apparatus comprising the element.
[0047] Reference Figure 1 As shown, the present invention discloses an APSIM-Cotton model parameter tuning method, comprising:
[0048] S1. Define the APSIM-Cotton model parameter search space, select the APSIM-Cotton model parameters to be optimized, determine the search range of each APSIM-Cotton model parameter, and generate multiple initial parameter combinations;
[0049] S2, using a multi-threaded / multi-process architecture, runs multiple APSIM-Cotton instances simultaneously. Each thread runs a different parameter combination, generates simulation results for each parameter combination, and allocates computing resources through a task distribution mechanism.
[0050] S3. Perform error analysis on the simulation results of each parameter combination and the measured data, and generate an error analysis report;
[0051] S4. Use a multi-threaded batch reading strategy to screen the parameter combination with the smallest error and obtain the optimal parameter combination; use independent year data to evaluate the model of the optimal parameter combination and test its generalization ability;
[0052] S5. Record the optimal parameter combination and apply it to the APSIM-Cotton model;
[0053] S6. Generate parameter optimization report, including: computing resource allocation status, error analysis report and optimal parameter combination.
[0054] Furthermore, the APSIM model parameters that need to be optimized in S1 include: crop growth parameters, soil parameters, and management measure parameters.
[0055] Furthermore, Latin hypercube sampling or Sobol sequence is used in S1 to generate multiple initial parameter combinations to ensure the uniformity and representativeness of the sampling.
[0056] Furthermore, in S3, the error analysis between the simulation results and the measured data of each parameter combination is performed. Specifically, the simulation effect is evaluated by calculating the mean square error, root mean square error and Nash efficiency coefficient.
[0057] Reference Figure 2 As shown, an APSIM-Cotton model parameter tuning system executes any of the above-mentioned APSIM-Cotton model parameter tuning methods, including:
[0058] Parameter sampling module: generates multiple initial parameter combinations;
[0059] The computational parallelization module generates multiple APSIM-Cotton instances based on the parameter combinations generated by the parameter sampling module, and runs multiple APSIM-Cotton instances simultaneously to generate the final optimization results.
[0060] Run result analysis module: perform error analysis on the simulation results and measured data of each parameter combination;
[0061] Optimal parameter combination screening module: screening the parameter combination with the smallest error;
[0062] Parameter combination evaluation and visualization module: generates and displays parameter optimization reports.
[0063] Furthermore, the Python parallel processing mechanism is used to batch run the APSIM-Cotton model and automatically generate result files:
[0064] Generate an APSIM-Cotton model instance based on the sampling parameters;
[0065] Create a parallel task pool to improve computing efficiency;
[0066] Automatically process the input and output of the APSIM-Cotton model;
[0067] Execute APSIM-Cotton simulation calculations step by step to generate the final optimization results.
[0068] Furthermore, the APSIM-Cotton model can be run in groups: the GroupSIM() method can be used to divide all APSIM-Cotton tasks into groups to reduce computing pressure; multi-threaded parallel computing: the ThreadPool = True parameter allows multiple APSIM-Cotton tasks to be executed simultaneously, improving computing efficiency; the progress bar (tqdm) can be used to display the progress in real time to ensure efficient task execution;
[0069] Furthermore, the result parsing module is run to automatically extract the result file of the APSIM-Cotton model, process the data format, convert the time index, match the simulation results with the measured data, perform error analysis on the simulation results and measured data of each parameter combination, and generate the final Excel result file.
[0070] Furthermore, the parameter combination evaluation and visualization module calculates the mean square error, root mean square error and Nash efficiency coefficient, evaluates the simulation accuracy of the APSIM-Cotton model, selects the optimal model to draw a time series comparison chart, and performs regression analysis to intuitively evaluate the predictive ability of the APSIM-Cotton model and evaluate the fit between the simulation results and the measured data.
[0071] In a specific embodiment, a parameter adjustment experiment is conducted on a typical APSIM-Cotton model (crop: cotton, variable: growth period), and the growth period parameter adjustment and evaluation results are referred to Figure 3 As shown, the simulated values are very close to the measured values;
[0072] In a specific embodiment, a parameter adjustment experiment is conducted on a typical APSIM-Cotton model (crop: cotton, variable: soil moisture content), and the parameter adjustment and evaluation results during the growth period are referred to Figure 4 As shown, the simulated values are very close to the measured values;
[0073] In a specific embodiment, a parameter adjustment experiment is conducted on a typical APSIM-Cotton model (crop: cotton, variable: leaf area index), and the parameter adjustment and evaluation results during the growth period are referred to Figure 5 As shown, the simulated values are very close to the measured values;
[0074] In a specific embodiment, a parameter adjustment experiment is conducted on a typical APSIM-Cotton model (crop: cotton, variable: biomass), and the soil moisture parameter adjustment and evaluation results are referenced. Figure 6 As shown, the simulated values are very close to the measured values;
[0075] In a specific embodiment, a parameter adjustment experiment is conducted on a typical APSIM-Cotton model (crop: cotton, variable: commodity cotton yield), referring to Figure 7 As shown, the simulated values are very close to the measured values.
[0076] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0077] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for tuning parameters of an APSIM-Cotton model, characterized in that: include: S1. Define the APSIM-Cotton model parameter search space, select the APSIM-Cotton model parameters to be optimized, determine the search range of each APSIM-Cotton model parameter, and generate multiple initial parameter combinations; S2, using a multi-threaded / multi-process architecture, runs multiple APSIM-Cotton instances simultaneously. Each thread runs a different parameter combination, generates simulation results for each parameter combination, and allocates computing resources through a task distribution mechanism. S3. Perform error analysis on the simulation results of each parameter combination and the measured data, and generate an error analysis report; S4. Use a multi-threaded batch reading strategy to screen the parameter combination with the smallest error and obtain the optimal parameter combination; S5. Record the optimal parameter combination and apply it to the APSIM-Cotton model; S6. Generate parameter optimization report, including: computing resource allocation status, error analysis report and optimal parameter combination.
2. The APSIM-Cotton model parameter tuning method according to claim 1, characterized in that: The APSIM-Cotton model parameters that need to be optimized in S1 include: crop growth parameters, soil parameters, and management measure parameters.
3. The APSIM-Cotton model parameter tuning method according to claim 1, characterized in that: In S1, Latin hypercube sampling or Sobol sequence is used to generate multiple initial parameter combinations.
4. The APSIM-Cotton model parameter tuning method according to claim 1, characterized in that: In S3, the error analysis between the simulation results and the measured data of each parameter combination is performed. Specifically, the simulation effect is evaluated by calculating the mean square error, root mean square error and Nash efficiency coefficient.
5. An APSIM-Cotton model parameter tuning system, executing the APSIM-Cotton model parameter tuning method according to any one of claims 1 to 4, comprising: Parameter sampling module: generates multiple initial parameter combinations; The computational parallelization module generates multiple APSIM-Cotton instances based on the parameter combinations generated by the parameter sampling module, and runs multiple APSIM-Cotton instances simultaneously to generate the final optimization results. Run result analysis module: perform error analysis on the simulation results and measured data of each parameter combination; Optimal parameter combination screening module: screening the parameter combination with the smallest error; Parameter combination evaluation and visualization module: generates and displays parameter optimization reports.
6. The APSIM-Cotton model parameter tuning system according to claim 5, characterized in that: Also includes: Run the result parsing module to automatically extract the result file of the APSIM-Cotton model, process the data format, convert the time index, match the simulation results with the measured data, perform error analysis on the simulation results and measured data for each parameter combination, and generate the final Excel result file.
7. The APSIM-Cotton model parameter tuning system according to claim 5, characterized in that: Also includes: The parameter combination evaluation and visualization module calculates the mean square error, root mean square error, and Nash efficiency coefficient, evaluates the simulation accuracy of the APSIM-Cotton model, selects the optimal model to draw a time series comparison chart, performs regression analysis, and evaluates the fit between the simulation results and the measured data.