Making a bunch of entity generators to generate variants in a simevents DES system

1 visualización (últimos 30 días)
Hi all,
I want to make a bunch (478) of entity generators in my model to create entities that represent different patient variants in my model. The interarrival times of the patients types are stored in a variable in a .mat file.
Is there any way to create the entity generators in an efficient way, so to avoid having to create each 478 entity generator manually?
Thanks in advance,
Thomas
Below you can find the code i would use to generate the first variant: (each row in weibparam represents a patient variant)
T = load("weibull_interarrival.mat");
dt = wblrnd(weibparam(1,1),weibparam(1,2));

Respuestas (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi el 4 de Mzo. de 2021
The best approach for you is as follows:
  • Generate a random number for every variant.
  • Use the minimum value of the array as the dt.
  • Update the minimum of the array with a new value.
  • Repeat the process from step 2.

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by