Professional Documents
Culture Documents
Manual
safdar@uetpeshawar.edu.pk
TABLE OF CONTENTS
1. Manual Objectives
I n this manual, the use of the Project and Node Editors in OPNET [1] to set up queue
models (M/M/1, M/G/1 and M/D/1), collect statistics about the model, run
simulations, and mathematically analyze the statistical results of the simulation are
illustrated.
2. Instructions
I n this chapter, the step-by-step instructions for setting up queuing models in OPNET are
provided.
1. Click on the Create Queue toolbar button, and place a queue module to the right of the
generator module in the workspace.
2. Right-click to end the operation.
3. Right-click on the queue module and select Edit Attributes to bring up its attributes.
4. Change the name attribute to queue.
5. Change the process model attribute to acb_fifo (the reasoning behind this is discussed
after this procedure).
11
6. Make sure the service_rate attribute is set to 9600, with generated mean packet size of
9600bits the average service rate is 1 packet per second.
7. Click OK to close the dialog box.
1. Click and drag the mm1_model node model from the object palette to the projector
editor workspace. Remember to right-click to end the operation.
2. Right-click on the node objects and selects Set Name from the Object pop-up menu.
3. Enter M_M_1 as the name and then click OK.
4. Select File > Save. Click Save to accept the existing name queuing_model.
CHAPTER 3
This chapter discusses methods of collecting statistics and viewing results in different ways.
1. In the Project Editor, choose DES > Configure/Run Discrete Event Simulation.
2. Set the following values in the Configure Discrete Event Simulation dialog box.
Duration: 7 hours
Seed: 431
Values Per Statistic: 100
17
1. In the Project Editor, choose DES > Results > View Results
2. Select the queuing delay (sec) statistic.
3. From the pull-down list under Presentation, select average.
18
Figure 3.7: Comparison of current vs. average queue size over time
1. Duplicate the mm1 scenario (created in the last section) to a new scenario. Name the
new scenario md1.
2. Select File > Open > Node Model > mm1_model
3. Select Save As. to duplicate a new node model named md1_model
4. Right-click on the src processor to open its Attributes dialog box
5. Left-click in the Value column of the Packet Size attributes to open the Packet Size
Specification dialog box.
6. Change the Packet Size attribute so that Distribution Name is constant and Mean
Outcome is 9600. This sets the size of the generated packets to be constantly
distributed with a fixed size of 9600 bits per packet.
7. Click OK to close the Attributes dialog box.
23
8. Select File > Save to save the modified node model md1_model, and then Close the
Node Editor.
9. Right click on the M_M_1 node in the network model; change the name to M_D_1
and the model to md1_model, as shown in the following figure.
10. Click OK to close the dialog box.
1. In the Project Editor, choose DES > Configure/Run Discrete Event Simulation.
2. Set the following values in the Configure Discrete Event Simulation dialog box:
Duration: 7 hours
Seed: 431
Values Per Statistic: 100
3. Click Run to begin the simulation.
1. In the Project Editor, choose DES > Results > View Results.
2. Select the queuing delay (sec) statistic.
3. From the pull-down list under Presentation, select Cumulative Distribution (CDF).
4. Click on the Show button.
Compare with queuing delay (sec) of mm1 scenario.
24
1. Right-click on the graph of the time-averaged queue size, then choose Add Statistic
from the pop-up menu. A new View Results dialog box appears.
2. From the pull-down list Results for, select Current Project and place a check next to
queuing_model >mm1. Select Object Statistics >M_M_1 > queue > queue >
queuing delay (sec) in the View Results dialog box.
3. From the pull-down list under Presentation, select Cumulative Distribution (CDF).
4. Left-click on the Add box.
5. The graph of the CDF of queuing delay (sec) from mm1 scenario is added to the
existing time-averaged queue size graph (as shown in the following figure).
Task: compare the average queue size (packets) with that in mm1 scenario.
1. Duplicate the mm1 scenario (created in the last section) to a new scenario. Name the
new scenario mg1.
2. Select File > Open > Node Model > mm1_model
3. Select Save As. to duplicate a new node model named mg1_model
4. Right-click on the src processor to open its Attributes dialog box
5. Left-click in the Value column of the Packet Size attributes to open the Packet Size
Specification dialog box.
6. Change the Packet Size attribute so that Distribution Name is uniform_int,
Minimum outcome is set to 0 and Maximum Outcome is 19200, as shown in
following figure.
1. In the Project Editor, choose DES > Configure/Run Discrete Event Simulation.
2. Set the following values in the Configure Discrete Event Simulation dialog box:
Duration: 7 hours
Seed: 431
Values Per Statistic: 100
3. Click Run to begin the simulation.
CHAPTER 4
4. Tasks
4.1 Task 1
Compare the queuing delay (sec) and queue size (packets) with previous two scenarios.
Fill in the following table.
4.2 Task 2
Set up an M/M/1/N Queue with finite buffer.
4.2.1 Explanation
Set up an M/M/1/N Queue with finite buffer size (max. 6 packets) to simulate a delay-
loss system. Since the buffer capacity is limited, there will be packet loss happening
when the buffer is overflow.
4.2.2 Instructions
7. Select File > Save to save the modified node model mm1n_model, and then
Close the Node Editor.
8. Right click on the M_M_1 node in the network model; change the name to
M_M_1_N and the model to mm1n_model, as shown in the following figure.
1. In the Project Editor, choose DES > Results > View Results
2. Select the overflows statistic.
3. Click on the Show button (the graph is shown in Figure 4.5).
32
[1] "Application and Network Performance with OPNET (Last accessed: 20 January
2016)," [Online]. Available: http://www.opnet.com.