系统动力学-建模软件-Vensim-函数总结

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日1No函数名称X的值Y的表达式结果/说明1STEP(height,steptime)10Step(8,20)Returns0untilthesteptimeandthenreturnsheight2ABS(x)-5ABS(X)53DELAYFIXED(input,delaytime,initialvalue)-5DELAYFIXED(X,10,-8)4DELAY1(input,delaytime)DELAY1I(input,delaytime,initialvalue)STEP(4,10)DELAY1(X,5)DELAY1I(X,10,-8)Y-4-5-6-7-80102030405060708090100Time(Month)Y:CurrentY432100102030405060708090100Time(Month)Y:CurrentY-4-5-6-7-80102030405060708090100Time(Month)Y:Current新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日24DELAY3(input,delaytime)DELAY3I(input,delaytime,initialvalue)STEP(4,10)STEP(4,10)DELAY1(X,5)DELAY1(X,5)Delay1和Delay3的差别5EXP(X)Sameasfunction,POWER(e,X),wheree=2.718...SameasPOWER(e,X)EXP(1.0)isequalto2.718282STEP(4,10)EXP(DELAY1(X,5))Y107.552.500102030405060708090100Time(Month)Y:CurrentY6045301500102030405060708090100Time(Month)Y:Current新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日36INTEGER(x)取整数INTEGERpartofxReturnsthelargestintegersmallerthanorequaltoX7LN(X)自然对数NaturalLogarithmof[variable]E的指数是多少的问题自然对数以常数项e(2.71828182845904)为底LN(2.718282)isequalto1.0常数项e的自然对数LN(EXP(2.0))isequalto2.0(bydefinition).8MAX(A,B)SameasIFTHENELSE(AB,A,B)MaximumofTwoAlternatives9MIN(A,B)SameasIFTHENELSE(AB,A,B)MinimumofTwoAlternatives10MODULO(A,B)BolunminingkaldukiReturnstheremainderwhenAisdividedbyBMODULO(9,5)isequalto4.0.MODULO(76.5,70)isequalto6.5.MODULO(8.3,7.3)isequalto1.011PULSE(start,width)Returns1.0,startingattimestart,andlastingforintervalwidth;0.0isreturnedatallothertimes.5从第五步开始取1PULSE(X,10)Withd=10取的值1,持续10步,在会原位Y10.750.50.2501471013161922252831343740Time(Month)Y:Current新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日412PULSETRAIN(start,width,tbetween,end)Returns1.0,startingattimestart,andlastingforintervalwidthandthenrepeatsthispatterneverytbetweentime;0.0isreturnedatallothertimes.Ifthevalueoftbetweenissmallerthanwidththen1willbereturnedbetweenstartandend.IfwidthislessthanorequaltoTIMESTEPthepulseswillonlylastoneTIMESTEP4PULSETRAIN(X,5,10,30)比如:在这里tbetween的起点是4、14、24,并结束了第30步13RAMP(slope,starttime,endtime)Returns0untilthestarttimeandthenslopesupwarduntilendtimeandthenholdsconstant.2RAMP(X,10,25)在这里:Slope=(Y2-Y1)/(endtime-starttime)14RANDOMNORMAL(m,x,h,r,s)Providesanormaldistributionofmean0andvariance1beforeitisstretched,shiftedandtruncated.Thisisequivalenttoanormaldistributionwithmeanhandstandarddeviationr.Theunitsofrshouldmatchm,xandh.2RANDOMNORMAL(2,20,X,1,1)RANDOMNORMAL({min},{max},{mean},{stdev},{seed})Y10.750.50.2501471013161922252831343740Time(Month)Y:CurrentY4030201001471013161922252831343740Time(Month)Y:CurrentY64.531.501471013161922252831343740Time(Month)Y:Current新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日515RANDOMUNIFORM(m,x,s)Providesauniformdistributionbetweenmandx.WhereMisminimumvalueXismaximumvalueSisastreamIDforthedistribution(noiseseed)2RANDOMUNIFORM(2,20,X)16SMOOTH(input,delaytime)step(5,10)SMOOTH(X,10)17SMOOTHI(input,delaytime,initialvalue)step(5,10)SMOOTH(X,10,2)Y201510501471013161922252831343740Time(Month)Y:CurrentY64.531.501471013161922252831343740Time(Month)Y:CurrentY64.531.501471013161922252831343740Time(Month)Y:Current新疆师范大学地理科学与旅游学院“地理信息与城乡规划”系玉素甫江2012年3月22日618SMOOTH3(input,delaytime)step(5,10)SMOOTH3(X,10)19SMOOTH3I(input,delaytime,initialvalue)step(5,10)SMOOTH(X,10)POWER(BASE,X)ReturnsBASEtothepowerofX.SameasBASE^X20SQRT(X)SQRT(X)SquareRootofXReturnsthesquarerootofX.Sameas:POWER(X,0.5).22XIDZ(A,B,X)XIfDividedbyZero(otherwiseA/B)XIDZ(3,4,1)isequalto0.75.XIDZ(3,0,1)isequalto1.0.23ZIDZ(A,B)ZeroIfDividedbyZero(otherwiseA/B)ZIDZ(3,4)isequalto0.75.ZIDZ(3,0)isequalto0.24IFTHENELSE(cond,tval,fval)TraditionalIf-ThenStatementIFTHENELSE(1.02.0,3.0,4.0)isequalto3.0.IFTHENELSE(1.02.0,3.0,4.0)isequalto4.0.Y64.531.501471013161922252831343740Time(Month)Y:CurrentY64.531.501471013161922252831343740Time(Month)Y:Current

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功