question

Alonso avatar image
0 Likes"
Alonso asked Alonso commented

supplying the line assembly with different quantities of products

Good morning, I have a question, whenever I use the AGV to unload boxes I use Label Color, but this means that each box has a corresponding color in a Queue to unload. However, in my model the production line only produces red products, so I must only deliver red products to different Queues. The problem is that I can't reference the quantities. For example, I load 3 sets of boxes containing 3 products in Queue 7 and 3 sets of boxes containing 6 products in Queue 8. The AGV must unload into each Queue a Tote produced in Queue 7 and a Tote produced in Queue 8. In my model it downloads everything to the first Queue. How do I reference unloading by different quantities? Another question, if I supply the line, should the list reference be different? I've recently been using FlexSim, so I'd appreciate anyone who can help with this question. Thanks.


Modelo_For.fsm

FlexSim 24.2.2
proces flow
modelo-for.fsm (102.0 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.

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Alonso commented

You boxes are subnodes of the totes. You can access subnodes and read how many there are with code.

https://docs.flexsim.com/en/25.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html#Property-subnodes

As such, you could write code that loops through all totes loaded by the AGV (which you have stored as the array "items" on the token or, again, as subnodes of the AGV) and decides which ones to unload. A simpler method is to push the loaded items to a list again and define a list expression that returns the number of subnodes/boxes. This can then be used in a pull query to get one tote with 3 and one tote with 6 items.

Instead of reading the number of subnodes, you could also set different label values on the totes and differentiate by those.

The logic that loads the boxes onto pallets uses the "Type" label. This did not exist on the boxes from the totes yet.

modelo-for_1.fsm


modelo-for-1.fsm (137.2 KiB)
· 17
5 |100000

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

Alonso avatar image Alonso commented ·

@Felix Möhlmann Good morning, thank you very much, I was able to apply the Blue logic correctly in my model, the error is not always where we thought it was, but in a station above or below, as in my case, I did not update the "Travel station". Thank you for your patience in explaining the logic step by step. thank you very much

1 Like 1 ·
Alonso avatar image Alonso commented ·

Hello @Felix Möhlmann , could you guide me in a solution for this example, in the model developed by you, I would like Queue 2 Queue 3 to have only 3 red and 6 blue boxes, the rest should be in Queue 9 and 13 waiting for the others to be consumed. be processed. I tried to apply logic with processFlow, but there would be an easy way to do this without processFlow. applying Label to triggers? Thank you in advance

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Alonso commented ·
I don't really see a simple way to do this, since the number of items per tote varies. I would push the totes to a list. A token in Process Flow tries to pull totes with fitting quantities and releases them to the separator in a loop structure. Before pulling, the token would check how many items can fit in the queue per type. Then try to pull a tote with up to that many items. If one is pulled, release the tote, wait some small amount of time for the items to enter the queue and then go back to the start of the logic. If no tote is pulled (max wait time elapses) the token first waits until either an item exits the queue or a new tote becomes available before trying again.
0 Likes 0 ·
Alonso avatar image Alonso Felix Möhlmann commented ·

Thank you @Felix Möhlmann , do you say using the Label LoopContent and the Closeoutput action?

0 Likes 0 ·
Show more comments
Alonso avatar image
0 Likes"
Alonso answered Alonso commented

@Felix Möhlmann Good afternoon, one question, In the model, the AGV does the first loading of Queue 10 and Queue 9, these parts are unloaded in Queue15, with only 2 free places to accommodate Type1 and Type2 (TargetQuantity Array[6]: {2,2 ,0,0,0,0}, the AGV can then refuel in Queue11, with the Type3 item and unload in Queue16(Array[6]: {0,0,2,0,0,0} the last loading takes place in Queue 12, 13 and 14, where it is downloaded to Queue7A1 (Array[6]:{0,0,0,2,4,2}).

the AGV has a maximum capacity of 6 totes, and there is a consumption of parts with different times, the model presented is not loading the AGV. I made 6 Type sometimes it loads and unloads, but the shape is not correct, thank you for your help


Model_DemandA07.fsm


model-demanda07.fsm (62.2 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.

Alonso avatar image
0 Likes"
Alonso answered Alonso edited

One question about FlexSim, is there any reset logic by quantity? Imagine that the AGV leaves to unload, and in QueueA there is a quantity to unload, for example 8 spaces that can be loaded with pallets, the logic predicts that when the AGV arrives at that control point or deposit Queue it will be able to analyze the free quantities for the next round, bring the maximum number it has for that Queue, that is, if there are 3 places available, however for this Queue my AGV has reserved 2 pallets for this deposit per trip if it is loaded with the maximum number of pallets, which are 6, so it would only take 2 what is needed. Now if the AGV passes through other points and finds that only QueueA needs to load 3 spaces for 3 pallets, then instead of carrying 2 pallets it would take 3 pallets. This exists in FlexSim?

· 22
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

You can do almost anything in FlexSim, if you are willing and able to put in the work to code the necessary logic.

Attached is an example model that contains two approaches for demand based deliveries. In both cases the destination queues (4-6) have two array labels, one that denotes the target quantity per item type and one that shows the current (+ planned input) quantity per type.

In the "orange" model, the queues pull items through a-connections. In the "Pull Requirement" field I check if the queue still needs more items of that type. If yes, the current content label is incremented and the item is pulled. If not, the item is not pulled. When an item exits a queue, the current content is decremented. When an item is pulled, the "Use Transport" option of the supply queues pushes it to a list and writes the destination to a label on the item.

In the Process Flow, a token waits until it can pull at least one item from that list. It then visits each queue, loading pulled items from that queue or unloading them, if they are the item's destination.

The "blue" model works in a similar way. But instead of the flow happening through port-connections, code in the "Get Need" activity evaluates the current demand and plans what item types to load. The rest of the Process Flow then again just handles picking up the planned quantity per type and transporting them to the target queues. The major difference is that the AGV can wait at a supply queue until the needed quantity of that type was loaded.

transport-by-demand.fsm

Just a heads up: Please use comments below existing answers/comments to post follow-up questions. And if you want to add new information you can edit your post (gear icon at the top right of the comment) instead of writing a new comment each time. That keeps the post overall more readable because the posts are structured rather than having to look at timestamps to find the most recent one. :)

1 Like 1 ·
Alonso avatar image Alonso Felix Möhlmann commented ·

@Felix Möhlmann Thank you very much, I will improve the usability of the platform as I am new and did not know how to proceed with subsequent questions on the same topic. Finally, I will have to analyze this model that was developed on demand. A question to Label shown in the photo, is it responsible for the position and indicates whether the correct position is full or empty? However, I tried to change the allocation amount like this in the photo. and I couldn't. I will analyze the model further. Thank you very much.


1733498900280.png

0 Likes 0 ·
1733498900280.png (21.8 KiB)
Felix Möhlmann avatar image Felix Möhlmann Alonso commented ·
In the example model each entry in the array corresponds to a type of item (first position - Type 1, second position Type 2, third position, Type 3).

Reducing the number of entries will lead to errors, because the logic is build to expect three types. If you don't want to get any items of some of the types in a queue, just enter a 0 in the "TargetQuantity" label at that position.

1 Like 1 ·
Show more comments
Show more comments
Alonso avatar image
0 Likes"
Alonso answered

I believe that the logic could be focused on pallets, so they do not need to be separated immediately, for example, after unloading the AGV's, the separator would only be able to process 1 pallet, so the supply queue would only accommodate the boxes on one pallet. In other words, I will have a waiting line at the processor limited to 3 pallets and when there is 2 or 1 pallet waiting for the processor, the AGV understands that it will only take what is left to complete the maximum number of capacity, which is 3 pallets. I don't know exactly how to apply logic like this that is based on line consumption and the AGV's maximum pallet loading capacity. AGVs move according to line consumption and to optimize deliveries. I don't know if there is an example similar to this on the forum that could help me, I appreciate any help.

5 |100000

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

Alonso avatar image
0 Likes"
Alonso answered

@Felix Möhlmann I am immensely grateful for the solution presented, it perfectly meets the demands of the factory where I work. One last question, I really have no idea where to put the "Event Triggered" function to apply the following logic, the AGV in the developed model, loads 9 pallets and unloads, imagine that the AGV only loads and unloads according to consumption. Imagine that on each trip the AGV only supplies the Queue that has a minimum quantity "X", for example, some Queue consume more than others. if I have 3 deliveries, but in Queue 1 and 2 more boxes are deposited and in Queue 3 and 4 and less are deposited. In other words, I wouldn't have space to deposit it in Queue 1e2, since consumption takes a long time due to the greater number of pieces, but Queue 3 e 4 has fewer pieces and is consumed faster. The idea is not to build up stock since I don't have unlimited physical space. Imagine that in this model developed by you, which is correct, the AGV makes trips according to consumption, if the line is slow it must remain stopped at a point waiting for consumption. Now, if at least one Queue needs to be filled, it can only take 2 pallets and only supply the Queue that has been consumed. I'm not sure if I managed to explain it correctly, but if there is a similar model on the forum I would be grateful. I don't know how to add events to apply this logic. The AGV can always bring any empty pallet, as long as it does not exceed its capacity of 9 pallets. I would really appreciate if you have any solutions for this logic. This is the real logic of AGVs in my work environment. Grateful.

5 |100000

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

Alonso avatar image
0 Likes"
Alonso answered Felix Möhlmann commented

Hello @Felix Möhlmann , Thank very much, I was able to put the logic to load the boxes on pallets using the "Type" label.

I still have a question, in my example I made a list for pallets so only 6 pallets are produced, the pallets must be reused and reprocessed, so I made an empty pallet after unloading the boxes for each Queue, to generate a reprocessing. However, when I connect the Queue that will receive this pallet for reprocessing, the system stops, so I left it without the pallet and combiner connection. The idea would be to have a pallet number no more than 6 and the combiner only works when a pallet is available. One problem is that when he deposits in Queue9, on the first trip he must carry up to two pallets if available if he does not move to the second Queue. I appreciate the help.



LZ_2.fsm


lz-2.fsm (124.0 KiB)
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

I am not really sure how many totes are supposed to be loaded and unloaded at what queues at this point.

So what I did is altered the model mostly to showcase two things:

How to use list partitions so you only need a single list for loading items (check the Push to List option in the queues' Send to Port field. I added the queue (current) as a partition ID).

And I added a label to the totes that denotes what queue they 'belong' to originally, so that any loaded empty totes can be unloaded to the correct queue, so each combiner keeps the same six totes in circulation.

I do not unload anything to processor4, since those totes would just vanish in the sink and be lost.

Hope this helps you to implement the logic you need.

lz-3.fsm

0 Likes 0 ·
lz-3.fsm (114.1 KiB)