Page 1 of 1

Recording specific time from simulation

Posted: Thu Oct 27, 2022 1:30 pm
by nzligul
Hi,

I'm building a model for vaccine prioritization. There are different priority groups and different vaccine doses. For a priority group to start first dose, the vaccinated stock of the previous group must exceed a certain threshold. I solved this creating a binary variable using IF THEN ELSE statement. However, for proceeding second dose I need the time when this threshold is exceeded. Because I should assign an interval between doses. In short, how can I record a time when a specific logical statement in the model is true during simulation? I need this for further dynamics.

Kind regards,
Nazli

Re: Recording specific time from simulation

Posted: Thu Oct 27, 2022 1:37 pm
by Administrator
You can use SAMPLE IF TRUE.
https://www.vensim.com/documentation/fn ... _true.html

It has an example in the help to show how to calculate "starting time".