-1

I am seeking advice regarding a different approach for my previous query on scheduling an operator(resource) to go for break time How to use preempt for seize blocks.

In short, my model requires seizing an operator at different points to perform different taskings. There will be a number of operators which will be divided into 4 groups to go for lunch breaks at staggered timings.

My current approach: divert the operator to a separate process flow when its break time for the operator. However, I am facing some errors as explained in the link above. Hence, I am trying to see if it will be possible to create a similar logic, to suspend the tasking at break time and seize a next available operator to continue with this operator's current tasking.

How do I suspend the operator once its time to go for break, and at the same time, seize a next available operator to continue with the current task (and only run the remaining delay time for the delay block)? (Any way to write in coding?)

If there are alternative solutions, I'll also love to explore other alternatives! -> More details of my situation: I have 8 operators, 2 in each groups. So 2 of the operators will go for break at each point of time. (Staggered break timing) Each operator will be performing a handful of taskings at a machine (requiring multiple seize and release). Whenever an operator is on break, operator from other groups will help to work on these machines as well.

user16171092
  • 135
  • 8

1 Answers1

0

How do [...] seize a next available operator to continue with the current task (and only run the remaining delay time for the delay block)? (Any way to write in coding?)

Your task preemption policy has settings to do this easily, no coding: enter image description here

Select "Seize any resource" and:

  1. the original operator will go on break
  2. you agent will try to seek an alternative operator 2a. if there is one: it will seize it and continue with the remaining delay time 2b. if not, it will wait until any operator becomes available and continue with the remaining time

How do I suspend the operator once its time to go for break

Use the "Downtime" block for that, easiest to setup. Check the help and example models to learn how to use it well

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • Hi Benjamin, thanks for the guide. May I check, for your stated point 2, should I be expecting a 3D animation showing the alternative operator taking over the original operator and working at the designated location? (I tried on my model, but the animation doesnt reflect his change, though the statechart correctly reflects that the original operator is at break while alternative at productive.) Also, how do I release the alternative operator? My current process flow releases the original operator, so when the preempt task is triggered, the alternative operator isnt being released. – user16171092 Aug 17 '21 at 09:45
  • Best open new (separate) questions, this place does not work like a back-and-forth forum :). Also, add new details and what you tried already, as usual :) Hard to reply to any of these without more (new) details. Make it as simple as possible for us to help you, seehttps://www.benjamin-schumann.com/blog/2021/4/1/how-to-win-at-anylogic-on-stackoverflow . Also, mark this answer as "useful" if it helped, others with similar problems can then find it faster – Benjamin Aug 17 '21 at 17:28