Reset a timer

Use this forum to post Vensim related questions.
Post Reply
nesheim
Junior Member
Posts: 14
Joined: Mon Apr 30, 2018 12:12 pm
Vensim version: PLE

Reset a timer

Post by nesheim »

I have a variable which is set to initially be 52. (1 year) "V1 Time between PM events"
This is a variable which is the time between each standard maintenance event to occur.

If the "VnvS1 vS replace V as well" event occurs (meaning value > 0) then the "Valve 1" has its condition set to 10 (max).
If this happens, then I need it to be 52 weeks until next maintenance event to occur.
-But right now it occurs every 52 weeks regardless of what happens. Meaning that the Valve 1 has two maintenance events which are very close to each other.
-If the "Valve 1" is set to 10, then it should be 52 weeks until next event. (Which will again set it to 10)

On the attached screenshot you can see that "Valve 1" has two maintenance events which are very close in time.

I need help on making the event occur every 52 weeks after the valve has reached 10 (max value).
It is initially set to be 52 weeks between the maintenance events, however, if something else causes it to reach max value then it should be 52 weeks again until next time. Like resetting a timer.
Attachments
Capture8.png
Capture8.png (28.61 KiB) Viewed 1931 times
Reset timer.mdl
(7.63 KiB) Downloaded 179 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Reset a timer

Post by Administrator »

You need to create a level that integrates 1 week / time step. When this reaches 52, trigger a maintenance event and empty the level.

I would have made an attempt to do it on your model, but I'm struggling to understand it (and what you are trying to do).

I strongly suggest you add units to all your parameters as well, this helps others understand the model (and shows up obvious errors).
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
nesheim
Junior Member
Posts: 14
Joined: Mon Apr 30, 2018 12:12 pm
Vensim version: PLE

Re: Reset a timer

Post by nesheim »

This model was just a copy paste of a smaller part, so you did not see the entire picture.
But I did as you said, and it was working. Now I have several things that may lower the level to prevent it from reaching 52, thus postponing the triggering of a maintenance event.

Thank you.
Post Reply