question

martin.j avatar image
0 Likes"
martin.j asked Joerg Vogel commented

How to programatically create content in a specific Bay of a Rack

Is there a way to programatically create an object in a Rack, either with 'createcopy' / 'createinstance' or with Process Flow 'createobject' activity, and then place it in a bay of my choice?

It seems I can add objects into the rack easily enough, but they are not placed in any bay, they just lie at the foot of the rack. How can I update the racks content table with the item and have it drawn in the correct location?

Basically I am trying to get around using the Place_In_Bay and Place_In_Level triggers for my initial content that the rack should hold on model startup.

FlexSim 17.1.2
racksplace in baycreating flow items
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

·
Steven Hamoen avatar image
3 Likes"
Steven Hamoen answered Joerg Vogel commented

@martin.jensen why don't you use a source creating a fixed amount of product with interarrival time 0 and set labels on the items exiting the source. In the "Place in..." triggers you could easily determine whether items coming in are startup (time()<1) or normal running and have different code if needed.

If you really want to know take a look in the library object at the assertCellAssignment() function to know how flexsim does it internally and you can copy that functionality.

· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

As @steven.hamoen suggested, you can set a label at the items you create in a source with the scheduled arrival style. Then you use the place in bay and place in level functions to evaluate this label to set items to the cells and in the minimum dwell time you set the staytime, too. Any other approach must take into account all dependencies that the functions place in bay, place in level and minimum dwell time create automatically. There are several table structures in the tree representing the content of the cells. You have to fill these structures on your own if you try to fill the racks by code.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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