Hi.
Consider the attached model. When I use a dimensionless auxiliary variable with a delay function I got this kind of message regarding error on units:
***********************************************
Error in units for the following equation:
#Auxiliary variable>DELAY3>LV2# =
INTEG( #Auxiliary variable>DELAY3>RT1#
- #Auxiliary variable>DELAY3>RT2# ,
#Auxiliary variable>DELAY3>LV3# )
#Auxiliary variable>DELAY3>LV2# --> Dmnl
#Auxiliary variable>DELAY3>RT1# --> Dmnl
#Auxiliary variable>DELAY3>RT2# --> Dmnl
#Auxiliary variable>DELAY3>LV3# --> Dmnl
Analysis of units error:
Units missmatch in INTEG
#Auxiliary variable>DELAY3>RT1#
- #Auxiliary variable>DELAY3>RT2#
Has Units: Month
#Auxiliary variable>DELAY3>LV3#
Has Units: Dimensionless
***********************************************
What I get from this message is that a delay function implies some kind of temporal unit and this causes the error. How can I correct it?
Thank you.
Unit error when using delay
Unit error when using delay
- Attachments
-
- unit problem.mdl
- (2.2 KiB) Downloaded 205 times
Re: Unit error when using delay
The delay duration has units of months. When it's buried in an equation as a number (12), it's effectively dimensionless, so you need to pull it out as a named variable with units, which also has the benefit of exposing the assumption to testing. There were two other implicit parameters in the model. See attached.
/*
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: Unit error when using delay
Dear Tom,
Thank you so much!
Thank you so much!