How to create objects in different destination objects randomly?

How to create objects in different destination objects randomly?

Hao4
Not applicable
33 Views
3 Replies
Message 1 of 4

How to create objects in different destination objects randomly?

Hao4
Not applicable

[ FlexSim 23.2.1 ]

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!

0 Likes
Accepted solutions (1)
34 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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

0 Likes
Message 3 of 4

joerg_vogel_HsH
Mentor
Mentor

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
Message 4 of 4

jason_lightfootVL7B4
Autodesk
Autodesk

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