MATLAB Answers

0

SimEvents, multiple entity generation

Asked by IIT Delhi Goel on 28 May 2012
I'm using SimEvents for a Discrete event simulation. I want to integrate it with an excel document where i have a column with time and 2nd column corresponding to no. of entities produced at that time. But i cant figure out how will multiple entries be generated as in time based entity generator, one specifies a signal and only 1 entry is generated corresponding to the signal at every time step.
For example at 0 time I want to have 20 entities generated then at 1000 time i want to have 15 entitites and so on.

  0 Comments

Sign in to comment.

1 Answer

Answer by Devdatt Lad on 28 Jun 2012

The input signal to the Time Based Entity Generator block is "inter-generation time" and not absolute generation time. Hence if some values of your input signal are 0, i.e. inter-generation time is 0, then multiple entities will be created at the same time by the block. Each time an entity is generated, the value of the input will be read in to determine when the next entity is to be generated.
So if you want 20 entities at time 0 and then 15 at time 1000 then you can enter the following vector in your Event-Based Sequence block which is feeding your Time-Based Entity Generator:
[repmat(0,1,20), 1000, repmat(0,1,14)]
For the first 20 entities, inter-generation time is 0, i.e. simultaneously generated entities. The next inter-generation time is 1000. This will cause the 21st entity to be generated at time 1000. The remaining 14 entities are also needed at this time, so their inter-generation time is 0.

  0 Comments

Sign in to comment.