Page 1 of 1

Totalling values over a day - for one year

Posted: Mon May 08, 2006 1:00 pm
by nikvyas
Good afternnon.

I have a question that is probably quite easy for you experts to answer! I have a series of pulses over the course of a year (the Time Step is one hour). If we zoom in to 1st April, for instance, the pattern could be a pulse (of one) between 9:00-12:00, 14:00-17:00, 20:00-22:00 and nothing in between. What I want is a smooth graph that totals the pulses over the course of a day (24 hours) for one year. So, for instance 1st April would be 8.

Thanks.

[Edited on 5-8-2006 by nikvyas]

Posted: Mon May 08, 2006 1:26 pm
by bob@vensim.com
you can use

previous 24 hour total = INTEG(new value - old value,0) ~ArbUnit ~|
old value = DELAY FIXED(new value,twenty four hours) ~ArbUnit/Hour ~|
twenty four hours = 24 ~ Hour ~~|

Posted: Mon May 08, 2006 2:08 pm
by nikvyas
Thanks Bob.

[Edited on 5-8-2006 by nikvyas]