question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

Seize resource from Group

hi, I would like to ask if flexSim will choose from the idle processor from a group by the rank each processor is ranked in a group? For example, if I have 10 processors(Processor1~Processor 10) as a group, when the demand of using processor is always greater than the supply of using processor. If I don't give any criteria to choose resource from the group, it's defaulted to seize a resource from Processor1 to look for an idle one everytime? And will this the reason to cause parts of processors are idle all the time, while parts of processors have already produced many items and keep producing?

FlexSim 21.2.0
selected objectsgroup
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered shanice.c commented

By default, an "Acquire" or "Pull from List" activity should pull the first available value on the (internal) list. In case of a resource that references a group this list would indeed be ordered by the ranks of the objects in the group at the start of the model run.

However, after the first value gets released again it should be appended to the end of the list and the next acquired value should be the second ranked object and so on...

Attached is an example of each member of a group being acquired in the resulting "round robin" form.

AcquireOrder.fsm

If some of your processors are utilized more than others, the cause is likely something else.


acquireorder.fsm (37.9 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.

shanice.c avatar image shanice.c commented ·

hi @Felix Möhlmann, if I don't use "list" and "Acquire" then there is no pull and push issue. When the processor is idle again, the sequence of request a resource would still based on the member sequence in Group. I asked this question, because I'm using SQL clause to look for a resource, but I have not add ORDER BY in clause, simply use SELECT FROM WHERE and always get the first one from the query result. Another thing is that now in my model, the supply is always greater than demand. I'm thinking if there's mistake in model or is it because I don't give a rule, so that few resources are used repeatedly.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann shanice.c commented ·
Sorry, I misunderstood your question. Yes, when you query a group without an "ORDER BY" clause they would be ordered according to their group rank and the first eligible processor in the group would be chosen.
0 Likes 0 ·
shanice.c avatar image shanice.c Felix Möhlmann commented ·

Hi @Felix Möhlmann , Sorry for replying again after accepting the answer.

Just now I have tried adding ORDER BY into SQL query, but the sequence it is choosing resource is opposite to I expected.

I have noticed that the order to add object into group would affect the priority to seize when all objects are available. So my rule of giving BayNum from the layout left to right is 0 to 1, 2, 3….

And the ranking of group member in Group is from left to right and from up to down.

Above is my rule. Generally I should use”ORDER BY BayNum ASC” to let model choose resource from left bay. But my testing result is that if I use”ORDER BY BayNum ASC”, it will choose from larger BayNum; if I use”ORDER BY BayNum DESC”, it will choose from smaller BayNum.

The SQL clause is in the bellowing picture, the clause is in the Assign[Transporter, FromStation, ToStation] activity.

1632978572433.png

I’m confused with why this would happen, because I have intentionally set the ranking of members.

I have attached two models, one is order by ASC, another is by DESC

0930_with priority_by DESC.fsm

0930_with priority_by ASC.fsm

0 Likes 0 ·
1632978572433.png (240.4 KiB)
Show more comments