系统动力学 建模软件 Vensim 函数总结
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
DELAY1(X, 5 )
Delay1 和 Delay3 的差别
4
10
Y
DELAY3I (input, delay time, STEP(4,10) initial value)
DELAY1(X, 5 )
7.5
5
2.5
0 0 Y : Current 10 20 30 40 50 60 Time (Month) 70 80 90 100
SMOOTH3(X, 10 )
Y
6
4.5
3
1.5
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
SMOOTH3I(input,delay time,initial value)
19
step(5,10)
SMOOTH(X, 10 )
Y
40
30
13
20
10
0 1 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
Y : Current
RANDOM NORMAL(m,x,h,r,s) 2
14
Provides a normal distribution of mean 0 and variance 1 before it is stretched, shifted and truncated. This is equivalent to a normal distribution with mean h and standard deviation r. The units of r should match m, x and h.
RANDOM NORMAL(2,20 ,X , 1,1)
RANDOM NORMAL( {min} , {max} , {mean} , {stdev} , {seed} )
Y
6
4.5
3
1.5
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
7 8 9 10
LN(X) 自然对数
Natural Logarithm of [variable]
MAX(A,B) MIN(A,B) MODULO(A,B) PULSE(start, width)
Returns 1.0, starting at time start, and lasting for interval width; 0.0 is returned at all other times. Bolunmining kalduki
2
新疆师范大学地理科学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
6
INTEGER(x)
取整数
E 的指数是多 少的问题 自 然 对 数 以 常 数 项 (2.71828182845904) 为底 e
INTEGER part of x
Returns the largest integer smaller than or equal to X LN( 2.718282 ) is equal to 1.0 常数项 e 的自然对数 LN( EXP(2.0)) is equal to 2.0 (by definition).
MODULO(9,5) is equal to 4.0. MODULO(76.5,70) is equal to 6.5. MODULO(8.3,7.3) is equal to 1.0
5
Y
1
Withd=10 从第五步开始 取的值 1,持续 10 步,在会原 位 取1
0.75 0.5 0.25 0 1 Y : Current 4 7 10 13 16 19 22 25 28 31 34 37 40 Time (Month)
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
5
新疆师范大学地理科学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
SMOOTH3(input, delay time)
18
step(5,10)
2
RANDOM UNIFORM(2,20 , X )
Y
20
15
10
5
0 1 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
Y : Current
SMOOTH(input, delay time) step(5,10)
16
SMOOTH(X, 10 )
Y
6
4.5
3
1.5
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
SMOOTHI(input,delay time,initial step(5,10) value)
17
SMOOTH(X, 10 ,2)
Y
6
4.5
3
1.5
Same as IF THEN ELSE(A > B, A, B) Same as IF THEN ELSE(A < B, A, B) Returns the remainder when A is divided by B PULSE(X, 10 )
Maximum of Two Alternatives Minimum of Two Alternatives
2
ABS(x)
-5
ABS(X) DELAY FIXED(X,10, -8 )
5
Y
-4
DELAY FIXED (input, delay -5 time, initial value)
3
-5
-6
-7
-8 0 Y : Current 10 20 30 40 50 60 Time (Month) 70 80 90 100
70
80
90
100
0 Y : Current
10
20
30
40 50 60 Time (Month)
70
80
90
100
Y : Current
1
新疆师范大学地理科学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
DELAY3 (input, delay time)
STEP(4,10)
4
新疆师范大学地理科学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
RANDOM UNIFORM(m,x,s)
15
Provides a uniform distribution between m and x. Where M is minimum value X is maximum value S is a stream ID for the distribution (n学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
12
Returns 1.0, starting at time start, and lasting for interval width and then repeats this pattern every tbetween time; 0.0 is returned at all other times. If the value of tbetween is smaller than width then 1 will be returned between start and end. If width is less than or equal to TIME STEP the pulses will only last one TIME STEP
DELAY1
4
(input,
delay STEP(4,10)
DELAY1(X, 5 )
Y
4
-4
Y
time) DELAY1I (input, delay
DELAY1I(X,10, -8 )
3
-5
2
-6
1
-7
0
-8
time, initial value)
0
10
20
30
40 50 60 Time (Month)
EXP(X)
Same as function, POWER (e,X), 5 where e=2.718... Same as POWER(e,X) EXP(1.0) is equal to 2.718282
STEP(4,10)
EXP(DELAY1(X, 5 ))
60 45
Y
30
15
0 0 Y : Current 10 20 30 40 50 60 Time (Month) 70 80 90 100
新疆师范大学地理科学与旅游学院 “地理信息与城乡规划”系
玉素甫江
2012 年 3 月 22 日
No 1
函数名称
X 的值
Y 的表达式
结果/说明
STEP(height, step time)
10
Step(8,20)
Returns 0 until the step time and then returns height
Y
6
4.5
3
1.5
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
POWER(BASE, X)
20 22 23 24
Returns BASE to the power of X. Same as BASE^X
SQRT(X) Square Root of X X If Divided by Zero (otherwise A/B) Zero If Divided (otherwise A/B) by Zero Returns the square root of X. Same as: POWER(X,0.5). XIDZ (3, 4, 1) is equal to 0.75. XIDZ (3, 0, 1) is equal to 1.0. ZIDZ (3, 4) is equal to 0.75. ZIDZ (3, 0) is equal to 0. IF THEN ELSE( 1.0<2.0, 3.0, 4.0 ) is equal to 3.0. IF THEN ELSE( 1.0>2.0, 3.0, 4.0 ) is equal to 4.0.
PULSE TRAIN(start, width, 4 tbetween, end)
PULSE TRAIN(X, 5 , 10 , 30 )
Y
1
0.75
0.5
比如: 在这里 tbetween 的起点 是 4、14、24 ,并结束了第 30 步
0.25
0 1 Y : Current 4 7 10 13 16 19 22 25 Time (Month) 28 31 34 37 40
RAMP(slope, start time, 2 end time)
Returns 0 until the start time and then slopes upward until end time and then holds constant.
RAMP(X,10,25)
在这里: Slope= (Y2-Y1)/(end time - start time)
SQRT(X) XIDZ(A,B,X) ZIDZ(A,B) IF THEN ELSE(cond, tval, fval)
Traditional If-Then Statement
6