-
Class Summary
Class |
Description |
QueuingEntity |
QueuingEntity is the entity that integrates a queuing discipline
managing some buffer into the simulation.
|
Package ikr.simlib.entities.queues Description
Queues
Queues that are based on the base class
QueuingEntity
which is derived from
Entity
can store any kind of message. For
convenience reasons
QueuingEntity
has four
static methods to create commonly used queuing types, namely
bounded/unbounded FIFO (first in first out) and bounded/unbounded LIFO (last
in first out). These static methods return a QueuingEntity and directly set
the appropriate QueuingDiscipline.
The lengths of a queue is measured in units (information units, e. g. bytes).
A unit corresponds to the length specified in the member
length
of
Message
and is also the basis to determine
whether a bounded queue is full. Nevertheless, the length of a queue in
number of packets is also remembered by
List<>
in which the
messages are stored. The different kinds of lengths can be retrieved by
queue.getQDisc().getCurrentNumberOfUnits()
and
queue.getQDisc().getCurrentNumberOfMessages()
, respectively.
- The communication with the preceding or succeeding model component is
processed via an input port (class
InputPort
)
or via an output port (class OutputPort
).
- In
QueuingEntity
implementing a
BoundedFIFOQDisc
messages
that arrive at the input port are buffered including their arrival time with
the method put()
(if there is enough room in the queue).
- Simultaneously a message for the succeeding model component is offered.
- If there is not enough buffer space in the queue to store the currently
arriving message, an
QueuingEntity
will
drop the message, whereas when hosting a
BoundedLIFOQDisc
as many
messages from the head of the queue are dropped as necessary to store the
arriving message. In case it is larger than the maximum allowed queue size,
it is dropped immediately without deleting any messages from the queue.
- Upon request by the succeeding model component the method
get()
is used to retrieve the next message from the queue.
- Statistics are kept on
- the waiting time in reference to waiting messages
- the waiting time in reference to all passing messages (transfer time)
- the queue length in number of units
- the queue length in number of messages
- the loss probability