question

Che-Wei Chou avatar image
0 Likes"
Che-Wei Chou asked Che-Wei Chou commented

How to control container based on incoming packed item

Hi,

I try to call a container to pack items and label item's label on container, please see the attached. Though I have build a model, however, I can't control the incoming container't type, it depends on the created distribution. How do I control the container's type that I can decide which items to pack staying in the buffer area.

Thank you a lot in advance,

Wade

control_contain_lable_by_packed_item.fsm

FlexSim 20.1.3
combinerlabelscontrol incoming container type
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
1 Like"
Felix Möhlmann answered Che-Wei Chou commented

The answer depends on what the controlling factor of the container's type should be.

One example could be to always use the type of the oldest (first) item in the storage:

objectexists(Model.find("FloorStorage1").first) ? Model.find("FloorStorage1").first.Type:duniform(1,3, getstream(current))

This code checks if there is an item in the floor storage ( objectexists() ? ). If that is the case, it returns the value to the left of the ":", in this case the Type label of the first item. Otherwise it returns the value to the right, a random in the range from 1 to 3.

control-contain-lable-by-packed-item-fm.fsm


· 3
5 |100000

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

Che-Wei Chou avatar image Che-Wei Chou commented ·

Hi Felix,

Thanks for your help, it's work.

Further question, due to the items coming scheduling are different, though the source could generated the container's type, it still would be happened a situation that container wait for items for a while until the matched items entering.

The question is that could we just set the condition on left of the ":", erase the right side of thg ":", a random range from 1 to n.

Thank you very much your support.

Wade

123.jpg


0 Likes 0 ·
123.jpg (361.6 KiB)
Felix Möhlmann avatar image Felix Möhlmann Che-Wei Chou commented ·

The source object creates objects solely based on a schedule or inter-arrival time. It is not suited to create items in reaction to other events in the model (such as reaching a full batch in the storage).

You can use a simple process flow instead. The event-triggered source reacts to items enterin the storage and creates a token for each one. In its properties, the entering item is assigned to a label on the token for later reference.

The tokens are then batched together based on their Type until the number specified in the "cart" table is reached. At that point, a single one of the tokens is released (the others are deleted) which goes on to create a tote with the correct cart_Type label value.

control-contain-lable-by-packed-item-fm_1.fsm

As a note: Please use the comment function rather than create a new answer when reacting to other answers/comments.

You can change your answer into a comment via the little gear symbol in the top right of your post. 1650876619155.png

1 Like 1 ·
Che-Wei Chou avatar image Che-Wei Chou Felix Möhlmann commented ·
Thank you so much, Felix.

That's the exactly solution that solved my question.

Wade

0 Likes 0 ·