-
Notifications
You must be signed in to change notification settings - Fork 1
/
procedure_running_code.txt
148 lines (81 loc) · 4.29 KB
/
procedure_running_code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Procedure for Running the code
Step 1:
Modify the four parameters in P2PParameters.sh ( if necessary, as per your requirements )
Mobility="20" #May give a list of Different Mobilities
PauseTime="20" #May give a list of Different Pause Times
SimulationRepetitions="1 2 3" # 2 3 how many SimulationRepetitions you want to run the simulation with different network - finding average performance
NumberOfNodes="30 40 50 60" # 60 80 100 May give a list of Different number of Nodes
And then run the script as follows :
#bash GenerateNetworkScenario.sh
This will create the following scenario files
P2PNet-N60-Scen1-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N50-Scen2-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N50-Scen1-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N40-Scen3-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N40-Scen2-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N40-Scen1-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N60-Scen3-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N30-Scen3-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N60-Scen2-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N50-Scen3-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N30-Scen1-P20-M20-t100-X1000-Y1000.Scen
P2PNet-N30-Scen2-P20-M20-t100-X1000-Y1000.Scen
Step 2:
Run the simulations as follows : (Before that, here you have to change the file name as myP2PNetworkResourceDiscoverySimulation.tcl line 37 if not changed)
#bash RunP2PNetworkSimulations.sh
This will call the simulation script myP2PNetworkResourceDiscoverySimulation.tcl with different parameters and run the simulation repeatedly.
This will generate the following ns2 trace files :
P2PNetTrace-N30-Scen3-Queries10-AODV-StdRandomWalk.cust
P2PNetTrace-N30-Scen3-Queries10-AODV-StdFlooding.cust
etc
As well as it will generate the following custom trace files :
P2PNetTrace-N40-Scen3-Queries10-AODV-StdFlooding.trace
P2PNetTrace-N40-Scen2-Queries10-AODV-StdRandomWalk.trace
etc
Step 3:
Run custom trace analysis as follows :
#bash P2PAnalysis-I.sh
This will call the different awk scripts and do the trace analysis.
This will store the results in the following tables
P2P-StdRandomWalk-Analysis-I.tbl
P2P-StdFlooding-Analysis-I.tbl
Step 4:
Run ns2 event trace analysis as follows :
#bash P2PAnalysis-II.sh
This will call the different awk scripts and do the trace analysis.
This will store the results in the following tables
P2P-StdRandomWalk-Analysis-II.tbl
P2P-StdFlooding-Analysis-II.tbl
#bash PrepareMasterTable.sh
will prepare a master table from all the analysis II tables and store it in the name
MasterTable.tbl
Step 5:
Preparing xgraph version of graphs from the custom trace analysis output tables :
#bash PrepareGraphs-I.sh
This will prepare the graphs from the previously created .tbl files of Analysis I and plot them in separate windows
(This will create lot of *.dat files and create graphs from it)
Step 6:
Preparing xgraph version of graphs from the ns2 event trace analysis output tables :
#bash PrepareGraphs-II.sh
This will prepare the graphs from the previously created .tbl files of Analysis II and plot them in separate windows
(This will create lot of *.dat files and create graphs from it)
Step 7:
Preparing Gnuplot version of graphs from the custom trace analysis output tables :
#bash PrepareGnuplotGraphs-I.sh
This will prepare the gnuplot version of graphs from the previously created .tbl files of Analysis I and store them as .png files in the current folder
This will create the following 2 graphs
P2PResourceDiscoveryProtocol-ResourceDiscoveryTime.png
P2PResourceDiscoveryProtocol-SuccessRate.png
Step 8:
Preparing Gnuplot version of graphs from the ns2 event trace analysis output tables :
#bash PrepareGnuplotGraphs-II.sh
This will prepare the gnuplot version of graphs from the previously created .tbl files of Analysis II and store them as .png files in the current folder
This will create the following 8 graphs
P2PResourceDiscoveryProtocol-Delay.png
P2PResourceDiscoveryProtocol-Dropped.png
P2PResourceDiscoveryProtocol-MACLoad.png
P2PResourceDiscoveryProtocol-NRL.png
P2PResourceDiscoveryProtocol-Overhead.png
P2PResourceDiscoveryProtocol-PDF.png
P2PResourceDiscoveryProtocol-PowerConsumption.png
P2PResourceDiscoveryProtocol-Throughput.png