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:

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

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.