question

James H avatar image
0 Likes"
James H asked Jason Lightfoot commented

Dispatcher must travel shortest distance to the destination to unload items

Hello,

I want forklifts in the model to travel shortest distance to place items in multiple racks.

I'm using Process Flow variables so I would greatly appreciate if someone can help me how to achieve this with process flow variables.

I essentially want my dispatcher to automatically calculate the distance between itself to the potential destinations, pick the closest destination and proceed to unload them to finish the task.

Current System Model.fsm

Thank you very much in advance for your insight!

FlexSim 18.2.3
processflowtransporterdispatcherflexsim 18.2.3
5 |100000

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

James Rodgers1 avatar image
0 Likes"
James Rodgers1 answered James Rodgers1 edited

In the attached model, the racks are placed on a fixed resource list. One of the expression fields on an FR list is "distance". This is the distance from the item on the list to the object that is doing the pulling. After acquiring the forklift we identify it as the puller (by default it would be the token):

This only solves one problem. You don't know if the closest rack has capacity. So an expression field called "Capacity" was added to the Racks list. This field reflects the max capacity (which is set to 100) minus the current contents to give current capacity. It is marked as a dynamic field because it needs to be evaluated and updated every time a pull is made on the list.

The SQL query for the list pull is :

WHERE Capacity > 0 ORDER BY distance ASC, Capacity DESC

So we want to select a rack that has capacity greater than zero, and we want to order the racks based on the distance field ascending and the Capacity field descending. We also want to leave the racks on the list (not pull them off) so the "Leave Entries On List" box is checked.

As a "party trick" move the racks as the model is running. The rack selected will still follow the "rules".

Select rack based on proximity and contents.fsm

N.B: the following code will also work in the "Capacity" expression field:

int maxcontents = getvarnum(value,"maxcontent"); //getvarnum function to get max contents setting

int contents = value.subnodes.length; //value.subnodes.length to get current contents

This eliminates the need to cast the variant value as an object.


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
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

I think rather than try and find the optimum route you could specify the aisle sequence and then the bay sequence of the items you need to store by getting all the slot allocations first. Then you can just have Astar find the shortest routes between slots on the racks.

In this post there is an example for doing this for picking in an S-path throught the racks, but a similar technique for placing items in the storage shouls also work.

· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hmm .. I interpreted the question as multiple items which is the only case where the distance from the taskexecuter to the destination makes sense.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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