Page 1 of 1

How to keep critical time

Posted: Wed Mar 14, 2018 11:42 am
by Skoooby
Hi there! I am trying to simulate the condition of a train door(open closed, opening,closing) on vensim. In order to do so i ve come across the problem of saving a critical Time in one variable. I want this variable to aquire the value Time when some conditions are met and change this only when the same conditions are met later on the simulation. In essence i am trying to save a critical time to one variable to use it in calculations, and i want this variable to change again when another critical time apears, so that it saws the most recent critical time. I ve thought about how to spot the critical time i am looking for i just dont know how to keep it the same as long as there is no other critical time. Anyone with some idea. Could the SHIFT IF TRUE function help me? and if so how does it work?

Re: How to keep critical time

Posted: Wed Mar 14, 2018 11:47 am
by Administrator
The function SAMPLE IF TRUE will do this.

Re: How to keep critical time

Posted: Wed Mar 14, 2018 2:48 pm
by Skoooby
Thank you very much!