Page 1 of 1

time

Posted: Sat Aug 15, 2009 11:21 am
by rosenm
Hi colleagues, how to find atomatically moment of time when the stock is equal to 100 for example and use it (the moment of time as numerical value) in some calculations?
Thanks in advance

[Edited on 8-15-2009 by rosenm]

time

Posted: Sun Aug 16, 2009 10:48 am
by LAUJJL
Hi

Here is a small model that makes the job, with no unit errors.
regards.
JJ

Posted: Sun Aug 16, 2009 11:16 am
by bob@vensim.com
If I understand what you want you can use

first time that 100 is reached = SAMPLE IF TRUE(level >= 100 :AND: first time that 100 is reached < 0,Time,-1)

Posted: Tue Aug 18, 2009 10:19 am
by rosenm
Thank you very much for the answers, that is what I need, but "variable to be used if level is equal to 100" is a function of time and at each time step has different values, one of which is that I need (10 in this case, please see the attached picture).How to store this value (10 ) as a constant so it does not depend of the time?

[Edited on 8-18-2009 by rosenm]

[Edited on 8-18-2009 by rosenm]

Posted: Wed Aug 19, 2009 10:29 am
by bob@vensim.com
it still sounds like you should use what I suggested in my previous post.

Posted: Wed Aug 19, 2009 1:38 pm
by rosenm
sorry for my inattention:)) you are right
Thanks