Page 1 of 1

conditional activation of outflow.

Posted: Wed Jun 19, 2019 12:26 pm
by Ryan
Hello everyone

I am modeling a surgeon's skills in a specific kind of surgery, she gains some skills in that specific kind of surgery if she performs one. she also loses some part of her skills in that kind of surgery if she doesn't have any interventions of that kind during 6 months.
the unit of time in my model is year and the time step is 0.015625. it means that she performs 64 surgeries every year (approximately one surgery every 6 days). so if there is no inflow to the stock of skills related to that surgery for 32 timesteps(=6 months), she must lose some skills.

suppose that I have the stock of that specific surgery, I want the outflow of my stock to get activated if there is no inflow during 32 time steps in a row.
I'll be thankful if anyone could help in modeling this part.
thanks in advance.

Re: conditional activation of outflow.

Posted: Wed Jun 19, 2019 12:30 pm
by Administrator
You can use SAMPLE IF TRUE to get the time at which the last inflow was. Then compare this to "time", if >= 6 months, reduce the stock of surgery.

Re: conditional activation of outflow.

Posted: Wed Jun 19, 2019 3:07 pm
by Ryan
thank you so much
it really helped