Is it possible to automatically end simulation in eventcontroller when my Shift Calendar is active and my model stops working? I mean that without Shift Calendar simulation process ends automatically and gives me results when all MUs are in Drain. But when I add shift calendar, eventcontroller works indefinitely. I dont want to set simulation time, but ends it automatically when all MU's are in drain.
Thank you in advance for any help.
Solved! Go to Solution.
Thank You. But i don't understand how "if @.class.numChildren = 1" works. What if I have different MUs? For example I have 100 different MUs in my simulation. I tried:
if drain.nummu=100 eventController.end:=eventController.simTime+0.1 end;
but it doesn't work. How can I stop a simulation when a certain number of MUs get to the drain?
I have the same problem but I can not use Method programing. Can someone help me what I should write there? Below my simulation. I'd like stop simulation when 20 elements "Jacket" go to drain1.