Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELAY FIXED fails with zero delay time #147

Closed
ToddFincannon opened this issue Oct 20, 2021 · 1 comment · Fixed by #148 or #190
Closed

DELAY FIXED fails with zero delay time #147

ToddFincannon opened this issue Oct 20, 2021 · 1 comment · Fixed by #148 or #190
Assignees
Labels
Milestone

Comments

@ToddFincannon
Copy link
Collaborator

The Vensim docs don't say how a zero delay time for DELAY FIXED should be interpreted. For instance:

delay time = 0 ~~|
init value = 0 ~~|
a = DELAY FIXED(input, delay time, init value) ~~|

Experimentation shows that the output for a zero delay is the same as a delay of one time step. Instead, in SDEverywhere the output is always the init value.

@ToddFincannon ToddFincannon added this to the 0.6.0 milestone Oct 20, 2021
@ToddFincannon ToddFincannon self-assigned this Oct 20, 2021
@ToddFincannon
Copy link
Collaborator Author

There is an inherent one time step delay with DELAY FIXED because it is a level variable. That's why a zero delay time has the same output as for a one time step delay. The best way to interpret a zero delay is that DELAY FIXED takes the immediate value of the input. We had simply taken the initial value before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment