




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
课内实验报告课 程 名: 任课教师: 专 业: 学 号: 姓 名: 二 一二 至二 一三 年度 第 1 学期南京邮电大学 经济与管理学院 系统工程课程实验报告实验内容及基本要求:实验项目名称: 实验类型:设计每组人数: 1实验内容及要求: 1) 了解Netlogo编程语言的特点和基本语法。2) 用系统动力学建模工具完成狼吃羊生态系统模型的仿真和仿真流程分析。实验过程与结果:(1) 系统动力学建模1.在NetLogo里面打开一个新的模型,在Tools菜单启动系统动力学建模工具(System Dynamics Modeler)2.按下工具条中的Stock,绘制羊群存量,双击该存量,将存量命名为“sheep”,初始值为250(该值为电商10班21号初始值),令 Allow Negative Values 选择框为未选,因为羊群为负不合理! 3. 如果有羊出生,则羊的数量增加。要实现这一点,创建一个进入羊群存量的流量。 单击工具条上的Flow按钮,在Sheep存量左边的空白区按下鼠标按钮,向右拖动流直到它的右侧连到Sheep存量。 编辑该流量,命名为“sheep-births ”编辑流量sheep-births,设置其表达式为sheep-birth-rate * sheep. 4.一段时间内羊的出生数量依赖于活羊的数量:羊越多则生的越多。 从sheep存量到sheep-births流量画一条连接(Link) 5. 创建一个变量,命名为sheep-birth-rate,设置它的值是0.04。从变量:“sheep-birth-rate”画一条连线到“sheep-births ”羊群模型如下:(2) NetLogo例程代码1. 选择NetLogo主窗口 在例程页,写代码如下: to setup ca system-dynamics-setup end to go system-dynamics-gosystem-dynamics-do-plot end2.转移到界面页,创建“setup”按钮,创建“go”按钮(选择forever选项)。 3.创建sheep监视器,创建绘图“populations”,提供画笔“sheep”4. 返回系统动力学窗口 增加一个存量wolves 增加流量、变量和连接,如下图所示: 备注:wolves 的初值为90, wolf-deaths的表达式为 wolves * wolf-death-rate , wolf-death-rate 是 0.15, predator-efficiency 是 .8, wolf-births的表达式是 wolves * predator-efficiency * predation-rate * sheep, predation-rate 是 3.0E-4, sheep-deaths 的表达式是 sheep * predation-rate * wolves. 5. 返回NetLogo 主窗口,为羊群绘图增加一个名为 wolves 的画笔 (3) 仿真结果按下setup和go,查看系统动力学建模工具的效果 附录:源程序代码; System dynamics model globalsglobals ; constants sheep-birth-rate predation-rate predator-efficiency wolf-death-rate ; stock values sheep wolves ; size of each step, see SYSTEM-DYNAMICS-GO dt; Initializes the system dynamics model.; Call this in your models SETUP procedure.to system-dynamics-setup reset-ticks set dt 1.0 ; initialize constant values set sheep-birth-rate 0.04 set predation-rate 0.0003 set predator-efficiency 0.8 set wolf-death-rate 0.15 ; initialize stock values set sheep 250 set wolves 90end; Step through the system dynamics model by performing next iteration of Eulers method.; Call this in your models GO procedure.to system-dynamics-go ; compute variable and flow values once per step let local-sheep-births sheep-births let local-wolf-births wolf-births let local-sheep-deaths sheep-deaths let local-wolf-deaths wolf-deaths ; update stock values ; use temporary variables so order of computation doesnt affect result. let new-sheep max( list 0 ( sheep + local-sheep-births - local-sheep-deaths ) ) let new-wolves max( list 0 ( wolves + local-wolf-births - local-wolf-deaths ) ) set sheep new-sheep set wolves new-wolves tick-advance dtend; Report value of flowto-report sheep-births report ( sheep-birth-rate * sheep ) * dtend; Report value of flowto-report wolf-births report ( wolves * predator-efficiency * predation-rate * sheep ) * dtend; Report value of flowto-report sheep-deaths report ( sheep * predation-rate * wolves ) * dtend; Report value of flowto-report wolf-deaths report ( wolves * wolf-death-rate ) * dtend; Plot the current state of the system dynamics models stocks; Call this procedure in your models GO procedure.to system-dynamics-do-plot if plot-pen-exists? sheep set-current-plot-pen sheep plotxy ticks sheep if plot-pen-exists? wolves set-current-
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 废玻璃回收再生回收项目可行性研究报告
- 2025-2026学年人教版(2024)小学数学二年级上册期中(第1-3单元)核心知识点归纳
- 有机硅耐热漆项目可行性研究报告
- 防汛知识培训宣传
- 装饰施工工装合同
- DB65T 4119-2018 绵羊细管冷冻精液操作规程
- 消费优惠市场分析研究
- 星际尘埃对空间材料性能的影响-洞察及研究
- 窗帘制作安装合同正式版范本2篇
- 培训班租赁合同3篇
- 中华民族共同体概论知到课后答案智慧树章节测试答案2025年春丽水学院
- 胖东来超市收银培训
- 2025年焊工(高级技师)职业技能鉴定理论考试题(附答案)
- 汇率风险管理政策研究-深度研究
- 电网工程设备材料信息参考价(2024年第四季度)
- 数据中心运维服务投标方案(技术标)
- BACTEC-FX血培养仪标准操作程序
- 《蛋白质组学》课件
- 3.新教材八上第三单元阅读综合实践
- 大学生劳动教育通论知到智慧树章节测试课后答案2024年秋大连海洋大学
- 2024版农业公司与个人农产品种植合作合同范本3篇
评论
0/150
提交评论