1 / 19

DYCORS 代码简介

DYCORS 代码简介. 刁瑞. 准备工作. 无线 网 连接 AMSS , 任 意打开一个网址跳转至注册页 短期课程的代 码 : Y5W1L4W7 代 码下载 http://lsec.cc.ac.cn/~yafliu/ Windows? Linux ? Matlab? Python?. 用途. 其中 f(x) 是计算耗时大的目标函数,通常没有显式表达式 变 量可以带有上下界约束. 算法框架. 生成初始点 对 初始 点进行函数计算 根据初始点和函数 值 构 造模型函数 使 用模型函数预 测目标函数值,决定新的点 对新的点进行函数计算

yael-perry
Download Presentation

DYCORS 代码简介

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DYCORS代码简介 刁瑞

  2. 准备工作 • 无线网连接AMSS, 任意打开一个网址跳转至注册页短期课程的代码:Y5W1L4W7 • 代码下载http://lsec.cc.ac.cn/~yafliu/ • Windows? Linux? • Matlab? Python?

  3. 用途 • 其中f(x)是计算耗时大的目标函数,通常没有显式表达式 • 变量可以带有上下界约束

  4. 算法框架 • 生成初始点 • 对初始点进行函数计算 • 根据初始点和函数值构造模型函数 • 使用模型函数预测目标函数值,决定新的点 • 对新的点进行函数计算 • 使用新数据更新模型函数 • 重复4-6直到收敛

  5. MATLAB版本安装方法 • 设置MATLAB的路径到DYCORS_m目录

  6. 测试问题 • 执行语句DYCORS('datainput_hartman3', 200, 3, 1, 1) • 运行正常表明可以使用

  7. 代码结构

  8. 使用方法 • DYCORS(data_file, maxeval, Ntrials, PlotResult, NumberNewSamples)

  9. data_file • 如何计算自己的问题? • 参考datainput_hartman3.m

  10. 获得计算结果 >> load results.mat

  11. 代码概览 • DYCORS.m处理输入参数调用DYCORSrestartManager(如下图)画图和保存结果(可以参考绘制其他图)

  12. 代码概览 • DYCORSrestartManager.m调用Ntrials次DYCORSrestart,收集结果

  13. 代码概览 • DYCORSrestart.m调用DYCORS_opt求解。为防止算法陷在某个局部极小值,算法可能会重新开始一次全新的搜索。

  14. 代码概览 • DYCORS_opt.m算法最核心的部分

  15. Python版本安装方法 • Python解释器 • NumPy • matplotlab • Windows可以只安装Pythonxy http://code.google.com/p/pythonxy/wiki/Downloads • Linux建议先安装pip

  16. 测试程序 • 先进入DYCORS_py目录 • 命令行直接执行$: python DYCORS.py • 或者先进入python,再在python中运行$: python >>> from DYCORS import DYCORS>>> DYCORS('datainput_hartman3', 200, 3, 1, 1)

  17. 代码结构

  18. 计算自己的问题 • 参考datainput_hartman3.py也可以进一步参考utility.py

  19. 获得计算结果 >>> import cPickle as p >>> Solution = p.load(open('Results.data'))

More Related