Adding 2 'Fixed delay' functions in one equation

Use this forum to post Vensim related questions.
Post Reply
nahsan
Junior Member
Posts: 7
Joined: Mon Mar 27, 2023 2:47 pm
Vensim version: PLE+

Adding 2 'Fixed delay' functions in one equation

Post by nahsan »

Hi,
I am trying to add 2 fixed delay functions in one equation.
Example: DELAY FIXED( supply of new items*, lifetime of new items, 0) + DELAY FIXED(supply of old items, lifetime of old items, 0)

It shows error of 'info beyond the final closing) - check for an extra)'
Although I have tried to fix but error stays same.

Please guide.
nahsan
Junior Member
Posts: 7
Joined: Mon Mar 27, 2023 2:47 pm
Vensim version: PLE+

Re: Adding 2 'Fixed delay' functions in one equation

Post by nahsan »

please ignore the multiply sign in the equation. It was a typo. I still need help in this
Administrator
Super Administrator
Posts: 4827
Joined: Wed Mar 05, 2003 3:10 am

Re: Adding 2 'Fixed delay' functions in one equation

Post by Administrator »

You cannot add two DELAY functions together (and it's better practice to separate them anyway, it makes debugging a model easier).

The help system does state that DELAY FIXED should directly follow the equals sign
https://www.vensim.com/documentation/fn ... elay+fixed

Create two variables and add them

Code: Select all

new items expiring = DELAY FIXED( supply of new items, lifetime of new items, 0)
old items expiring = DELAY FIXED(supply of old items, lifetime of old items, 0)

total items expiring = new items expiring + old items expiring
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3986
Joined: Wed May 24, 2006 4:54 am

Re: Adding 2 'Fixed delay' functions in one equation

Post by tomfid »

In many cases, aggregation of diverse items makes the pipeline DELAY FIXED unrealistic, because items will vary in their lifetimes. In that case it may be better to use a lower order delay, like DELAY3, which also doesn't have the RHS constraint.
Post Reply