系統(tǒng)動(dòng)力學(xué)PPT2_第1頁
系統(tǒng)動(dòng)力學(xué)PPT2_第2頁
系統(tǒng)動(dòng)力學(xué)PPT2_第3頁
系統(tǒng)動(dòng)力學(xué)PPT2_第4頁
系統(tǒng)動(dòng)力學(xué)PPT2_第5頁
已閱讀5頁,還剩88頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、系 統(tǒng) 動(dòng) 力 學(xué)(System Dynamics,主講: 張學(xué)民,2,系統(tǒng)動(dòng)力學(xué)建模語言DYNAMO基礎(chǔ),DYNAMO來源,DYNAMO,取名來自 Dynamic Models(動(dòng)態(tài)模型)的混合縮寫。顧名思義,DYNAMO命名的涵意在于建立真實(shí)系統(tǒng)的模型,藉助計(jì)算機(jī)進(jìn)行系統(tǒng)結(jié)構(gòu)、功能與動(dòng)態(tài)行為的模擬。 DYNAMO和系統(tǒng)動(dòng)力學(xué)的關(guān)系,可追溯到50年代系統(tǒng)動(dòng)力學(xué)發(fā)展的初期。DYNAMO的前身稱SIMPLE (Simulation of Industrial Management Problems with Lots of Equation,DYNAMO描述動(dòng)力學(xué)系統(tǒng)的基本原理,以庫存系統(tǒng)為例,

2、為簡(jiǎn)單起見,考慮輸入、輸出速率為常數(shù)的情況。 假定每月發(fā)貨與入庫各為100與80件,則庫存INV每月減少20件,其動(dòng)態(tài)行為是線性的,以圖形表示就是隨時(shí)間變化的直線。 可用數(shù)學(xué)式表達(dá): INV現(xiàn)在INV過去十(時(shí)間間隔)x(純速率) 若庫存量在5個(gè)月前為l200件,則: INV現(xiàn)在1200件+(5月)*(80件/月-100件/月) 1200+5*(-20) 1200-100 1100(件) 當(dāng)速率隨時(shí)間變化時(shí),可以把連續(xù)的時(shí)間分割成小的時(shí)間間隔,并假定在各小間隔內(nèi)速率是固定的,然后,藉助計(jì)算機(jī)逐段地一一加以計(jì)算。若計(jì)算的時(shí)間間隔足夠小,速率變動(dòng)不大,則此結(jié)果將與從微分方程獲得的精確解(如果可能求

3、得的話)十分接近,DYNAMO描述動(dòng)力學(xué)系統(tǒng)的基本原理(續(xù),在DYNAMO中,給變量帶上時(shí)間下標(biāo)以區(qū)別在時(shí)間上的先后。 英文字母K表示現(xiàn)在,J表示剛剛過去的那一時(shí)刻,L表示緊隨當(dāng)前的未來的那一時(shí)刻。DT表示J與K或K與L之間的時(shí)間長(zhǎng)度,DYNAMO描述動(dòng)力學(xué)系統(tǒng)的基本原理(續(xù),庫存方程可用DYNAMO表示如下: INV.K = INV.J + DT*(ORRE.JK - SH.JK) 式中: INV.K 庫存現(xiàn)有量; INV.J DT前的庫存量; DT 計(jì)算的時(shí)間間隔; ORRE 在JK間隔內(nèi)收到的訂貨量 SH 在JK間隔內(nèi)的發(fā)貨量,水平(狀態(tài))變量與方程,水平(狀態(tài))變量:對(duì)輸入和輸出變量(

4、或其中之一)進(jìn)行積累的變量。 在DYNAMO中計(jì)算水平(狀態(tài))變量的方程稱為水平(狀態(tài))變量方程。 在DYNAMO模型中,以L為標(biāo)志寫在第一列。 例如: L LEVEL.K=LEVEL.J+DT*(INFLOW.JK-OUTFLOW.JK) 式中: LEVEL 水平(狀態(tài))變量; INFLOW 輸入速率(變化率); OUTFLOW 輸出速率(變化率); DT 計(jì)算間隔(從J時(shí)刻到K時(shí)刻,速率變量與方程,在水平變量方程中代表輸入與輸出的變量稱為速率,它由速率方程求出。 DYNAMO中,速率方程以R為標(biāo)志。 例如: R BIRTHS.KL = BRF*POP.K 式中: BIRTHS 出生率(人/

5、年); BRF 出生率系數(shù)(人/年); POP 人口(人)。 速率的值在DT時(shí)間內(nèi)是不變的。進(jìn)一步說,速率方程是在K時(shí)刻進(jìn)行計(jì)算,而在自K至L的時(shí)間間隔(DT)中保持不變。速率的時(shí)間下標(biāo)為KL,輔助變量與方程,水平方程有著比較固定的格式,而速率方程無一定格式。因此建立速率方程式頗費(fèi)功夫??梢哉f,構(gòu)思與書寫模型的工作中,考慮與建立速率方程的份量占了很大的比例。 在建立速率方程之前,若末先做好某些代數(shù)計(jì)算,把速率方程中必需的信息仔細(xì)加以考慮,那么將遇到很大的困難。 這些附加的代數(shù)運(yùn)算,在DYNAMO中稱為輔助方程,方程中的變量則稱為輔助變量。 輔助方程以字母A為標(biāo)志,例如: A DISC.K =

6、R00M TEA.K R CHNG.K = CONST*DISC.K 式中: DISC 茶水與室溫度差(); ROOM 室溫度(); TEA 茶水溫度(); CHNG 茶水的溫度變化率(/分)“ CONST 介質(zhì)傳熱系數(shù)(1/分,表函數(shù),模型中往往需要用輔助變量描述某些變量間的非線性關(guān)系,顯然簡(jiǎn)單地由其它變量進(jìn)行代數(shù)組合的輔助變量已不能勝任。 若所需非線性函數(shù)能以圖形給出,那么就能十分簡(jiǎn)單地以DYNAMO的表函數(shù)表示。 考慮一個(gè)企業(yè)建設(shè)的例子。企業(yè)建設(shè)BC是變化率,方程如下: R BC.KL = NCF*BS.K*ELBC.K 式中: BC 企業(yè)建設(shè)(個(gè)/年); NCF 額定建設(shè)系數(shù)(1/年)

7、; BS 企業(yè)(個(gè)); ELBC 土地對(duì)企業(yè)建設(shè)的影響(無量綱,表函數(shù)(續(xù),討論輔助變量ELBC方程的建立問題。 假定,ELBC為土地占用系數(shù)LF0的函數(shù),LFO變化范圍為從零至1。當(dāng)LPO=0時(shí),表示土地未被占用,LFO=1則表示土地被全部占用。 ELBC與LFO的非線性關(guān)系,可用圖表表示,表函數(shù)(續(xù),LPO=0,土地未被占用 LFO=1,土地被全部占用,表函數(shù)(續(xù),輔助變量的值用表函數(shù)給出,采用下示格式: A VAR.K = TABLE(表名,輸入變量,最小的X值,最大的X值,X的增量) T 表名 = Y0/Y1/Y2/Yn 式中,Y0,Y1,Y2,Yn為特定n個(gè)點(diǎn)的Y坐標(biāo)值。 如前例:

8、A ELBC.K = TABLE(TELBC,LFO.K,0,l, 0.1) T TELBC = 1.3/1.28/1.25/1.22/1.18/1.1/1/0.7/0.3/0.1/0,N方程,N方程的主要用途是為水平方程賦予初始值。 在模型程序中,N方程通常緊跟著水平方程。 L INV.KINV.J+(DT)*(ORRE.JK-SH.JK) N INV1000 上述方程表明庫存的初值為1000件,模擬應(yīng)從INV=1000開始,C方程,C方程的主要用途是為常數(shù)賦值。 C OPL = 3,DYNAMO方程小結(jié),至今已討論DYNAMO模型中的六種方程,每一種方程前都要用標(biāo)志字符表示,如下: L 水

9、平方程 R 速率方程 A 輔助方程 C 賦值予常數(shù) T 賦值予表函數(shù)中Y坐標(biāo) N 計(jì)算初始值 L方程是積累(或稱積分)方程,R與A方程是代數(shù)運(yùn)算方程,C,T與N語句為模型提供參數(shù)值,系統(tǒng)動(dòng)力學(xué)模型中的符號(hào),系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟,大體可分為五步 首先要用系統(tǒng)動(dòng)力學(xué)的理論、原理和方法對(duì)研究對(duì)象進(jìn)行系統(tǒng)分析 其次進(jìn)行系統(tǒng)的結(jié)構(gòu)分析,劃分系統(tǒng)層次與子塊,確定總體的與局部的反饋機(jī)制 第三步建立數(shù)學(xué)的、規(guī)范的模型 第四步以系統(tǒng)動(dòng)力學(xué)理論為指導(dǎo)藉助模型進(jìn)行模擬與政策分析,可進(jìn)一步剖析系統(tǒng)得到更多的信息,發(fā)現(xiàn)新的問題然后反過來再修改模型 第五步檢驗(yàn)評(píng)估模型,系統(tǒng)動(dòng)力學(xué)解決

10、問題的主要步驟系統(tǒng)分析,系統(tǒng)分析是用系統(tǒng)動(dòng)力學(xué)解決問題的第一步,其主要任務(wù)在于分析問題,剖析要因。 調(diào)查收集有關(guān)系統(tǒng)的情況與統(tǒng)計(jì)數(shù)據(jù) 了解用戶提出的要求、目的與明確所要解決的問題 分析系統(tǒng)的基本問題與主要問題,基本矛盾與主要矛盾,變量與主要變量 初步劃定系統(tǒng)的界限,并確定內(nèi)生變量,外生變量,輸入量 確定系統(tǒng)行為的參考模式,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟系統(tǒng)的結(jié)構(gòu)分析,這一步主要任務(wù)在于處理系統(tǒng)信息,分析系統(tǒng)的反饋機(jī)制。 分析系統(tǒng)總體的與局部的反饋機(jī)制 劃分系統(tǒng)的層次與子塊 分析系統(tǒng)的變量、變量間關(guān)系,定義變量(包括常數(shù)),確定變量的種類及主要變量 確定回路及回路間的反饋耦合關(guān)系;初步確定系統(tǒng)的主

11、回路及它們的性質(zhì);分析主回路隨時(shí)間轉(zhuǎn)移的可能性,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟建立數(shù)學(xué)的規(guī)范模型,建立數(shù)學(xué)的規(guī)范模型 建立L,R,A,C諸方程 確定與估計(jì)參數(shù) 給所有N方程,C方程與表函數(shù)賦值,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟模型模擬與政策分析,模型模擬與政策分析 以系統(tǒng)動(dòng)力學(xué)的理論為指導(dǎo)進(jìn)行模型模擬與政策分析,更深入地剖析系統(tǒng) 尋找解決問題的決策,并盡可能付之實(shí)施,取得實(shí)踐結(jié)果,獲取更豐富的信息,發(fā)現(xiàn)新的矛盾與問題 修改模型,包括結(jié)構(gòu)與參數(shù)的修改,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟模型的檢驗(yàn)與評(píng)估,模型的檢驗(yàn)與評(píng)估 這一步驟的內(nèi)容并不都是放在最后一齊來做的,其中相當(dāng)一部分內(nèi)容是在上述其他步驟中分散進(jìn)行的

12、,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟,系統(tǒng)動(dòng)力學(xué)解決問題的主要步驟,系統(tǒng)動(dòng)力學(xué)的建模工具 VenSim,Vensim Overview,Vensim Personal Learning Edition (Vensim PLE) is a visual tool that allows you to conceptualize, document, simulate and analyze the systems you work with. It provides a simple and flexible way of building simulation models from diagram

13、s consisting of words, arrows, boxes, pipes and comments. Vensim PLE makes the construction of models based on causal loop and stock flow diagrams fast and simple. Vensim PLE is a modeling tool. The relationships you enter by connecting words with arrows are recorded as causal connections, and this

14、information is used by the Equation Editor to help you form a complete simulation model. You can do analysis of the model throughout the model-building process, looking at the causes and uses of a variable, and also at the loops involving the variable. When you have created a simulation model, Vensi

15、m PLE lets you thoroughly explore the dynamic behavior of that model,Vensim 運(yùn)用 創(chuàng)建水平變量,Vensim 運(yùn)用 創(chuàng)建速率變量,Vensim 運(yùn)用 創(chuàng)建因果關(guān)系,Vensim 運(yùn)用 創(chuàng)建方程式,Vensim 運(yùn)用 創(chuàng)建變量的副本,Vensim 運(yùn)用 刪除圖元,Vensim 運(yùn)用 創(chuàng)建常數(shù)、其他變量,Vensim 運(yùn)用 創(chuàng)建常數(shù)、其他變量,Vensim 運(yùn)用 創(chuàng)建注釋,Vensim 運(yùn)用 字體,Vensim 運(yùn)用 字體顏色,Vensim 運(yùn)用 邊框顏色,Vensim 運(yùn)用 邊框樣式,Vensim 運(yùn)用 文字位置,Ven

16、sim 運(yùn)用 箭線顏色,Vensim 運(yùn)用 箭線形式與粗細(xì),Vensim 運(yùn)用 箭線極性,Vensim 運(yùn)用 文字置后,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Tree Diagram Causes,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Tree Diagram Causes,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Tree Diagram Uses,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Tree Diagram Uses,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Document,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Document,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Loops,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Loop

17、s,Vensim 運(yùn)用 結(jié)構(gòu)分析工具 Units Check,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Strip Graph Causes,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Strip Graph,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Strip Graph Uses,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Table,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Runs Compare,Vensim 運(yùn)用 數(shù)據(jù)集分析工具 Runs Compare,Vensim 運(yùn)用 Custom Graph,Custom graphs allow you to customize the content of a grap

18、h, to show exactly the variables, runs, and style of graph you want,Vensim 運(yùn)用 Custom Graph,Custom graphs allow you to customize the content of a graph, to show exactly the variables, runs, and style of graph you want,Vensim 運(yùn)用 Custom Graph,Custom graphs allow you to customize the content of a graph,

19、 to show exactly the variables, runs, and style of graph you want,Vensim 運(yùn)用 Custom Graph,Custom graphs allow you to customize the content of a graph, to show exactly the variables, runs, and style of graph you want,Vensim 運(yùn)用 Custom Graph,Custom graphs allow you to customize the content of a graph, t

20、o show exactly the variables, runs, and style of graph you want,Building a Simulation Model Using Vensim,Vensim Conventions The Population Model Writing Formulas Checking for Model Syntax and Units Errors Simulating the Model Model Analysis,Vensim Naming Conventions,Levels have initial letters capit

21、alized Population Rates and auxiliaries are all lower case births Constants and Lookup Tables are all capitals AVERAGE LIFETIME,The Population Model (rabbit,FINAL TIME: 52 TIME STEP: 0.25 Units: weeks,Writing Formulas,AVERAGE LIFETIME = 25 Units: week BIRTH RATE = 0.04 Units: 1/week births = Populat

22、ion * BIRTH RATE Units: rabbits/week deaths = Population / AVERAGE LIFETIME Units: rabbits/week Population = INTEG(births-deaths,500) Units: rabbits,Writing Formulas,INTEG (rate, initial value) Returns the integral of the rate. The rate is numerically integrated. The initial value is the value of th

23、e variable that is being integrated, at the start of the simulation. Restrictions: INTEG must directly follow the equal sign. It signals Vensim that the variable on the left-hand side of the equation is a Level or State variable. INTEG ( unit / time, unit ) - unit The units of the integral must be t

24、he same as the units of the initial condition. The rate must have the same units, divided by the units of TIME_STEP. Examples Valid L = INTEG( R, 0.0 ) L = INTEG(A, B ) Invalid L = A + INTEG( R, 0.0 ) L = INTEG( B, 0.0 ) + 1 L = 2.0 * INTEG( R, 0.0 ) + 1.0 INTEG must follow the equal sign, and it ca

25、nnot be part of a more complex mathematical expression. These formulations are made valid by defining an auxiliary variable to perform the indicated operations, e.g. L = INTEG( R, 0.0 ) aux = A + L,Checking for Model Syntax and Units Errors,Simulating the Model,Model Analysis Strip Graph and Table,P

26、opulation appears unchanging from 500 rabbits equilibrium,Model Analysis Unconstrained Growth,Changes of birth rate from 0.04 to 0.08 can generate unconstrained growth. This is one of the simplest possible dynamic behaviors, also known as exponential growth,rabbit2,Model Analysis Unconstrained Growt

27、h,Model Analysis Unconstrained Growth,Model Analysis Exponential Decay,Changes of AVERAGE LIFETIME from 25 to 10 can generate exponential decay in the population. This is one of the simplest possible dynamic behaviors, also known as exponential decay,rabbit3,Model Analysis Exponential Decay,Model An

28、alysis Exponential Decay,Nonlinear Relationships,The population model presented in the previous is a simple model that uses only multiplication and division in its formulas. While addition, subtraction, multiplication and division are the most common components of formulas, sometimes it is necessary

29、 to capture different types of relationships. Vensim PLE has a number of functions such as EXP (exponential) and LN (natural logarithm) that can be helpful. Most of the time, however, it is more convenient to make up functions with customized properties. The development of Lookup Tables is a means o

30、f capturing nonlinear relationships,Nonlinear Relationships Rabbits Limited By Food Resource,Lets examine a simulation model of growth in a rabbit population until it hits a resource constraint, in this case a fixed land area resulting in a fixed food supply. Rabbits can multiply as long as sufficie

31、nt food is available; when the rabbit population approaches the constraint (carrying capacity), the population is limited by an increase in rabbit deaths (from insufficient food). The relationship between the carrying capacity and rabbit deaths is described by a nonlinear Lookup Table,FINAL TIME: 10

32、 TIME STEP: 0.125 Units for Time: Year,Nonlinear Relationships Rabbits Limited By Food Resource,Nonlinear Relationships Rabbits Limited By Food Resource,INITIAL RABBIT POPULATION = 100 Units: Rabbit RABBIT BIRTH RATE = 1.1 Units: 1/Year AVERAGE RABBIT LIFE = 2 Units: Year rabbit births = Rabbit Popu

33、lation * RABBIT BIRTH RATE Units: Rabbit/Year rabbit deaths = (Rabbit Population / AVERAGE RABBIT LIFE) * effect of crowding on deaths Units: Rabbit/Year Rabbit Population = INTEG(rabbit birthsrabbit deaths, INITIAL RABBIT POPULATION) Units: Rabbit,Nonlinear Relationships Rabbits Limited By Food Res

34、ource,Now you will define the carrying capacity. A certain area of grassland exists and each rabbit requires an amount of grass to live on. Dividing the area of grassland by the area of grass required per rabbit gives the number of rabbits that can live on that land. AREA OF GRASSLAND = 20000 Units:

35、 square yards GRASS REQUIRED PER RABBIT = 10 Units: square yards/Rabbit carrying capacity = AREA OF GRASSLAND / GRASS REQUIRED PER RABBIT Units: Rabbit Rabbit crowding is defined as the rabbit population divided by carrying capacity. This model will expect the numerical value to fall within the rang

36、e from 0 (if no rabbits exist) to 2 (when rabbit population is double the carrying capacity). rabbit crowding = Rabbit Population / carrying capacity Units: dmnl The amount of rabbit crowding will affect the death rate of rabbits: higher crowding implies a higher death rate. To change the death rate

37、 based on rabbit crowding, you will use a graphical Lookup Table,Nonlinear Relationships The Effect of Crowding on Deaths,In the formulation of this model we have said that the more crowded it is, the more rabbits will die. In thinking about this it seems likely that a little bit of crowding will no

38、t make to much difference, whereas a lot of crowding would. Extending this to an extreme, if the rabbits were so crowded that they were squishing each other we would not expect them to live for more than a few moments. While you could try to find a function that has this property, the Lookup Table p

39、rovides an easier solution. A Lookup Table is an arbitrary function, one that you define as a table or graph, that describes a relationship between an input and an output. The Lookup Table for this model allows us to describe how rabbit deaths change when the rabbit population exceeds the carrying c

40、apacity. An intermediate concept, effect of crowding on deaths, will relate the rabbit crowding to rabbits deaths through the Lookup Table. The effect of crowding on deaths will take the input values from the variable rabbit crowding and convert them to output values by using the Lookup Table,Nonlin

41、ear Relationships The Effect of Crowding on Deaths,Nonlinear Relationships The Effect of Crowding on Deaths,Nonlinear Relationships The Effect of Crowding on Deaths,This graph, in words, says that as the input (rabbit crowding) moves from 0, output rises slowly, but as rabbit crowding gets higher, output rises faster and faster. The effec

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論