question

Yifei Wang avatar image
1 Like"
Yifei Wang asked Mohamed Farhoud commented

How to let transporters transport more than one items in one trip?

shortestq-model-autosave.fsm

Hi,

I would like to have transporters transport different amount of items according to their itemtypes in each trip using global table. For example, If the queue needs Domino's pizza. I would like the transporter to transport two Domino pizzas per trip; if the queue needs PizzaHut's pizza, I would like the transporter to transport three pizzas per trip. Can someone help me with my current model?

FlexSim 16.1.0
listtask sequenceforkliftbreak to
· 6
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Here are two similar questions that have already been answered:

How to make the forklift transport more than one item per time

Replenish queues by itemtype

1 Like 1 ·
Yifei Wang avatar image Yifei Wang Matthew Gillespie ♦♦ commented ·

Hi Matthew,

I prefer to use global table since process flow may interfere code performances. Also, each rack contains multiple types of items. I am not sure how to achieve this.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Yifei Wang commented ·

Process Flow can still read from a table just as easily as anything else.

0 Likes 0 ·
Mohamed Farhoud avatar image Mohamed Farhoud commented ·

Hi: I have similar situation. I added my TS in Rack6's Flow properties. I managed to pick up the blue and Aqua Item types (As needed). I want to add a code to tell the Forklift to unload the blue and Aqua at the Queue. Every time I activate the Travel and Unload tasks " 2 lines in the end of the mentioned code" it messes up the whole logic.

My thinking out of the trial and error is: I should replace the "Involved1" which is "Item" in this case to something that would only point to blue and Aqua. I have no clue how to do it though.

inserttask(ts,TASKTYPE_UNLOAD,item (should be changed), destination,opipno(current,port));

Thanks- Mohamedfaroo-3-14july.fsm

0 Likes 0 ·
faroo-3-14july.fsm (20.5 KiB)
Adrian Haws avatar image Adrian Haws Mohamed Farhoud commented ·

@Mohamed Farhoud I've reposted this here since it is separate from Yifei's question. Please refer to the article on Best Practices for using this Answers Site.

0 Likes 0 ·
Mohamed Farhoud avatar image Mohamed Farhoud Adrian Haws commented ·

@Adrian Haws Thanks a lot. I did already go through the article. I thought though it is more proper to include here.Thanks for reposting it.

0 Likes 0 ·
Brandon Peterson avatar image
11 Likes"
Brandon Peterson answered

Yifei,

I have attached a modified version of your model that sets the max content of the task executer to the item type of the flowitem. The task executors will then load multiple items if there are multiple items of the same type and destination available and the max content allows for it.

To get everything to work I had to modify the following parts:

  • Load Trigger of the task executers
    • Adjust the max content of the task executer
    • Store the destination on a label
    • Store the itemtype of the flowitem as a label
  • Add a new expression field to the list
    • Itemtype field to store the itemtype of the involved flowitem of the task sequence
  • Break To Trigger of the task executers
    • Pull From TSList
    • Modified Query to only look for task sequences of the same itemtype and destination
    • Modified the if condition (in the code) to only pull another task sequence if the current content was less than the max content

I hope this helps,

Brandon


5 |100000

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

Sam Stubbs avatar image
3 Likes"
Sam Stubbs answered Sam Stubbs edited

Hey Yifei,

I know that Process Flow is not your preferred method, but I really think it provides an easier solution to what you need to get done. From what you wrote it sounded like you were unaware that Process Flow can integrate well with global tables and events within the 3D model view. So I provided an example of your model using a Process Flow. I used a table to determine which queue could hold which item, and also how many of that item the queue requests as you described. (We did end up using a custom code activity in the process flow using for loops to determine the lowest amount of a certain item type within a queue to let the transporter know which item type for that queue to pull.) Please feel free to pick apart this model and see if it is something you can use.

yifeiwangprocessflow.fsm


5 |100000

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

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.