Please enable JavaScript to view this site.

Vensim Help

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.