question

Leandro Meirelles avatar image
0 Likes"
Leandro Meirelles asked Gustavo Teodoro commented

Task executer address item that is not a token in process flow

Hello community,

I am simulation a box preparation and collection system to transport to manufacturing lines.

  • There are 3 types of boxes (A, B, RET);
  • There are 4 Destinations (1, 2, 3, 4);
    • Destination 1: cart with 2x box RET;
    • Destination 2: cart with 5x box A and 3x box B;
    • Destination 3: cart with 2x box RET;
    • Destination 4: cart with 3x box B.

Basically the operator needs to transport the cart close to the box pallet, collect a number and type of boxes based on the destination, and place on the cart. After that, the operator needs to move the cart close to the carton pallet, and place the equivalent carton inside the boxes of the cart.

I have 2 doubts:

  1. In the first decide of the process flow, i need to address the box item into the load and unload activities, but the problem is that they are not tokens. just regular objects on model, how do i do that?
  2. In the second decide, i need to address the respective box for each carton box on the cart, how do i address on process flow and object inside of an object dynamic?


Follow attached the model.

Thanks very much for the great support!!


problem.fsm

FlexSim 24.0.3
process flowtask executeradress item
problem.fsm (6.1 MiB)
5 |100000

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

Gustavo Teodoro avatar image
0 Likes"
Gustavo Teodoro answered

Hello Leandro.

1) The token is stopped because FlexSim does not understand which connector it should send to, as in the logic it says “Connector 1” and there is no such name in the connectors. To do this, I have changed the name to 1, 2, 3 and 4. For each subflow, one token must run at a time, so I left the “Run Token One at a Time” option checked and created a label called “Local” which means where the Box is in stock.
1713918293638.pngIn the subflow, in the "Load" function, it was necessary to change the item, as the item that will be loaded is the first item in the queue. The "token.Local.first" function was used, as it accesses the first Local box that must be loaded. The same was done for "Unload", as the item is now in the Operator. The "token.Operator.first" function was used.

1713918383375.png1713918419067.pngIn the attached example, I only changed it to the target 1 and 2 subflow.

2) For the Operator to place the Cartons inside the respective Boxes, I have created a list called Cartons and when the item enters the queue (On Entry) it sends the item to a list in the partition with its name.
1713918506646.png
In the process flow, in the "Assign Label: Box in the cart" code, I added an array that contains all the boxes that were loaded. For more information about Arrays, take a look at:
https://docs.flexsim.com/en/24.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Array.html

I also have added a position label that represents each of the boxes in the carts.
In the “Assign Label: Carton” function, FlexSim identifies the type of Carton based on the box that will be loaded. For more information about Strings, take a look at:
https://docs.flexsim.com/en/24.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Basic/string.html

In the “Pull from List: Carton” function, the Carton is chosen, loaded and unloaded into the corresponding Box. For more details on the position of the Cartons inside the Boxes, take a look at:
https://answers.flexsim.com/questions/63005/how-do-i-stack-parts-inside-of-each-other.html
https://answers.flexsim.com/questions/79905/how-to-organize-flowitems-inside-a-container-using.html


Finally, the box position is increased and checks whether all boxes have been loaded. If they were not, the loop is performed again until all boxes are loaded. Otherwise, the flow can be followed.
1713918738241.png
The model is attached .

FX_LoadCartonsBoxes.fsm


1713918293638.png (45.4 KiB)
1713918383375.png (30.2 KiB)
1713918419067.png (35.0 KiB)
1713918506646.png (174.9 KiB)
1713918738241.png (43.7 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.

Leandro Meirelles avatar image
0 Likes"
Leandro Meirelles answered Gustavo Teodoro commented

Hello Gustavo, thanks very much, that was exactly what I needed.

I just have 2 more question if you don't mind:

1) After collecting the boxes and before leaving the warehouse, the operator needs to stop at the station close to exit and stay there for 40 seconds doing a checkout, I used on process flow a travel block to the location and to simulation this checkout process i used "delay", but i feel this is not the proper way to do this, because the operator utilization will be wrong, because he's going to be idle instead of working. How do I make it better?

2) I am trying to adjust the visual to the carton box stays exactly inside of the black box, but it doesn't a trigger to change the visual of it, do I need to do that by coding? Could you give me a direction please?

Follow the newest model:

problem2.fsm


problem2.fsm (6.9 MiB)
· 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.

Gustavo Teodoro avatar image Gustavo Teodoro commented ·

1) You can replace the delay for a Task Executer Delay. In this function you can set the Task Executer state.

1713990279263.png

2) You can use a custom code and change the Carton position.
1713990409370.pngproblem2.fsm

0 Likes 0 ·
1713990279263.png (29.1 KiB)
1713990409370.png (135.4 KiB)
problem2.fsm (6.8 MiB)