Clear Filters
Clear Filters

How to generate entities with different probability in SimEvents?

5 views (last 30 days)
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.

Answers (1)

Adit Kirtani
Adit Kirtani on 23 Feb 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.

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!