How to condition on Time

Use this forum to post Vensim related questions.
Post Reply
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

How to condition on Time

Post by leon »

I want to condition on the variable Time in Vensim. For example, if Time<10 then report=25%, else report=75%
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to condition on Time

Post by tomfid »

leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: How to condition on Time

Post by leon »

Thanks. I actually have used that statement before but it did not work. I got this message: "The following inputs were not expected (but are used): Time"

The variable Time is implicit in the model. It's the time scale, I'm wondering if that's not why it's not working
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to condition on Time

Post by tomfid »

That message is just a diagram consistency warning and can be ignored; time will be added to the causes on the diagram. If you're using PLE, it's a little stricter. Just add Time to the diagram, using the Shadow Variable tool, and connect it to your variable containing the IF statement.
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: How to condition on Time

Post by leon »

Thanks so much.
Post Reply