SimEvents, multiple entity generation

조회 수: 2 (최근 30일)
IIT Delhi Goel
IIT Delhi Goel 2012년 5월 28일
댓글: VBBV 2020년 12월 20일
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.
  댓글 수: 1
VBBV
VBBV 2020년 12월 20일
Are the entities stochastic or deterministic ? if its stochastic event generator at a given time, use rand function to specify the number of events, otherwise use linspace function to specify the number of events.
In any case, you require user input variables to store the number of events generated at a given time since at each time the number of events required are varying.

댓글을 달려면 로그인하십시오.

답변 (1개)

Devdatt Lad
Devdatt Lad 2012년 6월 28일
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.

카테고리

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