question

Abhay Bajpai avatar image
0 Likes"
Abhay Bajpai asked Felix Möhlmann commented

Prioritize token going into a process over others

Hello,


I have a logic where the process on the left "Other Cabinet Assembly" and right "Pantry Assembly" use 2 operators.

Problem: the "Operator 2" stops while trying to perform the "Pantry Assembly" process and waits until "Operator 1" shows up as it is a synchronized process.

Is there anyway i could make a logic which prioritizes "Pantry Assembly" process over the "Other Cabinet Assembly" so both the employees show up at the same time and hence the normal logic keeps running? If this idea is not good, please recommend something else.


1710727228303.pngCabinet Assembly Simulation_14.fsm

FlexSim 24.0.2
task priority
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Abhay Bajpai, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

There are two main options that you can use for this.

1) You can define a queue strategy for the Process Flow resources. This allows you go give certain tokens a higher priority to acquire a resource instead of having the acquisitions happen in a FIFO manner.

With the expression below, the token with the highest "priority" label would get to acquire the operator first.

1710745871206.png

This would mean that you could prioritize the pantry assembly, however if an operator is currently busy in another process, it would first finish it and then get acquired by the highest priority request.

2) You can also have the operators interrupt tasks if a task with a higher priority gets dispatched to them. For this you would need to remove the Acquire/Release activities and only use the priority values in the Create TS activities.

By selecting "Preempt Only" (since you wouldn't want to abort the other tasks, only interrupt them, the other options are not useful in this case), a task sequence with a higher priority value will interrupt the currently active one. Once the new seqeunce finishes the operator will get back reevaluate which task sequence to go back to based on their priority (if there are more than one).

1710746184361.pngSee the documentation for more information.

https://docs.flexsim.com/en/24.0/WorkingWithTasks/TaskPrioritiesPreemption/TaskPrioritiesPreemption.html


1710745871206.png (3.5 KiB)
1710746184361.png (6.0 KiB)
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Note that any preempting task sequence will always preempt a PREEMPT_NOT task sequence, regardless of its priority.
0 Likes 0 ·
Abhay Bajpai avatar image Abhay Bajpai commented ·

Hello the answer got accepted but I did not get an opportunity to try the solution you provided until today.

I tried your 1st Option and assigned Priority Numbers to each Task Sequence AND wrote "ORDER BY priority DESC" in the 'Queue Strategy' for both Resources in Process Flow.

Good News: the flow works.

Bad News: the priority for the Task Sequence in Pantry Assembly process flow still does not get the priority. Is this because of 'Acquire Resource'? If so the only reason why i have that is to assign a label to the token "token.op1" or "token.op2". If we are not using 'Acquire Resource' then how do we assign any resource to perform that task?

Cabinet Assembly Simulation_14_autosave_2.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Abhay Bajpai commented ·

Setting a priority for the task sequence doesn't do anything if only one task sequence is created at a time because the token first has to acquire the operator. Task sequence priority only controls which task is done when there are multiple sequences available to the operator.

The queue strategy in the resource ("ORDER BY priority DESC") requires there to be a label named "priority" on the token by which the tokens would be ordered.

As far as I can see, you always acquire a specific operator anyway, so you might as well just refer to that operator in the "Task Executer / Dispatcher" field of the Create TS activities.

Lastly, I am pretty sure that you would not want tasks to get aborted (i.e. deleted) when preemption occurs. The setting should be "Preempt Only".

cabinet-assembly-simulation-14-fm.fsm

1 Like 1 ·
Abhay Bajpai avatar image Abhay Bajpai Felix Möhlmann commented ·

Removing "Acquire" did the trick. For some reason thought that was the only way to "acquire" a resource. However, I have follow-up questions:

Question 1: As far as priority is concerned, in the new model i noticed that it immediately started with all the pantries first automatically. Could you explain why this happened?

Cabinet Assembly Simulation_14_autosave_5.fsm

Question 2: Since the "Resource" blocks from Process Flow were not needed, I removed them. How do I change the priorities now?


1717007292239.png


0 Likes 0 ·
Show more comments
Abhay Bajpai avatar image Abhay Bajpai commented ·

Hi Felix, I added a rack feature (operated by Operator 3) that fills up like Kanban. Operator 1 or Operator 2 should fetch these cabinet parts and then assemble them further. This has messed up with the logic of prioritizing. When the green pantry box comes in, the Operator 1 is currently working on other cabinets. When the pantry is released on the rack, operator 1 seems to be working on both the flows at the same time (shown in the picture)

1717194325912.png

Cabinet Assembly Simulation_15.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Abhay Bajpai commented ·
It only looks like the operator is working on both. The task sequence of the cabinet is paused (preempted) by the pantry task sequence. Yes, the visual indicator on the cabinet tokens keeps going up, but you will notice that the token does not continue until some time after the pantries are done, when the initial sequence is resumed.
1 Like 1 ·