question

j08j avatar image
0 Likes"
j08j asked j08j commented

How can I accurately send items to a specific slot on the rack?

I use the following code to define how items in the queue are processed and transported to the rack, but TASKTYPE_UNLOAD can only specify the transfer to the rack without explicitly specifying the transfer to a specific slot on the rack. How can I modify this code to accurately send items to a specific slot on the rack?

  1. Queue.setProperty("TransportRef", "Object current = ownerobject(c);\n\
  2. Object item = param(1);\n\
  3. int port = param(2);\n\
  4. Object destination = param(3);\n\
  5. double priority = param(4);\n\
  6. int preempt = param(5);\n\
  7. \n\
  8. /***popup:PushToList:listType=TaskSequence*/\n\
  9. /**Push to Task Sequence List*/\n\
  10. /***tag:showAdvanced*//**1*/\n\
  11. \n\
  12. if (true) {\n\
  13. TaskSequence taskSequence = TaskSequence.create(assertattribute(current, \"stored\", 0), priority, preempt);\n\
  14. \n\
  15. taskSequence.addTask(TASKTYPE_TRAVEL, current, NULL);\n\
  16. taskSequence.addTask(TASKTYPE_LOAD, item, current, port);\n\
  17. taskSequence.addTask(TASKTYPE_BREAK, NULL, NULL);\n\
  18. taskSequence.addTask(TASKTYPE_TRAVEL, destination, NULL);\n\
  19. taskSequence.addTask(TASKTYPE_UNLOAD, item, destination, opipno(current,port));\n\
  20. string listName = \"TSList1\";\n\
  21. List(listName).push(taskSequence, 0);\n\
  22. current.centerObjects[1].message(0.01,current);\n\
  23. }\n\
  24. return 0;\n\
  25. ");

model.fsm

Thank you.

FlexSim 24.0.2
queueflexscriptrackcoding
model.fsm (42.8 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 j08j commented

You already have code for the source that feeds directly into the rack to assign a random slot to the exiting item.

  1. int i = duniform(1, Bay, 1);\n\
  2. int j = duniform(1, Level, 1);\n\
  3. int k = duniform(1, Slot, 1);\n\
  4. Storage.Item(item).as(Storage.Item).assignedSlot = current.outObjects[1].as(Storage.Object).getSlot(i, j, k);\n\

You can do the same for the items transported by ASRS.

· 5
5 |100000

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