系统动力学模型讲.ppt

上传人:牧羊曲112 文档编号:5811609 上传时间:2023-08-22 格式:PPT 页数:75 大小:460KB
返回 下载 相关 举报
系统动力学模型讲.ppt_第1页
第1页 / 共75页
系统动力学模型讲.ppt_第2页
第2页 / 共75页
系统动力学模型讲.ppt_第3页
第3页 / 共75页
系统动力学模型讲.ppt_第4页
第4页 / 共75页
系统动力学模型讲.ppt_第5页
第5页 / 共75页
点击查看更多>>
资源描述

《系统动力学模型讲.ppt》由会员分享,可在线阅读,更多相关《系统动力学模型讲.ppt(75页珍藏版)》请在三一办公上搜索。

1、系统动力学简称SD(System Dynamics),系统动力学原理 建模基本步骤 VensimPLE软件,系统动力学模型(System Dynamics)被誉为实际系统的实验室,是美国麻省理工学院(MIT)福瑞斯特Forrester(Jay W.Forrester)教授于1956年首创的一种运用结构、功能、历史相结合的方法,借助于计算机仿真而定量地研究非线性(Non-linearity)、多重反馈(Information feedback)、复杂时变(Dynamic complexity)系统的系统分析技术。可用于研究处理社会经济生态和生物等复杂系统问题,它可在宏观层次和微观层次上对复杂、多

2、层次、多部门、非线性的大规模系统进行综合研究。,反馈(feedback)是控制系统的一种方法。它是把系统输出去的一部分信息(给定信息)作用于被控对象后产生的结果(真实信息)再返回给输入,并对系统的再输出产生影响的过程。系统所具有的这种功能和过程称之为系统反馈。系统动力学认为几乎所有人工的系统都是反馈系统。,动态(Dynamic)即系统动力学所包含的量是随时间变化的,能以时间为坐标的图形表示。譬如,人口的增长,就业人数的增减,城镇与农村的生活质量和物价的涨落等都是动态问题。学习定义动态问题的技巧是学习系统动力学的第一步。,1系统的流,系统动力学主要利用四种流来构成模型 物流订货流资金流信息流,2

3、水平(积累、状态)level变量,水平(积累)是系统的流的积累。例如,库存量、存款、人口、资源等都可作为水平变量。一个水平方程相当于个容器,它积累变化的流速率。其流速有输入流速和输出流速,容器内的水平正是其输入流速与输出流速的差量的积累。,怎样计算水平变量?,用DT近似表示dt,上式写成,一阶差分方程,符号DT表示时间的差分,即两次计算之间时间间隔的长度。,因此,一个水平变量的新值等于它前一时刻的值加上或者减去时间间隔所产生的变化值。这就是系统动力学的水平方程(Level方程)。在一个水平方程中,可以有一个或者几个流入速率,也可以同时有一个或者几个流出速率。水平方程实际是积分运算,用微积分符号

4、可将上式写成:,3速率(Rate)变量,速率(流速)(Rate)表示系统中水平变量变化的强度,具有瞬时性的特征,反映单位时间内水平变量增加或减少的量。水平变量是系统活动结果的状态变量,而速率则是对水平变量变化过程及其控制的描述。速率的基本形式有两种,流入速率和流出速率。,4延迟(Delay),在复杂的社会经济系统中存在广泛的延迟(Delay)现象即系统中的物流或信息流从它们的输入到它们的输出响应,总不可避免地有一段时间的延迟,这段时间就是延迟时间或延迟。例如,从订货到收货,固定资产的投资到发挥经济效益,从下种到庄稼收获,从投入教育经费到人才的产出,从污染物散入环境到危害人类健康,等等都存在着一

5、段或长或短的延迟时间,这些是物流的延迟。同样信息流也存在延迟。如,商品供求关系的变化要经过一段时间才会引起商品价格的变动;产品质量影响工厂的声誉也需要一段时间。,延迟实际上是将系统中流入速率变为流出速率的种转换过程。一个动态的流体系统通常是同一瞬间流入速度不等于流出速率,这就是说从这一输入到输出的过程中会有一种延迟传送的流量:当流入速率大于流出速率时,延迟传送的流量就增多;当流出速率大于流入速率时,延迟传送的流量就减少。因此,延迟是一种特殊的水平变量,特殊的积累,延迟是一个“积累容器”、但它又不同于一般的水平变量。因为延迟的流出速率只受延迟时间的影响,与外界因素无关;而一般水平变量的流出速率除

