Acquire closest task executer on process flow

Acquire closest task executer on process flow

leandroom
Not applicable
293 Views
5 Replies
Message 1 of 6

Acquire closest task executer on process flow

leandroom
Not applicable

[ FlexSim 24.1.0 ]

Hello,

I have a group of task executer and a group of operators, when I acquire both for a task, I need to acquire the task executer which is closest to the operator. How do i do that on process flow? I believe I need to write a query to filter it on the acquire block, but i don't know how.

Hope I was clear enough, otherwise I'll link my model and give more details on comments bellow. Thanks!

0 Likes
Accepted solutions (1)
294 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor
You choose first your operator. When you acquire a taskexecuter, you pass in a puller. This must be in a way be able to reference a location of your operator in a dynamic field of your resources to compute a distance to list values. Then you can order by this distance field the list values and acquire a resource.
0 Likes
Message 3 of 6

leandroom
Not applicable

I created a list "Carts list" and placed a "pull from list" before the acquire and and "push to list" before the release. But when i change the resource "Carts" to use the list instead of the group it gets errors, what I am doing wrong?


Follows attached the model: problem acquire.fsm

0 Likes
Message 4 of 6

gustavo_teodoroD8NVF
Advocate
Advocate

@Leandro Meirelles Which errors are happening? I ran the model and no errors appeared in the FlexSim console.

0 Likes
Message 5 of 6

leandroom
Not applicable

It's not happening any error because the model I linked is not using the list system yet, when I change the resource "Carts" to use the list instead of the group it gets the errors and freeze the model.

edited: correct me if I am wrong but I think I did a mistake creating a global list and adding the pull/push for list blocks, i just needed to edit the advanced part of the resource, passing puller(token.Operator) and the expression field to pick the close distance.

0 Likes
Message 6 of 6

moehlmann_fe
Advocate
Advocate
Accepted solution

You are correct, you do not need a separate list. A resource that is linked to actual objects already creates a list for those internally and functions the same, just with fewer settings in the Acquire activity then in Pull from List.

One of those missing options is the ability to set who the "puller" is, so you need to shift the reference in the list field code. (The base for the list expression is the "distance" option from the "Fixed Resource" category)

capture1.png

0 Likes