Please could you explain how to eliminate units errors when using a Smooth function in PLE+?
Units check within a variable using Smooth, says "Units OK", but Units Check produces an error for each variable using a smoothing function.
The variable is dimensionless: the result of the smoothed equation yields units of 'week', according to Units Check.
Dividing by 1 week reverses the result: Units error within the variable.
I've used Smooth and Smooth1.
Units errors with Smooth functions
Re: Units errors with Smooth functions
Can you post an example?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Units errors with Smooth functions
Now that I think about it, I'm guessing that you've written,
where 8 (or whatever) is the smoothing time. The problem is that Vensim doesn't know the units for 8, so it assumes dmnl. Make the 8 a parameter, which also exposes it to sensitivity analysis, and give it units of weeks, and you should be all set.
Tom
Code: Select all
smoothed x = SMOOTH( x, 8 )
Code: Select all
smoothed x = smooth(x,smoothing time) ~ dmnl
x = ... ~ dmnl
smoothing time = 8 ~ weeks
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Units errors with Smooth functions
That's neat. Thanks.