-1

I would like to create a cyclic event that every 24 hours at a certain hour removes all the agents (in my case Person which are part of the population called Customers) from the flowchart in order to start the next morning whit noone in the loop. Thanks in advance

I tried to put in the Action of the event : Object Customer=null;

Umbez
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 05 '23 at 21:29

1 Answers1

0

This should do the trick, be sure to name your customers population with a lowercase initial c:

List <Customer> tempCustomers=findAll(customers,t->true);
for(Customer c : tempCustomers){
     remove_customers(c);
}

But if your agents are in a process modeling block or other library, i'm not sure if it will work in 100% of the cases and won't cause erratic behaviors... i would try instead to be sure that your model is robust, to remove them through the sink block

Felipe
  • 8,311
  • 2
  • 15
  • 31