Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
MATLAB_R2013a_SimEvents_маг.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
5.48 Mб
Скачать

Entity Type Tab

Entity type

Варианты Entity type:

The blank type includes no attributes. The standard type includes attributes called Priority and Count, with default values of 10 and 0, respectively.

Statistics Tab

These parameters determine whether the block produces data at signal output ports or omits(пренебрегает) those ports. For descriptions of the data and ports, see the preceding(предшествующий) table, "Signal Output Ports".

Number of entities departed

Allows you to use the signal output port labeled #d.

Pending entity present in block

Allows you to use the signal output port labeled pe.

Average intergeneration time

Allows you to use the signal output port labeled w.

Examples

  • Build a Discrete-Event Model (директория R2013a>SimEvents>Getting Started with SimEvents).

  • Using Random Intergeneration Times in a Queuing System (директория R2013a>SimEvents>Getting Started with SimEventsSpecify

  • Intergeneration Times for Entities).

  • Use a Step Function as Intergeneration Time (директория R2013a>SimEvents>Getting Started with SimEvents>Specify Intergeneration Times for Entities).

  • Use an Arbitrary Discrete Distribution as Intergeneration Time (директория R2013a>SimEvents>Getting Started with SimEvents>Specify Intergeneration Times for Entities).

  • Specify Generation Times for Entities (директория R2013a>SimEvents>Modeling>Entity Generation>Scheduled Generation>

  • Specify Generation Times for Entities).

Example: Responding to Blockage

To illustrate the blockage options, consider a Time-Based Entity Generator block followed by(с поледующим переходом) a Single Server block, then followed by an Entity Sink block.

Suppose(предположим) the block configurations have these characteristics:

  • The entity generator has Response when blocked set to Pause generation.

  • The entity generator generates the first entity at T=1 and uses an intergeneration time of 1 s.

  • The service times for the first three entities in the server are 1.5, 2.2, and 1.8.

The following tables indicate how the Response when unblocked values affect(влияют) the behavior in the simulation.

Immediate Restart

Time (s)

Behavior

1

Entity generator generates and outputs the first entity to the server. The entity input port of the server becomes unavailable. The first entity is in service until T=1+1.5=2.5.

2

Entity generator generates the second entity and holds it because the OUT port is blocked.

2.5

First entity departs from the server. The entity input port of the server becomes available and the second entity advances from the entity generator to the server. The entity input port of the server then becomes unavailable. The second entity is in service until T=2.5+2.2=4.7. The entity generator schedules the next generation for T=2.5+1=3.5.

3.5

Entity generator generates the third entity, and holds it because the OUT port is blocked.

4.7

Second entity departs from the server. The entity input port of the server becomes available and the third entity advances from the entity generator to the server. The entity input port of the server then becomes unavailable. The third entity is in service until T=4.7+1.8=6.5. The entity generator schedules the next generation for T=4.7+1=5.7.

Delayed Restart

Time (s)

Behavior

1

Entity generator generates the first entity. The entity advances to the server. The entity input port of the server becomes unavailable. The entity is in service until T=1+1.5=2.5.

2

Entity generator generates the second entity. The entity becomes a pending entity because the OUT port is blocked.

2.5

First entity departs from the server. The entity input port of the server becomes available. The entity generator schedules a delayed restart event for the second entity at T=2.5+1=3.5.

3.5

The second entity advances from the entity generator to the server. The entity input port of the server then becomes unavailable. The second entity is in service until T=3.5+2.2=5.7. The entity generator schedules the next generation for T=3.5+1=4.5.

4.5

Entity generator generates the third entity. The entity becomes a pending entity because the OUT port is blocked.

5.7

Second entity departs from the server. The entity input port of the server becomes available. The entity generator schedules a delayed restart event for the third entity at T=5.7+1=6.7.

6.7

The third entity advances from the entity generator to the server. The entity input port of the server then becomes unavailable. The third entity is in service until T=6.7+1.8=8.5. The entity generator schedules the next generation for T=6.7+1=7.7.

See Also

Event-Based Entity Generator (директория R2013a>SimEvents>Modeling>Entity Generation>Dynamic Generation), Entity Sink (директория R2013a>SimEvents>Modeling>Entity Management>Entity Blocking Control).

Таким образом, блок Time-Based Entity Generator модели sedemo_DVS_model генерирует сущности-работы в моменты времени, заданные сигналами на его входе t.

Конец описания блока Time-Based Entity Generator модели dd1.

  • R2013a SimEvents Modeling Queuing

FIFO Queue

Store entities in sequence for undetermined length of time

Library

Queues

Description

This block stores up to N entities simultaneously, where N is the Capacity parameter value. The block attempts to output an entity through the OUT port, but retains the entity if the OUT port is blocked. If the block is storing multiple entities and no entity times out, then entities depart in a first-in, first-out (FIFO) fashion. If an entity in this block is scheduled to time out, then it might depart prematurely via the optional TO port. For an example, see Use Timeouts to Limit Entity Queueing Time (директория R2013a>SimEvents>Modeling>Entity Management>Timeout Modeling). The length of time that an entity stays in this block cannot be determined in advance.

The IN port is unavailable whenever this block stores exactly N entities. In this case, the queue is said to be full.

Ports

Entity Input Ports

Label

Description

IN

Port for arriving entities, which are stored.

Entity Output Ports

Label

Description

OUT

Port for departing entities that do not time out while in this block.

TO

Port for entities that time out while in this block. You see this port only if you select Enable TO port for timed-out entities. This port must not be blocked when an entity attempts to depart here.

Signal Output Ports

Label

Description

Time of Update When Statistic Is On

Order of Update When Entity Departs

#d

Number of entities that have departed from this block via the OUT port since the start of the simulation.

After entity departure via the OUT port

3

#n

Number of entities currently in the queue.

After entity arrival and after entity departure

2

w

Sample mean of the waiting times in this block for all entities that have departed via any port.

After entity departure

1

len

Average number of entities in the queue over time, that is, the time average of the #n signal.

After entity arrival and after entity departure.

1

#to

Number of entities that have timed out from this block since the start of the simulation.

After entity departure via the TO port

3

Output signals having the same number in the Order of Update column in the table above are updated in an arbitrary sequence relative to each other; you should not rely on a specific sequence for your simulation results.

The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0 for all signals.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]