How to generate entities with different probability in SimEvents?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Adit Kirtani
el 23 de Feb. de 2023
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.
0 comentarios
Ver también
Categorías
Más información sobre SimEvents en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!