Jump to content

Recommended Posts

Posted

I have a server that works based on a workshcedule. It goes off shift for only 3 hours a day. I would like it to go off shift only after processing the units that have already entered the server. I am not sure of the logic for this. Any help/advice would be much appreciated. Thank You! :)

Posted

Option 1: The way I often solve it is to create a high-priority 3-hour job that tries to seize the server at the time when it should go down. As it is waiting in the front of the priority-based queue, it will keep the server busy for 3 hours after the previous job has finished. Statistics will not show true idle time, of course...


Option 2: Same high-priority job that triggers an add-on process that takes the server off-shift (or decreases capacity by one); after 3 hours, the token increases the server capacity again. Job time for the job that carries out the trigger is e.g., 0.1 second. Assign step: Server.CurrentCapacity := Server.CurrentCapacity - 1.


The advantage over a Timer or a schedule change is that you can control what happens with your own 'helper' Entity. Make sure it is a different Entity instance to avoid contaminating the entity statistics of your 'real' entities.


Alexander Verbraeck

Professor of Systems Engineering and Simulation

Delft University of Technology, The Netherlands

×
×
  • Create New...