6、受本身的特性决定以外,还受外界因素的影响。,一个简单的疾病蔓延模型,三个水平变量:未患病者;患病者;康复者;为分析需要,增加新的水平变量:INC处于潜伏期者,其输入速率为感染率INF,输出速率为疾病显现率SYMP。,5信息反馈系统,控制论系统可以划分为开环系统和闭环系统。闭环系统又叫信息反馈系统。如果系统的输出量对系统的输入量没有影响,即对系统的控制作用没有影响,则叫做开环系统。例如,洗涤机就是这种系统在洗涤机中依次进行着浸湿、洗涤和漂清的过程。在洗涤机中不需要对输出信号,即衣服的清洁度进行测量。开环系统,不需对输出量进行测量,也不需将输出量反馈到输入端与输入量进行比较。这种系统不是反馈控制系

7、统,当出现扰动时,开环控制系统就不能完成既定任务。,闭环系统是指系统的输出对系统的输入有影响的系统,也就是系统输出信息对控制作用有直接影响的系统。因此,闭环系统又叫信息反馈系统。输入信号和反馈信号之差,叫误差信号。误差信号送到控制器上,以减少系统的误差,使系统的输出量趋于所希望的目标值。例如,商业中,订货库存系统就是反馈系统。订货与库存水平产生生产决策,生产决策又引起供货、调整库存,最后再引起生产决策,具有市场信息反馈的生产系统是一个反馈系统。该系统根据市场信息控制产品生产。,信息反馈系统又可以划分为两种系统:正反馈系统Positive(Reinforcing)Feedback Loop、负反

8、馈系统Negative(Balancing)Feedback Loop。正反馈系统是指系统运行发生一个持续增长过程,因为在该系统中控制作用引起的结果会导致发生更强的控制作用。负反馈系统,是系统运行时寻求目标,若没有达到目标就会不断产生反应的系统。划分一个特定反馈系统是正反馈系统还是负反馈系统或者开环系统,也是相对的。这取决于观测者确定系统目标时的特殊着眼点(观点)。,6因果关系,系统由相互依存、相关作用的要素组成。如果要素A的量的变化会引起要素B的量的变化,则称A与B之间存在着因果关系。反映系统各要素之间因果关系的图就称为因果关系图。系统动力学用矢线表示系统中两个要素(变量)之间的联系,称为因

9、果链或因果环(Causal Link)。如果有两个因素(变量)A和B,它们之间存在因果联系,如果A变化A,则引起B变化B或-B。这时,可把A看作B变化的原因,B是A的结果。,正因果关系:设有两个因素(变量)A和B。如果A变化A,则使B变化B,A和B变化是同号。也就是说,如果A增加引起B增加,或者A减少引起B减少,即A对B的关系是正因果关系,记作A+B,如人口总数和出生率的关系是正因果关系。负因果关系:设有两个因素(变量)A和B。如果A变化A,则使B变化-B,A和B变化是异号。也就是说,如果A增加引起B减少,或者A减少引起B增加,即A对B的关系是负因果关系,记作A-B。如死亡率和人口总数的关系就

10、是负因果关系。A对B的因果关系无论是正因果关系还是负因果关系,反过来并不一定成立。例如,死亡率对人口总数是负因果关系,但人口总数对死亡率却是正因果关系,7反馈回路,系统中有两个或者两个以上的变量(水平变量、关于水平变量的信息变量),按照它们的因果反馈关系,组成一个闭合的因果反馈回路(又称因果反馈环)。,正反馈回路(self-reinforcement自我增强):一个反馈回路,假设其中某一变量有一个变化(增加),依次通过回路中其他变量的因果关系之后,结果是加强原来变量的变化(增加);或者,这个变量有一个变化(减少),经过一系列因果关系后,结果是减弱这个变量的变化(减少)。那么,这个回路叫正反馈回

