17
by Maciej Muehleisen
Adjusted configBase to changes in libwns |
1 |
import openwns |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
2 |
from openwns.pyconfig import Frozen |
17
by Maciej Muehleisen
Adjusted configBase to changes in libwns |
3 |
import openwns.evaluation.default |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
4 |
|
5 |
import scenarios |
|
6 |
import scenarios.builders |
|
7 |
import scenarios.placer |
|
8 |
import scenarios.antenna |
|
85
by Maciej Muehleisen
Moved channel models from wimac to scenario. |
9 |
import scenarios.channelmodel |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
10 |
|
11 |
import ip |
|
12 |
import ip.BackboneHelpers |
|
13 |
||
14 |
import wimac.support.nodecreators |
|
15 |
import wimac.support.helper |
|
8.1.1
by Daniel Bültmann
Migration to openwns.evaluation |
16 |
import wimac.evaluation.default |
39
by Maciej Muehleisen
Reenabling basic test |
17 |
import wimac.support.PostProcessor as PostProcessor |
1
by Daniel Bültmann
Initial import |
18 |
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
19 |
from wimac.support.WiMACParameters import ParametersOFDM, ParametersMAC |
20 |
||
1
by Daniel Bültmann
Initial import |
21 |
import random |
22 |
random.seed(7) |
|
23 |
||
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
24 |
# Global station id generator
|
25 |
def stationID(): |
|
26 |
id = 1 |
|
27 |
while (True): |
|
28 |
yield id |
|
29 |
id += 1 |
|
30 |
||
31 |
stationIDs = stationID() |
|
1
by Daniel Bültmann
Initial import |
32 |
|
33 |
associations = {} |
|
34 |
||
35 |
####################################################
|
|
36 |
### Distinguished Simulation Settings #
|
|
37 |
####################################################
|
|
38 |
class Config(Frozen): |
|
39 |
# Set basic WiMAX Parameters
|
|
40 |
parametersPhy = ParametersOFDM |
|
41 |
parametersMAC = ParametersMAC |
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
42 |
|
39
by Maciej Muehleisen
Reenabling basic test |
43 |
parametersPhy.slotDuration = 3.0 * parametersPhy.symbolDuration |
87
by Benedikt Wolz
center frenquncy defined by config.py but not fixed |
44 |
centerFrequency = 5470 |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
45 |
numberOfTimeSlots = 100 |
46 |
||
47 |
packetSize = 2400.0 |
|
40
by Maciej Muehleisen
Harmonized config between Base and Bypass. |
48 |
trafficUL = 5E5 # bit/s per station |
49 |
trafficDL = 5E5 # bit/s per station |
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
50 |
|
39
by Maciej Muehleisen
Reenabling basic test |
51 |
noIPHeader = True #Set to true to set IP header to 0 |
52 |
probeWindowSize = 0.01 # Probe per frame |
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
53 |
scheduler = "RoundRobin" # "PropFair" |
71
by Maciej Muehleisen
Activated delta probes. Added settlingTime. |
54 |
|
55 |
settlingTime = 0.0 |
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
56 |
|
57 |
# General Setup
|
|
18.1.3
by Adalbert Kutz
Adjusted for openWNS |
58 |
WNS = openwns.Simulator(simulationModel = openwns.node.NodeSimulationModel()) |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
59 |
openwns.setSimulator(WNS) |
41
by Maciej Muehleisen
Reduced simTime which was accidently set too long |
60 |
WNS.maxSimTime = 0.07999 # seconds |
1
by Daniel Bültmann
Initial import |
61 |
WNS.masterLogger.backtrace.enabled = False |
28
by Maciej Muehleisen
Adjusted to removed DLLBase |
62 |
WNS.masterLogger.enabled = True |
18.1.3
by Adalbert Kutz
Adjusted for openWNS |
63 |
WNS.outputStrategy = openwns.simulator.OutputStrategy.DELETE |
27.1.1
by Maciej Muehleisen
Changed to one far and one near SS, enabled to select new Scheduler |
64 |
WNS.statusWriteInterval = 30 # in seconds |
40
by Maciej Muehleisen
Harmonized config between Base and Bypass. |
65 |
WNS.probesWriteInterval = 300 # in seconds |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
66 |
|
67 |
# Pass WiMAX Phy parameters to wimac::parameter::PHY singleton
|
|
1
by Daniel Bültmann
Initial import |
68 |
WNS.modules.wimac.parametersPHY = Config.parametersPhy |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
69 |
|
70 |
WNS.modules.rise.debug.antennas = True |
|
71 |
||
72 |
# Create and place the nodes:
|
|
73 |
# One BS (25m omnidirectional antenna height) with two nodes, one near, one far
|
|
74 |
||
75 |
bsPlacer = scenarios.placer.HexagonalPlacer(numberOfCircles = 0, interSiteDistance = 100.0, rotate=0.0) |
|
59.1.12
by Maciej Muehleisen
New MCSs cause new reference results. Reduced PDU size in Bypass test to fit with most robust MCS. |
76 |
uePlacer = scenarios.placer.LinearPlacer(numberOfNodes = 2, positionsList = [10, 4000]) |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
77 |
bsAntenna = scenarios.antenna.IsotropicAntennaCreator([0.0, 0.0, 5.0]) |
78 |
bsCreator = wimac.support.nodecreators.WiMAXBSCreator(stationIDs, Config) |
|
79 |
ueCreator = wimac.support.nodecreators.WiMAXUECreator(stationIDs, Config) |
|
85
by Maciej Muehleisen
Moved channel models from wimac to scenario. |
80 |
channelmodelcreator = scenarios.channelmodel.TestChannelModelCreator() |
67
by Xiaoniu Yang
made it compatible with scenarios changes about set channel model |
81 |
scenarios.builders.CreatorPlacerBuilder(bsCreator, bsPlacer, bsAntenna, ueCreator, uePlacer, channelmodelcreator) |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
82 |
|
59.1.1
by Maciej Muehleisen
Adjustments to config to include right TX power and noise figure. Reference outputs changed due to UT noise figure. |
83 |
wimac.support.helper.setupPhy(WNS, Config, "LoS_Test") |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
84 |
|
76
by Benedikt Wolz
add code example experiment 2 |
85 |
# begin example "wimac.tutorial.experiment2.staticFactory.substrategy.ProportionalFair.config.py"
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
86 |
wimac.support.helper.setupScheduler(WNS, Config.scheduler) |
76
by Benedikt Wolz
add code example experiment 2 |
87 |
# end example
|
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
88 |
|
89 |
# Set IP Header to 0 (else it is 20 byte)
|
|
39
by Maciej Muehleisen
Reenabling basic test |
90 |
if Config.noIPHeader: |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
91 |
wimac.support.helper.disableIPHeader(WNS) |
92 |
||
93 |
# Always create uplink traffic, if traffic UL is 0 we sent exacly
|
|
94 |
# one packet for initialization
|
|
95 |
wimac.support.helper.createULPoissonTraffic(WNS, Config.trafficUL, Config.packetSize) |
|
96 |
||
97 |
# Only create downlink traffic if we have any
|
|
98 |
if Config.trafficDL > 0.0: |
|
99 |
wimac.support.helper.createDLPoissonTraffic(WNS, Config.trafficDL, Config.packetSize) |
|
100 |
||
101 |
# Configure the window probes
|
|
102 |
wimac.support.helper.setL2ProbeWindowSize(WNS, Config.probeWindowSize) |
|
103 |
||
104 |
||
105 |
# DHCP, ARP, DNS for IP
|
|
106 |
ip.BackboneHelpers.createIPInfrastructure(WNS, "WIMAXRAN") |
|
107 |
||
59.1.6
by Maciej Muehleisen
Recorded new probes because of changed sorting. |
108 |
utNodes = WNS.simulationModel.getNodesByProperty("Type", "UE") |
109 |
bsNodes = WNS.simulationModel.getNodesByProperty("Type", "BS") |
|
110 |
||
111 |
||
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
112 |
# Probe configuration
|
1
by Daniel Bültmann
Initial import |
113 |
loggingStationIDs = [] |
114 |
||
59.1.6
by Maciej Muehleisen
Recorded new probes because of changed sorting. |
115 |
for node in utNodes + bsNodes: |
59
by Maciej Muehleisen
Restructured and cleaned up config to use scenario builder. Preparation for IMT-Advanced scenarios |
116 |
loggingStationIDs.append(node.dll.stationID) |
39
by Maciej Muehleisen
Reenabling basic test |
117 |
|
71
by Maciej Muehleisen
Activated delta probes. Added settlingTime. |
118 |
wimac.evaluation.default.installDebugEvaluation(WNS, loggingStationIDs, Config.settlingTime, "Moments") |
39
by Maciej Muehleisen
Reenabling basic test |
119 |
|
69
by Maciej Muehleisen
Increased number of CIDs produces more wakeUp() calls, drawing more rnd numbers in FlowSep. Removed OverFrameEval from reference output. |
120 |
#wimac.evaluation.default.installOverFrameOffsetEvaluation(WNS,
|
121 |
# Config.parametersPhy.symbolsFrame,
|
|
122 |
# [1],
|
|
123 |
# loggingStationIDs)
|
|
26
by Maciej Muehleisen
Enabled C,I,CIR over SymbolInFrame Plot2D Probe |
124 |
|
59.1.18
by Maciej Muehleisen
Added commented out schedule time series probe |
125 |
# Enable probe showing when which user starts and stops transmitting.
|
126 |
# Produces a lot of output and should only be used for short runs
|
|
127 |
||
128 |
#wimac.evaluation.default.installScheduleEvaluation(WNS, loggingStationIDs)
|
|
129 |
||
17
by Maciej Muehleisen
Adjusted configBase to changes in libwns |
130 |
openwns.evaluation.default.installEvaluation(WNS) |