Giter Site home page Giter Site logo

xaj-sceua's Introduction

2022/2/28 实现SCE-UA算法率定新安江模型

下载地址

您可以从Github下载:point_right::point_right:项目文件

如有问题,欢迎交流探讨! 邮箱:[email protected] 卢家波 来信请说明博客标题及链接,谢谢。

目的

用自己编写的SCE-UA算法自动率定自己编写的三水源新安江模型,检验SCE-UA算法实用性。本地路径E:\Research\Practice\XAJ+SCEUA\XAJ+SCEUA

如何使用

  1. 下载所有文件https://github.com/lujiabo98/XAJ-SCEUA
  2. 用 VS 2019打开XAJ+SCEUA.sln
  3. 解决方案下右键选择属性,所有配置,所有平台下,将C++语言标准设为 ISO C++20 标准
  4. Releasex64下,重新生成解决方案
  5. E:\Research\Practice\XAJ+SCEUA\XAJ+SCEUA\SCEUA\IOexamples下的scein.txtE:\Research\Practice\XAJ+SCEUA\XAJ+SCEUA\XAJ\IOexamples下的非示例文件粘贴到E:\Research\Practice\XAJ+SCEUA\XAJ+SCEUA\x64\Release路径下
  6. 点击 本地Windows调试器 ,即可运行SCE-UA自动优化程序 在这里插入图片描述

技术路线

将新安江模型嵌入SCE-UA算法中,主要在functn()函数中实现以下三步:

  1. 【前处理】在functn()中先把自动生成的参数写入到新安江模型的输入文件中;
  2. 【运行模型】再调用新安江模型模型计算出结果;
  3. 【后处理】最后计算出NSE,将1-NSE作为functn()函数返回值。

实现方法

将新安江模型和SCE-UA算法的源代码放在同一个解决方案中,主函数是SCE-UA算法,新安江模型写成函数形式,供functn()调用。

在函数functn()中添加了三个函数,分别为前处理、运行模型和后处理

前处理

PreProcessing()函数根据参数模板文件parameter.tpl比对待率定参数数组,将优化算法生成的参数数值写入待率定模型的参数输入文件parameter.txt中。

运行模型

RunModel()函数调用新安江模型程序

后处理

PostProcessing()函数调用ReadValues()从待率定模型(在这里指新安江模型)输出结果中读取数据(出口断面流量数据Q.txt);调用CalculateNSE()计算纳什效率系数NSE;因为SCE-UA算法为最小化算法,因此返回1-NSE,这样当1-NSE越小时,NSE越接近1。

与Dakota算法对比

  • 从效率上讲,Dakota高于SCE-UA,同样是率定新安江模型的7个敏感参数,Dakota共调用模型136次,而SCE-UA则调用模型1240次,是Dakota的9.1倍。
  • 从质量上讲,SCE-UA高于Dakota,同样是率定新安江模型的7个敏感参数,SCE-UA的纳什效率系数为0.882869,Dakota的纳什效率系数为0.8677575,SCE-UA比Dakota高0.015,1.74%。
  • 从时间上讲,Dakota耗时81.068 s,SCE-UA耗时80.252 s,大致相同。

总的来讲,SCE-UA算法收敛效率明显低于Dakota,率定质量与Dakota大致相当,优先选择Dakota进行模型的参数率定。

xaj-sceua's People

Contributors

lujiabo98 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.