-
Notifications
You must be signed in to change notification settings - Fork 0
/
exampleintersection_v1_1.sh
executable file
·59 lines (45 loc) · 4.02 KB
/
exampleintersection_v1_1.sh
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
#!/bin/bash
# This bash script is used to run the simulations for: 5g.cc
./waf configure
#change bandwith to 1e7 for 4G LTE signal
bandwidth=1e8
#change frequency to 0.7, 0.85,1.7,1.9,2.1 for 4G LTE, 28 39 47 73.5 for 5G 39e9 47e9 73.5e9
frequency=28e9
interPacketInterval=30
speed=20
#three weather impacts, need to change in for loops
particleradius=0.0002
visibility=0.002
humidity=60
intraGroupDistance=40
environment1="l" # the parameter defines the channel condition, l
environment2="v" # the parameter defines the channel condition, v
environment3="n" # the parameter defines the channel condition, n
commScenario1="V2V-Highway" # communication environment
commScenario2="V2V-Urban" # communication environment
commScenario3="Extended-V2V-Highway" # communication environment
commScenario4="Extended-V2V-Urban" # communication environment
./waf --run "intersection_v1_1 --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --Pvalue=$particleradius --Vvalue=$visibility --Hvalue=$humidity --channel_condition=$environment1 --scenario=$commScenario1"
#three nested for loops works for setting up experiments for weather impacts, also add one for loop for frequency
<<comment
for frequency in 28e9 ; do
for particleradius in $(seq 0.0000 0.00005 0.0009); do
for visibility in $(seq 0.000 0.0005 0.005); do
for humidity in $(seq 0 20 100); do
./waf --run "intersection_v1_1 --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --Pvalue=$particleradius --Vvalue=$visibility --Hvalue=$humidity --channel_condition=$environment1 --scenario=$commScenario1"
done
done
done
done
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment1 --scenario=$commScenario2"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment1 --scenario=$commScenario3"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment1 --scenario=$commScenario4"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment2 --scenario=$commScenario1"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment2 --scenario=$commScenario2"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment2 --scenario=$commScenario3"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment2 --scenario=$commScenario4"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment3 --scenario=$commScenario1"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment3 --scenario=$commScenario2"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment3 --scenario=$commScenario3"
./waf --run "5g --bandwidth=$bandwidth --frequency=$frequency --iip=$interPacketInterval --speed=$speed --intraGroupDistance=$intraGroupDistance --channel_condition=$environment3 --scenario=$commScenario4"
comment