Unloading items

Unloading items

MPeyman
Not applicable
291 Views
14 Replies
Message 1 of 15

Unloading items

MPeyman
Not applicable

[ FlexSim 23.0.0 ]

Hello everyone,

I have created a model in which a task executer randomly selects one of the W to load and then randomly travels to various C destinations to unload. However, the unloading process randomly distributes the items to each C, which is not ideal. I aim to improve this by having the task executer unload a batch size that defined 5 for each C. If there are any remaining items, the executer will randomly choose another C to unload. If there are no more items left to unload, the task executer will randomly select one of the W items to refill it.model.png

0 Likes
Accepted solutions (1)
292 Views
14 Replies
Replies (14)
Message 2 of 15

Jeanette_Fullmer
Community Manager
Community Manager

Hi @MPeyman,

It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

0 Likes
Message 3 of 15

MPeyman
Not applicable

Sure, here is my model.Try.fsm

0 Likes
Message 4 of 15

Jeanette_Fullmer
Community Manager
Community Manager
Accepted solution

Hello @MPeyman

I changed your subflow for the unloading so it made a token for each item. Those items are then batched together in groups of 5. Then the destination is assigned for each batch of 5. Those items then run through another subflow so each item is unloaded.

1677279862123.png

try_1.fsm

0 Likes
Message 5 of 15

MPeyman
Not applicable

Dear @Jeanette F Thanks for your consideration But in that model the task executer get stuck in unloading part and dont come back to choose another W and do the process in a loop even when I conected the release part to the wait for the event.model.png

0 Likes
Message 6 of 15

Jeanette_Fullmer
Community Manager
Community Manager

I moved the create Task Sequence to before that run subflow and it works now. The only thing is that the first 10 items in the item label are blank on my run. I assumed this had to do with a server connection that it said it couldn't reach so hopefully those fill in correctly when you run it.

1677293220706.png

try_2.fsm

0 Likes
Message 7 of 15

MPeyman
Not applicable

Hi @Jeanette F In this model UAVs goes randomly to the W picked up items and then goes to C2, and C4, But they just release one item there and then both of them goes to C1 and stay there forever. So, In processflow, I changed the "Unload each item" and turn off the "Run tokens one at a time", then they unload 5 items in C2 and C4 but again they goes to C1 and stay there forever.

I guess its automaticly create a token for each UAVs because we have load 10 items which means 2 batches since each batches contains 5 item. But I see that its alot more than that, and after finishing loading 10 item for each UAVs, then in unloading part each of them get 22 token. which I think is not right, or maybe I don't underestand it. try-2.fsm

Also, instead of setting the batch quantity to 5, is it possible to set it equal to the batch size of each "C"? then it can be change depend on each "C" batch size.

Thanks in advance.

0 Likes
Message 8 of 15

Jeanette_Fullmer
Community Manager
Community Manager

Hello @MPeyman , I am not seeing the behavior you are describing. I also don't think you understand the Load part of your process flow. In the source there is a token created for each row of the Initial Stock Table. That token then creates 10 items in the Buffer that is associated with its row from the Initial Stock Table. I am assuming that this creates an initial stock for the C queues and that these should be kept separate from the items that the UAV load from the W queues and deliver to the C queues. They are not kept separate because they are assigned to the same label called item. I would change that and assign them to a new label. Next the tokens wait for the C queue to decrease to 5 or fewer boxes. Then the token tries to acquire a UAV. Once that UAV is acquired a random W queue is assigned. Then the token creates 10 tokens to run through the subflow. Each of those 10 tokens creates 10 items (That's 100 items total for the parent token), loads one of those items, and then delays. I am assuming that you only intended the create object in the load subflow to create 1 item instead of 10.

So I have changed your process flow so the first create object activity uses a unique label from the create object in the sub flow. The create object in the sub flow only makes one item. I was also running into an issue with label assignment with the task sequences so I added those labels to the tokens in the unload sub flow.

try_3.fsm

0 Likes
Message 9 of 15

MPeyman
Not applicable

Hi dear @Jeanette F , I tried to run the model Try-3, but after loading item, the model stoped I dont know what is the problem. model.png

0 Likes
Message 10 of 15

Jeanette_Fullmer
Community Manager
Community Manager

There is a stop time that I placed so I could fast forward to the unloading part. If you select run again it will continue. You can remove this stop time by selecting the drop down next tot the model time and deselecting or deleting the stop time.

1677600486367.png

0 Likes
Message 11 of 15

MPeyman
Not applicable

Thank you so much it works. Just one question is that how is possible instead of put the quantity to 5 in batch, make a dynamic batch where instead of 5 it would depends on the batch size of each C. So some see would be 5 and the others 10 or 7.

0 Likes
Message 12 of 15

Jacob_White
Community Manager
Community Manager
Hi @MPeyman,

If you have a label stored on each item that references the batch size, you can have the batch activity use that label for the batch quantity.


0 Likes
Message 13 of 15

MPeyman
Not applicable

@Jeanette F thanks for your efforts but now the the issue is that the UAVs going to the same W as they went at the begining of the simulation to refill. But before, for refilling they went randomly to other W. For example UAV 2 at the begining goes to w2 to fill, then goes to C2 and C4 then it comes back to W2 but I wanted to chose the other W.

0 Likes
Message 14 of 15

Jeanette_Fullmer
Community Manager
Community Manager

Hello @MPeyman,

You assign the W label based on this. Please examine how you would want this to change.

1677712974839.png

0 Likes
Message 15 of 15

MPeyman
Not applicable

Hi dear @Jeanette F ,I changed the randomness variable and instead of 1 I put 3 and now works better. Thank you.

0 Likes