readme.txt

来自「simulation fifo protocol」· 文本 代码 · 共 37 行

TXT
37
字号
Fifo
====

Single-server queue model.

Demonstrates:
  - subclassing simple modules
  - using handleMessage()
  - decomposing handleMessage() into several functions
  - using simple statistics and output vectors
  - using finish()

The model contains three modules. The "gen" module generates jobs, and
sends them to the "fifo" module which is a single-server queue. Jobs are
stored in a queue (cQueue object) until they are served -- this queue can be
found and inspected in the graphical environment among the class members of
the "fifo" module -- either in the object tree in the main window, or in the
inspector of the "fifo" module (right-click "fifo" icon --> Inspect as object
--> click "Contents" tab). Processed jobs are disposed of in the "sink"
module. The "sink" module collects statistics which can also be inspected.

After running the simulation, fifo*.vec file will contain queueing time
data collected via cOutVector objects during the simulation. The data
can be plotted using the Plove program.

AbstractFifo can be used as a base class for modules that involve queueing.
One can subclass AbstractFifo and redefine the following member functions:
    void arrival(cMessage *msg)
    simtime_t startService(cMessage *msg)
    void endService(cMessage *msg)
These functions are called by AbstractFifo::handleMessage() whenever
a message arrives, begins service and ends service, respectively.
startService() should return the service time for the message.
ACBFifo and ACPFifo demostrates how to do this.


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?