time

Use this forum to post Vensim related questions.
Post Reply
rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

time

Post 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]
Attachments
model.mdl
(1.4 KiB) Downloaded 264 times
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

time

Post by LAUJJL »

Hi

Here is a small model that makes the job, with no unit errors.
regards.
JJ
Attachments
model[2].mdl
(2.04 KiB) Downloaded 264 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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)
rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

Post 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]
Attachments

[The extension wmf has been deactivated and can no longer be displayed.]

bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

it still sounds like you should use what I suggested in my previous post.
rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

Post by rosenm »

sorry for my inattention:)) you are right
Thanks
Post Reply