CN116757098B - An automated verification method based on SWAT model multi-objective optimization - Google Patents
An automated verification method based on SWAT model multi-objective optimization Download PDFInfo
- Publication number
- CN116757098B CN116757098B CN202311036876.7A CN202311036876A CN116757098B CN 116757098 B CN116757098 B CN 116757098B CN 202311036876 A CN202311036876 A CN 202311036876A CN 116757098 B CN116757098 B CN 116757098B
- Authority
- CN
- China
- Prior art keywords
- model
- parameter
- swat
- verification
- swat model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 96
- 238000012795 verification Methods 0.000 title claims abstract description 47
- 238000005457 optimization Methods 0.000 title claims abstract description 43
- 230000008569 process Effects 0.000 claims abstract description 39
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 27
- 230000008859 change Effects 0.000 claims abstract description 16
- 238000004088 simulation Methods 0.000 claims description 21
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000012544 monitoring process Methods 0.000 claims description 19
- 238000005070 sampling Methods 0.000 claims description 15
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 10
- 230000006870 function Effects 0.000 claims description 3
- 230000004044 response Effects 0.000 claims description 3
- 238000012216 screening Methods 0.000 claims 2
- 230000008878 coupling Effects 0.000 claims 1
- 238000010168 coupling process Methods 0.000 claims 1
- 238000005859 coupling reaction Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 description 10
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 238000011112 process operation Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000002689 soil Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/06—Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/08—Fluids
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A20/00—Water conservation; Efficient water supply; Efficient water use
- Y02A20/152—Water filtration
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physiology (AREA)
- Genetics & Genomics (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域Technical field
本发明涉及计算机处理技术领域,具体涉及一种基于SWAT模型多目标优化的自动化校验方法。The invention relates to the field of computer processing technology, and specifically relates to an automated verification method based on SWAT model multi-objective optimization.
背景技术Background technique
SWAT(Soil and Water Assessment Tool)模型是目前应用最广泛的水文水质模型之一。该模型在水文水质模拟和流域治理情景分析等方面作用明显,它对于流域管理人员理解流域水文水质循环过程,制订流域管理方案有很大的帮助。然而,根据SWAT模型的设置,它可能拥有上千或者更多的参数,这些参数需要进行校验之后才可应用于实际研究。SWAT模型的校验方法,一般分为人工标定和自动标定两种方法。人工标定需要使用者具有较高的专业知识并对模型非常熟悉,并且由于SWAT模型参数众多,采用人工标定法校验模型将耗费大量时间和精力。自动校验的实质是试错法,其校验过程要通过计算机不断迭代,优化模拟数据与监测数据的拟合度,最终寻找到使拟合度达到较优的一组参数组合。随着计算机技术和人工智能的发展,目前应用于水文水质模型校验的优化方法主要有SUFI-2、POS、NSGA3和SA等,这些方法目前已经集成于SWAT-CUP和R-SWAT等软件。这些算法和软件虽然加快了SWAT模型的校验过程,但是仍存在三方面缺陷:(1)使用这些算法并不能解决模型同参异效和异参同效的问题;(2)两个软件集成的算法,均为单目标或双目标优化算法,这些算法在应对多站点模型校验任务时可能存在收敛速度慢等问题;(3)软件普遍使用多线程的方式加快模型校验速度,但SWAT模型为一个计算密集型模型,采用多进程的模型迭代方式可以更有效地加快模型校验速度。因此,SWAT模型的校验过程还存在较大的改进空间,仍需进一步优化才能满足人们的实际使用需求。据此,我们发明了一种SWAT模型的自动化校验方法,该自动化校验方法融合了SWAT模型参数修改、多目标优化算法和多进程运行方式等内容。该方法可以为使用者提供多套模型参数方案,在提升模型校验效率的同时,解决模型同参异效和异参同效的问题。The SWAT (Soil and Water Assessment Tool) model is currently one of the most widely used hydrological and water quality models. This model plays an obvious role in hydrology and water quality simulation and watershed management scenario analysis. It is of great help to watershed managers in understanding the hydrology and water quality cycle process in the watershed and formulating watershed management plans. However, depending on the settings of the SWAT model, it may have thousands or more parameters, which need to be verified before they can be used in actual research. The calibration methods of the SWAT model are generally divided into two methods: manual calibration and automatic calibration. Manual calibration requires users to have high professional knowledge and be very familiar with the model, and since the SWAT model has many parameters, using manual calibration to verify the model will consume a lot of time and energy. The essence of automatic calibration is a trial and error method. The calibration process requires continuous iteration by computers to optimize the fit between simulated data and monitoring data, and finally find a set of parameter combinations that achieve a better fit. With the development of computer technology and artificial intelligence, the current optimization methods used in hydrology and water quality model verification mainly include SUFI-2, POS, NSGA3 and SA, etc. These methods have now been integrated into software such as SWAT-CUP and R-SWAT. Although these algorithms and software speed up the verification process of the SWAT model, they still have three shortcomings: (1) Using these algorithms cannot solve the problem of the same parameters and different effects of the model and the same effect of different parameters; (2) Integration of the two software The algorithms are all single-objective or dual-objective optimization algorithms. These algorithms may have problems such as slow convergence when dealing with multi-site model verification tasks; (3) Software generally uses multi-threading to speed up model verification, but SWAT The model is a computationally intensive model, and the multi-process model iteration method can more effectively speed up model verification. Therefore, there is still a large room for improvement in the verification process of the SWAT model, and further optimization is still needed to meet people's actual use needs. Based on this, we invented an automated verification method for the SWAT model, which integrates SWAT model parameter modification, multi-objective optimization algorithm and multi-process operation mode. This method can provide users with multiple sets of model parameter solutions, improve model verification efficiency, and solve the problem of models with the same parameters having different effects and different parameters having the same effect.
发明内容Contents of the invention
本发明的目的在于提供一种基于SWAT模型多目标优化的自动化校验方法,该基于SWAT模型多目标优化的自动化校验方法融合了SWAT模型参数修改、多目标优化算法和多进程运行方式等内容,为使用者提供多套模型参数方案,可进行多目标优化,多站点校验,提升校验效率,并解决模型同参异效和异参同效的问题。The purpose of the present invention is to provide an automated verification method based on SWAT model multi-objective optimization. The automated verification method based on SWAT model multi-objective optimization integrates SWAT model parameter modification, multi-objective optimization algorithm and multi-process operation mode. , providing users with multiple sets of model parameter solutions, which can carry out multi-objective optimization and multi-site verification, improve verification efficiency, and solve the problem of models with the same parameters having different effects and different parameters having the same effect.
为实现上述目的,本发明采用以下技术方案:In order to achieve the above objects, the present invention adopts the following technical solutions:
一种基于SWAT模型多目标优化的自动化校验方法,包括以下步骤:An automated verification method based on SWAT model multi-objective optimization, including the following steps:
S1、初始化SWAT模型的校验程序,构建将SWAT模型与多目标优化方法耦合的框架结构,在此框架下,将多目标优化方法应用于SWAT模型校验,具体初始化过程为:S1. Initialize the verification program of the SWAT model, and construct a framework structure that couples the SWAT model with the multi-objective optimization method. Under this framework, the multi-objective optimization method is applied to the SWAT model verification. The specific initialization process is:
S11、从ArcSWAT模型中复制已经构建好的SWAT模型的输入输出文件夹;S11. Copy the input and output folders of the constructed SWAT model from the ArcSWAT model;
S12、确定进行校验的水文水质指标,并创建相应指标的监测数据的EXCEL文件;S12. Determine the hydrology and water quality indicators for verification, and create an EXCEL file of monitoring data for the corresponding indicators;
S13、将SWAT模型中的位置表导出到location_table文件夹;S13. Export the location table in the SWAT model to the location_table folder;
S2、设置校验参数,具体设置过程为:S2. Set the verification parameters. The specific setting process is:
S21、设置使用的优化算法以及优化算法的初始种群数量、迭代次数、子种群数量和交叉变异值,并设置使用的进程数量;S21. Set the optimization algorithm used and the initial population number, iteration number, sub-population number and cross-mutation value of the optimization algorithm, and set the number of processes used;
S22、设置用于校验的参数集范围以及每个参数在模型校验过程中的参数调整方式,参数调整方式包括相对变化率定方法、绝对变化率定方法和替换率定方法;S22. Set the parameter set range for verification and the parameter adjustment method of each parameter during the model verification process. The parameter adjustment methods include the relative change rate determination method, the absolute change rate determination method and the replacement rate determination method;
相对变化率定方法的计算公式为:,The calculation formula of the relative change rate determination method is: ,
绝对变化率定方法的计算公式为:,The calculation formula of the absolute change rate determination method is: ,
替换率定方法的计算公式为:,The calculation formula of the substitution rate determination method is: ,
其中,是修改的参数值,/>是SWAT模型中参数的原始值,x是参数变化因子;in, is the modified parameter value,/> is the original value of the parameter in the SWAT model, and x is the parameter change factor;
S3、迭代运行SWAT模型;S3. Iteratively run the SWAT model;
S4、使用优化算法对模型进行评估;S4. Use optimization algorithms to evaluate the model;
S5、运行完成校验的SWAT模型。S5. Run the verified SWAT model.
优选地,步骤S13中所述位置表包括hru表、rch表和sub表。Preferably, the location table in step S13 includes an hru table, a rch table and a sub table.
优选地,步骤S3按照步骤S21中设置的初始种群和各代次的子种群数量将SWAT模型进行迭代运行,具体过程为:Preferably, step S3 iteratively runs the SWAT model according to the initial population and the number of sub-populations of each generation set in step S21. The specific process is:
S31、利用采样方法,根据初始种群数量或子种群数量,从步骤S22的参数集范围中采集参数样本,并生成参数表集合;S31. Use the sampling method to collect parameter samples from the parameter set range in step S22 according to the initial population number or sub-population number, and generate a parameter table set;
S32、根据步骤S21中设置的进程数量进行迭代运行SWAT模型。S32. Run the SWAT model iteratively according to the number of processes set in step S21.
优选地,步骤S31中所述采样方法为随机采样、二项式随机采样或超拉丁立方体采样;步骤S32的具体过程为:Preferably, the sampling method in step S31 is random sampling, binomial random sampling or hyper-Latin cube sampling; the specific process of step S32 is:
S321、将步骤S31中的参数表与步骤S13中的位置表相对应,生成需要修改的位置参数表;S321. Correlate the parameter table in step S31 with the position table in step S13, and generate a position parameter table that needs to be modified;
S322、根据位置参数表从输入输出文件夹中筛选出对应的文件,并储存在内存中;S322. Filter out the corresponding files from the input and output folders according to the position parameter table, and store them in the memory;
S323、针对位置参数表中需要修改的文件,依据每个文件的属性使用不同的函数进行修改,并将已经修改好的和保持现状的文件导入到运行文件夹中进行模型模拟;S323. For the files that need to be modified in the position parameter table, use different functions to modify them according to the attributes of each file, and import the modified and current files into the running folder for model simulation;
S324、运行文件夹中的SWAT模型运行完毕之后进行以下操作,先根据步骤S322中筛选出的文件,将运行文件夹中的模型文件恢复到模型的原始状态,再使用读取文件模块将运行文件夹中的模型结果读取出来,读取文件包括水文响应单元数据、子流域数据和河流数据,并将读取文件、参数表以及位置参数表一起保存在输出文件夹中,用于与监测数据进行对计算模型模拟值和监测值的拟合度。S324. After the SWAT model in the running folder has been run, perform the following operations. First, restore the model files in the running folder to the original state of the model based on the files filtered in step S322, and then use the read file module to read the running files. The model results in the folder are read out. The read files include hydrological response unit data, sub-basin data and river data, and the read files, parameter tables and location parameter tables are saved together in the output folder for use with monitoring data. Carry out the fitting degree of the simulation values and monitoring values of the calculation model.
优选地,步骤S4的具体过程为:Preferably, the specific process of step S4 is:
S41、依据步骤S12创建的监测数据的EXCEL文件和步骤S324读取的模拟值,计算拟合度指数,拟合度指数的计算公式为: 其中,/>表示拟合优度,/>表示第i个数据,表示纳什系数,/>表示第i个监测值,/>表示所有监测值的平均值,/>表示第i个模拟值,/>表示模拟值的平均值;S41. Calculate the fitting degree index based on the EXCEL file of the monitoring data created in step S12 and the simulation value read in step S324. The calculation formula of the fitting degree index is: Among them,/> Indicates the goodness of fit,/> represents the i-th data, represents the Nash coefficient,/> Represents the i-th monitoring value,/> Represents the average of all monitoring values,/> Represents the i-th analog value,/> Represents the average value of simulated values;
S42、初始种群和子种群中所有的模拟结果均按照上述步骤S41的拟合指数进行计算,并将所有拟合度指标储存在内存中;S42. All simulation results in the initial population and sub-population are calculated according to the fitting index in step S41 above, and all fitness indicators are stored in the memory;
S43、将初始种群和子种群的所有SWAT模拟结果重复步骤S41的计算过程;S43. Repeat the calculation process of step S41 for all SWAT simulation results of the initial population and sub-populations;
S44、根据步骤S21设置的优化算法和迭代次数,重复步骤S31-步骤S42,并在初始种群和子种群筛选出非支配解;S44. According to the optimization algorithm and the number of iterations set in step S21, repeat steps S31 to S42, and screen out non-dominated solutions in the initial population and subpopulations;
S45、当所有的迭代次数运算结束,计算所有非支配解并获得Parteo最优解。S45. When all iteration calculations are completed, calculate all non-dominated solutions and obtain the Parteo optimal solution.
优选地,步骤S5的具体过程为:Preferably, the specific process of step S5 is:
S51、比较所有Parteo最优解对应的SWAT模型的参数表,筛选符合流域模拟条件的解作为模型的最终参数集;S51. Compare the parameter tables of the SWAT model corresponding to all Parteo optimal solutions, and select solutions that meet the watershed simulation conditions as the final parameter set of the model;
S52、将最终参数集代入SWAT模型,完成模型自动化校验。S52. Substitute the final parameter set into the SWAT model to complete automatic model verification.
采用上述技术方案后,本发明具有如下有益效果:After adopting the above technical solution, the present invention has the following beneficial effects:
1、本发明可进行多目标优化,多站点校验,在SWAT模型校验过程中嵌入了多种优化算法(如表1所示),相较于之前的单目标优化算法,它可以针对多个水文水质的监测站点和多种拟合度评估指标对校验结果进行分析,这些优化算法有效优化了校验过程。1. The present invention can perform multi-objective optimization and multi-site verification. A variety of optimization algorithms are embedded in the SWAT model verification process (as shown in Table 1). Compared with the previous single-objective optimization algorithm, it can target multiple The calibration results are analyzed using several hydrology and water quality monitoring stations and multiple fitness evaluation indicators. These optimization algorithms effectively optimize the calibration process.
表1 采用的优化算法Table 1 Optimization algorithm used
2、本发明可有效提升校验效率,在SWAT模型中加入了多进程框架,可以利用计算机CPU同时对多个SWAT模型进行模拟,这使的本发明的校验效率高于SWAT-CUP和R-SWAT。2. The present invention can effectively improve the verification efficiency. It adds a multi-process framework to the SWAT model and can use the computer CPU to simulate multiple SWAT models at the same time. This makes the verification efficiency of the present invention higher than that of SWAT-CUP and R. -SWAT.
3、本发明可有效解决模型同参异效和异参同效的问题,采用优化算法对SWAT模型进行校验,它将返回多个参数集,使用者可以通过对比几个参数集的模拟结果,并结合专业知识判断出更符合流域水文水质模拟状况的参数集,可以解决模型同参异效和异参同效的问题。3. The present invention can effectively solve the problem of models with the same parameters having different effects and different parameters having the same effect. It uses an optimization algorithm to verify the SWAT model. It will return multiple parameter sets. The user can compare the simulation results of several parameter sets. , and combined with professional knowledge to determine a parameter set that is more consistent with the hydrology and water quality simulation conditions of the basin, which can solve the problem of the same parameters and different effects of the model and the same effect of different parameters.
附图说明Description of the drawings
图1为本发明的流程图;Figure 1 is a flow chart of the present invention;
图2为本发明的单次SWAT模型校验流程图。Figure 2 is a flow chart of a single SWAT model verification of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with examples. It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.
如图1至图2所示,一种基于SWAT模型多目标优化的自动化校验方法,包括以下步骤:As shown in Figures 1 to 2, an automated verification method based on SWAT model multi-objective optimization includes the following steps:
S1、初始化SWAT模型的校验程序,构建将SWAT模型与多目标优化方法耦合的框架结构,在此框架下,将多目标优化方法应用于SWAT模型校验,具体初始化过程为:S1. Initialize the verification program of the SWAT model, and construct a framework structure that couples the SWAT model with the multi-objective optimization method. Under this framework, the multi-objective optimization method is applied to the SWAT model verification. The specific initialization process is:
S11、从ArcSWAT模型中复制已经构建好的SWAT模型的输入输出文件夹;S11. Copy the input and output folders of the constructed SWAT model from the ArcSWAT model;
S12、确定进行校验的水文水质指标,并创建相应指标的监测数据的EXCEL文件;S12. Determine the hydrology and water quality indicators for verification, and create an EXCEL file of monitoring data for the corresponding indicators;
S13、将SWAT模型中的位置表导出到location_table文件夹;S13. Export the location table in the SWAT model to the location_table folder;
步骤S13中所述位置表包括hru表、rch表和sub表;The location table described in step S13 includes hru table, rch table and sub table;
S2、设置校验参数,具体设置过程为:S2. Set the verification parameters. The specific setting process is:
S21、设置使用的优化算法以及优化算法的初始种群数量、迭代次数、子种群数量和交叉变异值,并设置使用的进程数量;S21. Set the optimization algorithm used and the initial population number, iteration number, sub-population number and cross-mutation value of the optimization algorithm, and set the number of processes used;
S22、设置用于校验的参数集范围以及每个参数在模型校验过程中的参数调整方式,参数调整方式包括相对变化率定方法、绝对变化率定方法和替换率定方法;S22. Set the parameter set range for verification and the parameter adjustment method of each parameter during the model verification process. The parameter adjustment methods include the relative change rate determination method, the absolute change rate determination method and the replacement rate determination method;
相对变化率定方法的计算公式为:,The calculation formula of the relative change rate determination method is: ,
绝对变化率定方法的计算公式为:,The calculation formula of the absolute change rate determination method is: ,
替换率定方法的计算公式为:,The calculation formula of the substitution rate determination method is: ,
其中,是修改的参数值,/>是SWAT模型中参数的原始值,x是参数变化因子;in, is the modified parameter value,/> is the original value of the parameter in the SWAT model, and x is the parameter change factor;
S3、迭代运行SWAT模型;S3. Iteratively run the SWAT model;
步骤S3按照步骤S21中设置的初始种群和各代次的子种群数量将SWAT模型进行迭代运行,具体过程为:Step S3 iteratively runs the SWAT model according to the initial population and the number of sub-populations of each generation set in step S21. The specific process is:
S31、利用采样方法,根据初始种群数量或子种群数量,从步骤S22的参数集范围中采集参数样本,并生成参数表集合;S31. Use the sampling method to collect parameter samples from the parameter set range in step S22 according to the initial population number or sub-population number, and generate a parameter table set;
S32、根据步骤S21中设置的进程数量进行迭代运行SWAT模型;S32. Iteratively run the SWAT model according to the number of processes set in step S21;
步骤S31中所述采样方法为随机采样、二项式随机采样或超拉丁立方体采样;步骤S32的具体过程为:The sampling method described in step S31 is random sampling, binomial random sampling or hyper-Latin cube sampling; the specific process of step S32 is:
S321、将步骤S31中的参数表与步骤S13中的位置表相对应,生成需要修改的位置参数表;S321. Correlate the parameter table in step S31 with the position table in step S13, and generate a position parameter table that needs to be modified;
S322、根据位置参数表从输入输出文件夹中筛选出对应的文件,并储存在内存中;S322. Filter out the corresponding files from the input and output folders according to the position parameter table, and store them in the memory;
S323、针对位置参数表中需要修改的文件,依据每个文件的属性使用不同的函数进行修改,并将已经修改好的和保持现状的文件导入到运行文件夹中进行模型模拟;S323. For the files that need to be modified in the position parameter table, use different functions to modify them according to the attributes of each file, and import the modified and current files into the running folder for model simulation;
S324、运行文件夹中的SWAT模型运行完毕之后进行以下操作,先根据步骤S322中筛选出的文件,将运行文件夹中的模型文件恢复到模型的原始状态,再使用读取文件模块将运行文件夹中的模型结果读取出来,读取文件包括水文响应单元数据、子流域数据和河流数据,并将读取文件、参数表以及位置参数表一起保存在输出文件夹中,用于与监测数据进行对计算模型模拟值和监测值的拟合度;S324. After the SWAT model in the running folder has been run, perform the following operations. First, restore the model files in the running folder to the original state of the model based on the files filtered in step S322, and then use the read file module to read the running files. The model results in the folder are read out. The read files include hydrological response unit data, sub-basin data and river data, and the read files, parameter tables and location parameter tables are saved together in the output folder for use with monitoring data. Perform the fitting of the calculation model simulation values and monitoring values;
S4、使用优化算法对模型进行评估;S4. Use optimization algorithms to evaluate the model;
步骤S4的具体过程为:The specific process of step S4 is:
S41、依据步骤S12创建的监测数据的EXCEL文件和步骤S324读取的模拟值,计算拟合度指数,拟合度指数的计算公式为: 其中,/>表示拟合优度,/>表示第i个数据,表示纳什系数,/>表示第i个监测值,/>表示所有监测值的平均值,/>表示第i个模拟值,/>表示模拟值的平均值;S41. Calculate the fitting degree index based on the EXCEL file of the monitoring data created in step S12 and the simulation value read in step S324. The calculation formula of the fitting degree index is: Among them,/> Indicates the goodness of fit,/> represents the i-th data, represents the Nash coefficient,/> Represents the i-th monitoring value,/> Represents the average of all monitoring values,/> Represents the i-th analog value,/> Represents the average value of simulated values;
S42、初始种群和子种群中所有的模拟结果均按照上述步骤S41的拟合指数进行计算,并将所有拟合度指标储存在内存中;S42. All simulation results in the initial population and sub-population are calculated according to the fitting index in step S41 above, and all fitness indicators are stored in the memory;
S43、将初始种群和子种群的所有SWAT模拟结果重复步骤S41的计算过程;S43. Repeat the calculation process of step S41 for all SWAT simulation results of the initial population and sub-populations;
S44、根据步骤S21设置的优化算法和迭代次数,重复步骤S31-步骤S42,并在初始种群和子种群筛选出非支配解;S44. According to the optimization algorithm and the number of iterations set in step S21, repeat steps S31 to S42, and screen out non-dominated solutions in the initial population and subpopulations;
S45、当所有的迭代次数运算结束,计算所有非支配解并获得Parteo最优解;S45. When all iteration calculations are completed, calculate all non-dominated solutions and obtain the Parteo optimal solution;
S5、运行完成校验的SWAT模型;S5. Run the verified SWAT model;
步骤S5的具体过程为:The specific process of step S5 is:
S51、比较所有Parteo最优解对应的SWAT模型的参数表,筛选符合流域模拟条件的解作为模型的最终参数集;S51. Compare the parameter tables of the SWAT model corresponding to all Parteo optimal solutions, and select solutions that meet the watershed simulation conditions as the final parameter set of the model;
S52、将最终参数集代入SWAT模型,完成模型自动化校验。S52. Substitute the final parameter set into the SWAT model to complete automatic model verification.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention. All substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311036876.7A CN116757098B (en) | 2023-08-17 | 2023-08-17 | An automated verification method based on SWAT model multi-objective optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311036876.7A CN116757098B (en) | 2023-08-17 | 2023-08-17 | An automated verification method based on SWAT model multi-objective optimization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116757098A CN116757098A (en) | 2023-09-15 |
CN116757098B true CN116757098B (en) | 2023-11-10 |
Family
ID=87951844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311036876.7A Active CN116757098B (en) | 2023-08-17 | 2023-08-17 | An automated verification method based on SWAT model multi-objective optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116757098B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951980A (en) * | 2017-02-21 | 2017-07-14 | 河海大学 | An Adaptive Operation Method of Reservoir Group Based on RCP Scenario |
CN109376955A (en) * | 2018-11-29 | 2019-02-22 | 首都师范大学 | An optimal allocation method of agricultural non-point source optimal management measures based on ecological service function |
EP3748551A1 (en) * | 2019-06-07 | 2020-12-09 | Robert Bosch GmbH | Method, device and computer program for adjusting a hyperparameter |
CN114580762A (en) * | 2022-03-10 | 2022-06-03 | 河海大学 | An error correction method for hydrological forecast based on XGBoost |
CN114818324A (en) * | 2022-04-26 | 2022-07-29 | 广东工业大学 | Method, device, medium and equipment for automatically regulating and controlling water quantity and water quality of basin scale |
CN115907429A (en) * | 2022-12-28 | 2023-04-04 | 清华大学 | Combined system overflow optimization control method and device based on PSO algorithm |
-
2023
- 2023-08-17 CN CN202311036876.7A patent/CN116757098B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951980A (en) * | 2017-02-21 | 2017-07-14 | 河海大学 | An Adaptive Operation Method of Reservoir Group Based on RCP Scenario |
CN109376955A (en) * | 2018-11-29 | 2019-02-22 | 首都师范大学 | An optimal allocation method of agricultural non-point source optimal management measures based on ecological service function |
EP3748551A1 (en) * | 2019-06-07 | 2020-12-09 | Robert Bosch GmbH | Method, device and computer program for adjusting a hyperparameter |
CN114580762A (en) * | 2022-03-10 | 2022-06-03 | 河海大学 | An error correction method for hydrological forecast based on XGBoost |
CN114818324A (en) * | 2022-04-26 | 2022-07-29 | 广东工业大学 | Method, device, medium and equipment for automatically regulating and controlling water quantity and water quality of basin scale |
CN115907429A (en) * | 2022-12-28 | 2023-04-04 | 清华大学 | Combined system overflow optimization control method and device based on PSO algorithm |
Non-Patent Citations (1)
Title |
---|
《SWAT模型多目标率定与评价——以梅川江流域为例》;李景等;《中国科学院大学学报 》;第38卷(第5期);590-600 * |
Also Published As
Publication number | Publication date |
---|---|
CN116757098A (en) | 2023-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111260462B (en) | A Transaction Fraud Detection Method Based on Heterogeneous Relational Network Attention Mechanism | |
CN113297174B (en) | Land use change simulation method based on deep learning | |
CN112884236B (en) | A short-term load forecasting method and system based on VDM decomposition and LSTM improvement | |
CN113380346A (en) | Coupling reaction yield intelligent prediction method based on attention convolution neural network | |
Kumar et al. | Ensemble-based assimilation of nonlinearly related dynamic data in reservoir models exhibiting non-Gaussian characteristics | |
CN116937559A (en) | Power system load forecasting system and method based on recurrent neural network and tensor decomposition | |
CN111737110A (en) | A Test Input Selection Method for Deep Learning Models | |
CN110309907A (en) | A dynamic missing value imputation method based on detracking autoencoder | |
CN115640888B (en) | A method for production prediction based on decreasing function embedded threshold sequence network | |
CN119478278B (en) | A method, device, equipment and storage medium for parallel explicit sampling of geological modeling | |
CN108898257A (en) | A kind of gray prediction method based on particle group optimizing | |
CN116362076A (en) | Sensor optimal arrangement method and system considering damage degree of metal structure | |
CN116757098B (en) | An automated verification method based on SWAT model multi-objective optimization | |
CN118643746A (en) | An automated history matching method integrating geological modeling and numerical simulation proxy models | |
CN119250848A (en) | A real estate valuation method based on Bayesian optimization and machine learning | |
CN111242379A (en) | A Kernel Recursive Maximum Correlation Entropy Time Series Online Prediction Method Based on Stochastic Fourier Features | |
CN110768825A (en) | A business traffic prediction method based on network big data analysis | |
CN111124489A (en) | An Estimation Method of Software Function Points Based on BP Neural Network | |
CN109523099A (en) | A kind of concealed orebody Prognosis Modeling method for taking Target area missing control mine index into account | |
CN115841150A (en) | Method for detecting quality of ceramic powder in multilayer ceramic capacitor based on genetic algorithm | |
CN112463643A (en) | Software quality prediction method | |
CN119419797B (en) | A method for predicting power load in industrial and commercial parks | |
CN118552338B (en) | Fast update history fitting paradigm based on multi-stage history experience migration | |
CN113537458B (en) | Rational function neural network construction method, system and readable storage medium | |
CN117592319A (en) | An intelligent prediction method and system for the plugging section length of old wells in salt cavern gas storage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |