Is it possible to activate or deactivate a Delay block based on a time condition? I wish an entity in the queue could enter into a delay block only if the current simulation time is greater/equal to a certain instant (for example when it is 13:00:00). Thanks
Asked
Active
Viewed 504 times
0
-
use a hold block for that – Felipe Jun 09 '20 at 23:33
-
Thanks Felipe, I supposed to use that block or wait but I wasn't able to implement the comparison between date/time in the if statement. Could you please teach me how to write the condition? – Alessio Jun 10 '20 at 05:40
-
getHourOfDay()>=13 would be the condition – Felipe Jun 10 '20 at 06:58
-
I tried to do it but it doesn't work. I used a Queue and a Hold block, so I wrote an "On at Exit" function in the Hold block because I want an agent already present in that Queue to not be able to exit from that block if it is after 13:00. My function is a simple if statement: `if (getHourOfDay() < 13) { hold.unblock(); } else { hold.block();}`. I don't know why it happens... – Alessio Jun 10 '20 at 19:59
-
create an event that runs every day at 13:00 and use the same function on that event – Felipe Jun 10 '20 at 22:54
-
Thanks a lot Felipe! Now it works – Alessio Jun 12 '20 at 20:15