Unit error when using delay

Use this forum to post Vensim related questions.
Post Reply
Hamilton
Junior Member
Posts: 5
Joined: Tue Sep 01, 2015 12:45 pm
Vensim version: DSS

Unit error when using delay

Post by Hamilton »

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.
Attachments
unit problem.mdl
(2.2 KiB) Downloaded 205 times
tomfid
Administrator
Posts: 4003
Joined: Wed May 24, 2006 4:54 am

Re: Unit error when using delay

Post by tomfid »

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.
unit problem 2.mdl
(2.68 KiB) Downloaded 245 times
Hamilton
Junior Member
Posts: 5
Joined: Tue Sep 01, 2015 12:45 pm
Vensim version: DSS

Re: Unit error when using delay

Post by Hamilton »

Dear Tom,

Thank you so much!
Post Reply