11、路,记作“(+)”。负反馈回路(goal-seeking向目标追寻):一个反馈回路,假设其中某一变量有一个变化(增加),依次通过回路中其他变量的因果关系之后,结果减弱了原来变量的变化(减少);或者,这个变量有一个变化(减少),经过一系列因果关系后,结果是增强这个变量的变化(增加)。那么,这个回路叫负反馈回路,记作“(-)”判断一个反馈回路是正还是负有一条简明的规则:把反馈回路中所有的负号(负因果链)的个数都加起来,如果负号锋的个数之和为零或偶数时则为正反馈回路,如果是奇数,则为负反馈回路,8因果反馈回路图,一个复杂的系统由几个或多个子系统组成系统动力学用数学模型来模拟系统并利用信息把系统定量化

12、。一个系统就是一个模型。一个复杂模型可以分解为若干个子模型(模块)。一个子模型中又有若干个反馈回路,包括正、负相结合的反馈回路,把这些反馈回路按其内在因果关系联结起来,就构成整个模型的因果反馈图。,一阶正反馈回路,一阶是指一个水平变量 举例:已知人口的年增加值和总人口构成一阶正反馈回路,现假设人口的年增长率为2%,期初人口为100万。试构造因果反馈结构并进行计算机仿真模拟。,手工仿真计算的前几步:,(1)birth=birth rate*populationUnits:Year(2)birth rate=0.02Units:*undefined*(3)FINAL TIME=100Units:Y

13、earThe final time for the simulation.(4)INITIAL TIME=0Units:YearThe initial time for the simulation.(5)population=INTEG(birth,100)Units:*undefined*(6)SAVEPER=TIME STEPUnits:Year 0,?The frequency with which output is stored.(7)TIME STEP=1Units:Year 0,?The time step for the simulation.,注释:INTEGRAL:积分即

14、population是birth的积分,初始值为100。SAVERPER:the frequency with which values are saved for latter displayTME STEP:the integration solution interval.,Time(Year)population Runs:0 10011022104.043106.1214108.2435110.4086112.6167114.8698117.1669119.50910121.89911124.33712126.82413129.36114131.94815134.58716137.2

15、7917140.02418142.82519145.681,一阶负反馈回路,举例:一个基本的库存控制系统。现假设初始库存量为 1000吨,期望库存量为6000吨,由当前库存量调整到期望库存量所需要的时间AT为5周,试构造因果反馈结构并进行计算机仿真模拟。,手工仿真计算的前几步:,水平变量是库存量,记为I。订货速率为OR,OR可以为正,也可为负。正的表示订货增加库存量,负的表示将现有的库存量退回供应部门以减少库存量。系统的目标是要求的库存量,记为DI。由当前库存量调整到期望库存量所需时间,记为AT,一阶负反馈回路:库存量模拟结果,Current表示调整时间为2天run2表示调整时间为1天,总结:

16、两种反馈回路,一阶正反馈回路具有自我加强的作用,对系统起强化作用,经过若干年后总人口数会越来越多,每年增加的人口数也相应地越来越多。一阶负反馈回路具有自我平衡的作用,经过若干时间(周、天)后,库存量会越来越接近于期望库存量,定货速率也相应地越来越小,库存差额相应地减小。,画出系统的因果反馈图是建立系统动力学的数学模型的基础。在因果反馈图中采用名词,不用动词。变量之间的影响和作用用以带箭头的因果链表示。明确变量增减的涵义。尽可能确定变量的量纲,这有助于突出因果反馈图中文字叙述的涵义。反馈结构一定形成闭合回路。画好各子模型中的反馈回路,区别正反馈还是负反馈,不能产生差错。,系统动力学仿真的基本步骤

17、,Vensim软件介绍,界面及工具建立因果反馈图(causal loop diagrams)和流图(Stock and Flow Diagrams)模拟过程函数:LOOKUP、TIME、STEP,What is Vensim?,Vensim is a visual modeling tool that allows you to conceptualize,document,simulate,analyze,and optimize models of dynamic systems.Vensim provides a simple and flexible way of building s

18、imulation models from causal loop or stock and flow diagrams.By connecting words with arrows,relationships among system variables are entered and recorded as causal connections.This information is used by the Equation Editor to help you form a complete simulation model.You can analyze your model thr

