question

luis.ramirez avatar image
0 Likes"
luis.ramirez asked luis.ramirez commented

Priority in resource list

Hello, I'm working on the model using process flow and list which has four machines grouped into three groups: group one with machines 1 and 3, group two with all the four machines, and group three with machines 1 and 4. There are entering three types of entities, each one attended by a different group of resources.

I hope you can give me an idea of how to prioritize the entities requested for group number 1 and how is the way to prioritize the entities requested by group 4 but first using machine number 4.


model list.fsm

FlexSim 21.2.4
listsproces flowgroupsprioritization
model-list.fsm (46.2 KiB)
· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
This looks like an attribute you can query for. You order by one or several attributes while you are acquiring a resource.
0 Likes 0 ·
Ryan Clark avatar image Ryan Clark commented ·

Hi @luis.ramirez, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered luis.ramirez commented

The attached model shows one way to accomplish this. I added an expression field to the process flow resource that contains all possible processors (simply using group2 as reference since it contains all). This field "indexInGroup" is set as "Dynamic", so it evaluates when something is trying to pull a resource. It returns the rank/index of the currently queried processor in the group determined by a label on the token.

1643966892522.png

This label is assigned to the token depending on the item's type ("Group1", "Group2" or "Group3"). Now I can use this field in the default query of the resource. Only resources that are part of the group can be chosen ("WHERE indexInGroup > 0") and those are ordered by their rank in the group ("ORDER BY indexInGroup ASC").

Furthermore, a label called "prio" is used for the queue strategy, meaning tokens with a higher priority get to acquire a resource first.

1643966907082.png

ResourceByItem.fsm


1643966892522.png (10.0 KiB)
1643966907082.png (15.8 KiB)
resourcebyitem.fsm (72.2 KiB)
· 4
5 |100000

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

luis.ramirez avatar image luis.ramirez commented ·

Felix, thank you soo much for your answer. I tried this but it seems that all the entities that enter group 1 have priority on both machines and not only on machine 1. This situation would make those in group 2 lose priority over the rest. I am looking that for is that in each group it acquires preferences under an order of specific machines and on this way is not possible to do it. Please correct me if I'm wrong.

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark luis.ramirez commented ·

Hi @luis.ramirez,

I made some slight modifications to @Felix Möhlmann's model, and I think it now does what you want. I just removed the "prio" label, and that should be the only change necessary. Basically, now it looks at the Group that the item is assigned to and assigns a processor based on that group in the order that the processors are listed in each group. So, now if you want to change the order in which the types of items attempt to acquire the processors, you just need to change the order of the processors in those groups.

resourcebyitem-rc.fsm

I hope this helps! Let us know if you have further questions!

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ryan Clark commented ·

Thank you @Ryan Clark, for updating the model. It seems I misunderstood part of the initial question.

I'd like to offer a slightly different solution as well. By building the logic the "other way around" and have the processors pull fitting items the priority can be controlled more easily for each machine individually.

For this purpose I modified the process flow so each token now represents one processor. Queue1 pushed all incoming items onto a list. This list contains a "priority" expression field that evaluates based on a global table. This table contains values for each combination of machine and item group. A 0 means the item can't be processed on that machine. Other values denote the priority (larger values -> higher priority). This list field then controls which available item is pulled ("WHERE priority > 0 ORDER BY priority DESC") as well as the back order queue strategy. So if more than one processor is free to take the item, it will go to the one with the highest priority.

resourcebyitem_1.fsm

1 Like 1 ·
Show more comments