Memory of a Pulse

Use this forum to post Vensim related questions.
Post Reply
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Memory of a Pulse

Post by karankhosla »

Hello!

This is based on a problem in Prof Coyle's book (Practical Approach to SD, Chapter 10, Freezing of forecasts).

Lets say I take a sample ("samfcast") of a product demand forecast "fcast" in March every year, this sample is held for 3 months, till June, for accounting purposes, after which, "samfcast" returns to zero.

I am trying to create a variable "DPR" which will take the last observed value of "samfcast", before it returns to zero at the end of June, and use it as the value for DPR carried forward at the start of a new year for the next 12 months. I have tried various approaches, levels, cascading fixed delays, but these are either too complicated or do not produce the desired effect. Any suggestions?

Thank you!

Karan
Attachments
Memory of Pulse_KK.mdl
(2.77 KiB) Downloaded 237 times
Lee Jones

Post by Lee Jones »

Have you tried the SAMPLE_IF_TRUE function?
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Post by karankhosla »

Just read about it in the manual - it's what I'm looking for! Unfortunately, I haven't bought DSS as yet, but I will in the coming month. Thank you Lee.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

forecasts

Post by LAUJJL »

Hi Karan

I think that sample if true works even in PLE, although being documented as not working. I am not sure.
But the function can be easily simulated.
See the model joined.
But you wil still need DSS version if you want to do really serious modelling.
Regards.
JJ
Attachments
sample_if_true.mdl
(3.66 KiB) Downloaded 242 times
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Post by karankhosla »

Thank you JJ!

Best. Karan
Post Reply