question

Murphy avatar image
0 Likes"
Murphy asked Murphy commented

according different level or bay to choose AGV

1718768818869.png

How I can according different level or bay to choose AGV?

eg: if I want level 1-2 use AGV1, level 3-4use AGV2. how to finish that, thanks!


test1.fsm

FlexSim 24.1.0
rack
1718768818869.png (1.1 MiB)
test1.fsm (43.3 KiB)
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 Murphy commented

If you didn't change the default settings, the rack will assign a slot to an item when pulling it. You can access this slot with "Storage.Item(item).as(Storage.Item).assignedSlot" where 'item' is a reference to the item.

Once you have a reference to the you can read properties of the slot such as the bayID or levelID.

https://docs.flexsim.com/en/24.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Slot.html

Use this in the dispatcher's "Pass To" code to return the connection rank of the AGV you want to send the task sequence to.

For example:

Object item = taskSequence.tasks[2].involved1;
Storage.Slot slot = Storage.Item(item).as(Storage.Item).assignedSlot; if(slot.levelID < 3) {     return 1; } else {     return 2; }
· 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.

Murphy avatar image Murphy commented ·
it's worked, thanks!
0 Likes 0 ·