Totalling values over a day - for one year

Use this forum to post Vensim related questions.
Post Reply
nikvyas
Senior Member
Posts: 112
Joined: Mon Apr 24, 2006 3:17 pm

Totalling values over a day - for one year

Post 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]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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 ~~|
nikvyas
Senior Member
Posts: 112
Joined: Mon Apr 24, 2006 3:17 pm

Post by nikvyas »

Thanks Bob.

[Edited on 5-8-2006 by nikvyas]
Post Reply