19、oughout the building process,looking at the causes and uses of a variable,and also at the loops involving the variable.When you have built a model that can be simulated,Vensim lets you thoroughly explore the behavior of the model.-Vensim Users Guide Version 5,界面及工具,标题Title Bar,菜单Menu,Toolbar,绘图工具Ske

20、tch Tools,状态条Status Bar,Structural Analysis ToolsCauses Tree creates a tree-type graphical representation showing the causes of the Workbench Variable.因果树图Uses Tree create a tree-type graphical representation showing the uses of the Workbench Variable.使用树图Loops displays a list of all feedback loops

21、passing through the Workbench Variable.反馈图Document reviews equations,definitions,units of measure,and selected values for the Workbench Variable.Dataset Analysis ToolsCauses Strip Graph displays simple graphs in a strip,allowing you to trace causality by showing the direct causes(as shown)of the Wor

22、kbench Variable.显示与所选择变量有直接关系的变量的模拟结果Graph displays behavior in a larger graph than the Strip Graph,and contains different options for output than the Strip Graph.Table generates a table of values for the Workbench Variable.Runs Compare compares all Lookups and Constants in the first loaded dataset

23、to those in the second loaded dataset.,分析工具,Analysis Tool Output,控制板The Control PanelThe Control Panel allows you to change internal settings that govern the operation of Vensim,such as which Workbench Variable is selected or what Datasets are loaded.,2.建立因果反馈图(Causal loop diagram)和建立流图(Stock and fl

24、ow diagram),1)建立因果反馈图(causal loop diagrams):以Savings-Interest为例,演示,3种分析工具:Cause Tree;Uses Tree;Loops,分析因果反馈图的逻辑结构,两个图经由变量savings的因果关系而连接,刚好分别前后对调;当反馈环向后回到该变量,则用括号括起来。,确定savings为变量后,点击Loops,列举全部有关该变量的因果反馈图,Loop Number 1 of length 1 saving interestLoop Number 2 of length 2 saving work effort income,因果

25、反馈图只能描述反馈结构的基本方面,不能表示不同性质的变量的区别,这是其根本弱点。如状态变量的积累概念,是系统动力学中最重要的量,然而因果反馈图全然忽视了这一点。因此,需要建立流图。,2)建立流图(Stock and Flow Diagrams)-以workforce-inventory为例,construct Inventory as a Level,then add a rate flowing in and a rate flowing out.,Now we need to figure out how production gets determined.add the level W

26、 hire rate can either increase or decrease the workforce.,add the proportionality constant productivity.Also,net hire rate is dependent on the value of Workforce.,add in the variables target workforce and time to adjust workforce and connect them.,Add the concept of target production,and connect it

27、to target workforce.We will set target production on the basis of sales.,introduce target inventory,inventory correction and two additional Constants.The idea is simple.target inventory is the amount of stock that should be held based on expectations about sales.The inventory correction is the corre

28、ction for a deviation of Inventory from its target.,3.模拟:以workforce-inventory为例,The following steps are typical for building and using Vensim models.Construct a model or open an existing model.Examine the structure using the structural Analysis tools(Tree Diagrams.).Simulate the model moving around

29、model parameters to see how it responds.Examine interesting behavior in more detail using the dataset Analysis tools(Graphs and Tables).Perform controlled simulation experiments and refine the model.Present the model and its behavior to your audience using SyntheSim results,Analysis tool output cust

30、omer Graphs and Tables.,1)open an existing model:c:Program FilesVensimmodelsguidechap03WFINV.MDL,2)Examine the structure using the structural Analysis tools(Tree Diagrams.).,Causes Tree Diagram(Workbench Variable,Inventory,is on the right and everything that causes it to change(up to 2 connections d

31、istant)is on the left.),the Workbench Variable on the left and where it is used in the model(what it causes change,up to 2 connections distant)on the right.,Uses Tree Diagram,the Loops Analysis tool:variable net hire rate,Loop Number 1 of length 1 net hire rate WorkforceLoop Number 2 of length 6 net

32、 hire rate Workforce production Inventory inventory correction target production target workforce,displays all variables in all feedback loops(two)that pass through the Workbench Variable(net hire rate).,3)Simulating the Model:amount of Inventory over time.,Double click on the simulation Runname edi

