question

Hao avatar image
0 Likes"
Hao asked Jason Lightfoot commented

How to create objects in different destination objects randomly?

1707001661263.png

Hi,

As shown in the figure, every time when Source occurs, the "Create Objects" will create 100 objects. I want these 100 objects randomly created in the 20 different racks in the model. How to do?

Thanks for answering!

FlexSim 23.2.1
create object
1707001661263.png (560.4 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Hao, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

All your racks are in your warehouse. You need to find slots randomly distributed in findslot methods for each of your items. Maybe you want to restrict how many items are allowed in a slot, then you enhance you your query by slot.slotItems.length logical expression.

Once you found a slot, you assign this slot to your item and you set a rack object from found slot for your item

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

here is an example: Source code is On Creation Trigger to assign slots and in Output: Send to Port to move each item.

fill_more_racks.fsm

https://answers.flexsim.com/comments/153548/view.html

0 Likes 0 ·
fill-more-racks.fsm (38.5 KiB)