How to generate entities with different probability in SimEvents?

3 次查看(过去 30 天)
Hi all!
I want to generate and define 5 different type of entities (let's say 5 customer for a restaurant, and they always order the same thing from the menu, it means the same service time for a specific customer). On the other hand, some of customers come to this restaurant more frequently than others. How can I generate and specify those 5 entities with a probabilistic approach?
I hope my question is comprehensible.
Thanks in advance.

回答(1 个)

Adit Kirtani
Adit Kirtani 2023-2-23
Hi,
For your question you could use two approaches; using a single entity generator with different attributes to differentiate between customers, or 5 different entity generators.
For multiple generators, you can use change the dt variable as you wish to specify a generation time.
Using the Entity Multicast Blocks and a Multicast Receive Queue Block you can combine the entities and use them as you wish.
For a single generator, you can modify the "Generate" Event Action and specify code to modify attributes of the Entity to differentiate between them, in your example, different customers would have different attributes. Using code you can randomly assign a generated entity to a particular Customer and modify it's attributes accordingly.
Here are a few documentation links as well which may be helpful to you.
I hope this helps,
Adit Kirtani.

类别

Help CenterFile Exchange 中查找有关 Discrete-Event Simulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by