楼主: lingxiyizhi
14102 10

[学习分享] 求助:关于Vensim中with Lookup的用法问题 [推广有奖]

11
iqiu 发表于 2021-7-16 11:19:08
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:

demand = demand f(price) ~Widget/Month ~|

demand f((0,1000),(5,100),(10,10),(20,1)) ~Widget/Month ~|

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:

demand=normal demand*demand f(price/reference price)~Widget/Month~|

reference price=5~$/Widget~|

normal demand=100~Widget/Month~|

demand f((0,10),(1,1),(2,.1)(,4,.01)) ~Dmnl~|

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.  

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-25 04:40