33、ting box on the Toolbar to highlight the default name Current(or click once and drag over the name Current),then type in the name baserun.Click on the SyntheSim button,Double click on the simulation Runname editing box on the Toolbar again and replace the name baserun with experiment.,Using the mous

34、e drag the slider below productivity back and forth.As you move the slider the model will simulate and the results will display in blue,with the results from baserun being shown in red.,4)Examining Behavior,Position the mouse over Workforce and leave it there.A graph should pop up just below workfor

35、ce.,Click on Workforce to select it into the Workbench.Click on the Graph Analysis toolTwo things are worth noting about the above graph.First both runs show a pattern of behavior known as damped oscillation.Second,the two runs are identical except for scaling.,Click on the variable Inventory appear

36、ing in the sketch and then click on the Graph tool,We see a graph of Inventory with oscillating behavior similar to workforce,although Inventory starts out by declining before increasing in value.More importantly,there is only one graph visible.,Click on the Table tool,Only one graph line is visible

37、 for Inventory because the values are identical for both runs.Changing productivity impacts only Workforce,target workforce and net hire rate.This is quite clear just by looking at the model diagram as you drag the slider and occurs because productivity really just scales the number of people requir

38、ed to produce one item.,Click on the Reset Slider button or press the Home key to return the value of productivity to its original setting.Repeat the above experimentation process with each of the three remaining constants.Drag the sliders observing behavior and then bring up more detailed graphs wh

39、en you see something interesting.,The things to be looking for when you are evaluating behavior are the period of oscillation(振动),the extent by which variables change and the degree of damping(衰减).The period of oscillation is the time from one peak to the next on the time graphs.Damping is the decre

40、ase in amplitude that occurs from peak to peak,where amplitude is the distance along the y axis from the eventual value the variable settles to.It should be easy to see that productivity and inventory coverage do not significantly change these while time to adjust workforce and time to correct inven

41、tory do.,time to adjust workforce,5)Causal Tracing,Just as you looked at the causes of Inventory by using the Causes Tree Diagram Analysis tool,you can also look at graphs of behavior of the variables that cause Inventory to change.,Click on the Reset All button or use the key combination Ctrl+Home.

42、Click on Inventory to select it into the workbench.Click on the Causes Strip Analysis tool,A strip graph is generated that shows the Workbench Variable(Inventory)at the top,and all the variables that directly cause Inventory to change below it(production and sales).we will look into production and n

43、ot sales to understand the source of this oscillation.,Causal Tracing is a quick and powerful tool that helps us determine what portions of a model are causing which types of behavior.The Causes and Uses Tree Diagrams and the Table tool can all be used for Causal Tracing but the most commonly used t

44、ool is the Causes Strip tool and we will use that to investigate the sources of oscillation in this model.,4.几个常用函数:LOOKUP、TIME、STEP,1)LOOKUP:说明在一个模拟模型中任意两个变量之间的函数关系;可以描述一个表格包含两个变量的一组值。比如,改变原储蓄存款模型(Saving-Interest)。当存款少于5000¥,利率为5;存款不少于5000¥,利率为7。相当于原来DYNOMA 中的table函数,演示,2)TIME变量一些Vensim功能明显是时间函数,为了

45、使用这一功能,在模型中必须使用TIME当作函数。比如,对某些产品100单位振幅与12个月季节变化需求。时间以月为单位。Variable Demand=100*sin(2*3.14159*Time/12),演示,注意:Time 用符号包起来,表示它是一个隐藏式变量,3)STEP函数,阶跃函数产生一个从零到给定值的一次阶跃。比如WFINV.MDL中sales=100+STEP(50,20)The STEP function is one of the most commonly used input functions.This function returns 0 until Time reaches stime and then it returns sheight.In our example it will return 0 till time 20 then it will return 50 so that sales will start at 100,remain constant till time 20 and then jump to 150.,作业:,1.阅读现代地理学中的数学方法P370-3782.试构造一个问题的因果反馈结构(要求至少包括正负反馈回路各一个)3.熟悉下周上机内容:VensimUsersGuideP11-22;P23-40;P75-P90,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号