• 沒有找到結果。

In this chapter, we evaluate the simulation performance of NCTUns with respect to the elapsed time and the physical memory usage of each run-time component, including the simulation server, the car agent, and the signal agent. Two important system parameters are investigate: the number of road blocks and the number of vehicles deployed in a simulated wireless vehicular communication network. The simulation machine used in the evaluations is a desktop computer equipped with a P4 2.53 GHz CPU and 1 GB RAM. The total time to be simulated for each simulation case is set to 500 seconds. Each simulation case is run 10 times to collect the average results.

The topology of the road network is a 6x6 grid network, as shown in Figure 6.1.

The edge length of each grid is 1 Km. Thus, the simulated field covers an area of 36 Km2. The edge of a grid is a road that is formed by four lanes. Each lane is in turn formed by a single or multiple road block(s). In the grid road network, a crossroad is positioned at each intersection.

The car profile settings and distribution shown in Table 6.1 are applied to all simulation cases. Currently, we use the maximum (allowable) speed of a vehicle as the desired maximum speed for its driver. The maximum speed settings and distribution reflect the normal driving speeds (from 40 Km/hr to 80 Km/hr) in a urban area, where the road network is similar to the used grid topology. The range

Road Block 6 Km

6 Km

1 Km

Road

Lane 4

Lane 3

Lane 2

Lane 1

Figure 6.1: The topology of the grid road network used for performance evaluation Table 6.1: Car profile settings and distribution

Profile Number 1 2 3 4 5

Percentage 10% 35% 35% 15% 5%

Max Speed (m/s) 11 14 17 19 22

Max Acceleration (m/s2) 1.1 1.4 1.7 1.9 2.2 Max Deceleration (m/s2) 3.67 4.67 5.67 6.33 7.33

of the used maximum accelerations reflects the characteristic of a normal vehicle that can accelerate from 0 Km/hr to its maximum speed in about ten seconds.

Finally, the range of the used maximum decelerations reflects the characteristic of a normal vehicle that can decelerate from its maximum speed to 0 Km/hr in about three seconds.

Regarding the network communication scenario, the car agent running on each vehicle is programmed to broadcast a 1084-byte UDP packet (1056 bytes for the data payload, 20 bytes for the IP header, and 8 bytes for the UDP header) once per second to the vehicles located within its wireless transmission range. A simplified wireless PHY-layer module is used, which uses 250 and 550 meters as the wireless

transmission range and interference range, respectively. The used wireless MAC-layer module is based on the IEEE 802.11b standard. No routing protocol is adopted because all packet transmissions are based on broadcast.

6.1 Number of Road Blocks

In the first evaluation, in total 200 vehicles are deployed in each of the five simulation cases. Without changing the topology shown in Figure 6.1, we vary the number of road blocks on each lane from 1 to 5 in the five cases by purposely using different sizes of road blocks. Therefore, we deploy 385, 721, 1,057, 1,393, and 1,729 road blocks in these cases, respectively. The total number of road blocks deployed in a case can be calculated by the formula: [Number of Crossroad + (Number of Roads ∗ Number of Lanes on each Road ∗ Number of Road Blocks on each Lane)].

Because the size of the area of the road network is kept the same in all cases, the density of vehicles on the road network is the same in all cases. This keeps the simulation overhead of broadcasting UDP packets about the same in all cases.

Increasing the number of road blocks will increase the size of the road network database. This may increase the memory space usage of each car agent as it needs to store every road block information into its road network database. This may also increase the number of query in a car agent to searches for the information of a road block. For example, every time when a vehicle reaches the end of a road block, it needs to get the information of the new road block ahead of it. Thus, when the number of road blocks increases, we expect to see increased physical memory usage for a car agent and increased time for running a simulation (i.e., the elapsed time).

The results shown in Table 6.2 confirm the above conjectures. One sees that the elapsed time increases slightly as the number of road blocks increases. In addition, as expected, the physical memory usage of a car agent increases slightly as the num-ber of road blocks increases. The slight performance change between two adjacent cases indicates that the number of road block has little impact on the simulation performance of NCTUns.

Table 6.2: Elapsed time and physical memory usage in each case with different number of road blocks

Simulation Settings

Number of Vehicles 200

Number of Crossroads 49

Number of Roads 84

Number of Lanes on each Road 4

Number of Road Blocks on each Lane 1 2 3 4 5

Total Number of Road Blocks 385 721 1,057 1,393 1,729 Simulation Results

Elapsed Time (min) 17.3 20.1 20.6 21.3 21.9 Physical Memory Usage of

the Simulation Server (MB) 15.22 15.85 15.87 15.85 15.85 Physical Memory Usage of

a Car Agent (MB) 2.14 2.20 2.27 2.34 2.75

Physical Memory Usage of

a Signal Agent (MB) 1.08 1.08 1.08 1.08 1.08

6.2 Number of Vehicles

In the second evaluation, in total 1,729 road blocks are deployed in each of the five simulation cases. We deploy 250, 350, 450, 550, 650, 750, and 850 vehicles in these cases, respectively.

Because the total number of road blocks is the same in all cases, a car agent’s run-time overhead on the road network database, such as the number of queries to the database and the memory consumption for storing the database, is the same in all cases. Increasing the number of vehicles will increase the vehicle density on the road network. Therefore, the simulation server needs to spend more time on broadcasting and receiving more UDP packets. Also, the simulation server needs to consume more memory space for storing these UDP packets during simulation.

Table 6.3: Elapsed time and physical memory usage in each case with different number of vehicles

Simulation Settings

Number of Road Blocks 1,729

Number of Vehicles 250 350 450 550 650 750 850

Simulation Results

Elapsed Time (min) 55.8 108.7 173.2 244.6 341.9 456.1 525.3 Ratio of Simulated Time

to Elapsed Time 1:7 1:13 1:21 1:29 1:41 1:55 1:63 Physical Memory Usage of

the Simulation Server (MB) 29 37 46 57 70 85 110

Physical Memory Usage of

a Car Agent (MB) 2.75 2.75 2.75 2.75 2.75 2.75 2.75 Physical Memory Usage of

a Signal Agent (MB) 1.08 1.08 1.08 1.08 1.08 1.08 1.08

Thus, it is expected to see increased time for running the simulation and increased physical memory usage for the simulation server.

The results shown in Table 6.3 confirm the above conjectures. One sees that the elapsed time and the physical memory usage of the simulation server increase with the number of vehicles deployed on the road network. In addition, the case with 850 vehicles requires about 525 minutes to complete the 500-second simulation. The ratio of simulated time to elapsed time is about 1:63. In other words, in this case, the advance of the simulated virtual time is 63 times slower than that of the real time.

Chapter 7

相關文件