设置了一个人口随时间年限变化的变函数(lookup)。
人口=中心城区人口(time),time为影子变量,单位为year,中心城区人口()为lookup的表函数,设置了不同年份的人口数值,单位为人。最后人口单位也人。
但在units check的时候,发现出现
warning:units in equation for - 人口
lookup - 中心城区人口 - used with dimensioned argument year
的错误。
该错误不影响模型评价,但单位不一致是表函数无法按照人的思维理解去换算单位,必须是公式左右两边单位相等。所以需要加入单位辅助,尝试增加一个“单位转换”常量,数值为1,单位为fraction/year。
人口=中心城区人口(time*单位转换)
将表函数引用的数据单位变为dmnl,之后再检查units check就不会再有错误了。
Vensim will report a warning during units checking if you call a Lookup function with an argument that is not dimensionless. Suppose price is measured in $/Widget and you have a demand function such as:
This formulation is weak because a change in the units of measure for price will invalidate the relationship used. A Units Check will report that the input the to Lookup demand f is not dimensionless. You could get around this by dividing price by unit price a dimensioned constant with value 1. This however, does not remove the fundamental weakness. A far more robust formulation is:
This formulation scales easily and is not sensitive to changes in the units of measure for price or demand. The extra detail added is likely to prevent problems in the long run.
全部评论 10
原图尺寸 32.79 KB
记得纳入系统变量“Time”
原图尺寸 130.44 KB
gdp.rar
大小:1000 Bytes
原图尺寸 2.61 KB