PARALLELIZATION STRATEGY ICTS2005 The Proceeding

Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005 ISSN 1858-1633 2005 ICTS 102 chosen and then behaviors of the lane members vehicle etc are simulated. This process is repeated for all of the lane. A lane is defined as a one-direction graph. A road may consist of several lanes. Figure 2 shows a road that consists of two lanes. In the developed simulator, the method of choosing a lane from the lane list is based on lane distance number. Here, each lane is defined to have a distance number. A distance number means the distance of the lane from the source of vehicle. Source of vehicle is a vehicle-generator that is placed in the boundary area of simulation to generate vehicle to be simulated. Figure 3 shows an example of lanes with its distance numbers. Veh. Source Distance = 1 Distance = 2 Distance = 2 Distance = 2 Distance = 4 Distance = 3 Distance = 5 Fig. 3 Distance number of lanes . The entire simulation is performed in the following steps: 1. Vehicle generation 2. Took a lane with distance number = DMAX maximum distance number 3. Simulate every body related to the lane 4. Choose another lane with the same distance number, go to step 3. 5. If all lane with same distance number has been simulated, decrease the distance number, choose one lane and go to step 3 6. If all lanes have been simulated, increase the simulation time, go to step 2. These steps are shown in Fig. 4.

3. PARALLELIZATION STRATEGY

Parallelization is not new in the area of traffic simulator. There are several works prior to this work [6]. However, the strategy of parallelization in this Simulation D=D-1 Search Lane Is Distance =D ? D = MAX Distance Another Distance =D ? Y Y Fig. 4 Serial Simulation Steps Fig 2. Two lanes form one road . A Parallel Road Traffic Simulator Core – Dwi Handoko, Wahju Sediono, Made Gunawan ISSN 1858-1633 2005 ICTS 103 work is based on the serial traffic simulator developed in this work. As described previously, the simulation method in the developed traffic simulator is based on lane-by- lane simulation. This method made easy of porting of the simulator to parallel execution. In this simulation strategy, the output of the lane with smaller distance number is the input of the lane with larger distance number. Therefore, lanes with larger distance number have to be simulated first before the lane with smaller distance number. However lanes with the same distance number are not affected each other, since they don’t have a direct connection. Hence, lanes with same distance number can be simulated in parallel. The simulation steps of parallel execution are as follow: 1. Vehicle generation 2. Took a lane with distance number = DMAX 3. Simulate every body related to the lane, simulated parallel for all lanes with the same number. 4. If all lanes with same distance number has been simulated, decrease the distance number, go to step 3 5. If all lanes have been simulated, increase the simulation time, go to step 2. These steps are shown in Fig.5. The parallel execution steps are in line with steps shown in Fig. 4 except that lanes with the same number are simulated parallel. This characteristic shows also an easy porting to parallel execution of the simulator program. Figure 3 only shows one source for vehicle generation. In this case it is easy to determine the distance number of the lane. However in real problem, there exist several sources of vehicle generator. One lane may have a distance number of x from one source of vehicle, but it also has a distance number of y from another source of vehicle. There should a rule for lane number decision. The rule for lane number decision in a simulation model with several sources for vehicle generation is as follow: 1. Choose one vehicle source 2. Set distance number of lanes based on the vehicle source 3. If the existing distance number of lane is larger than the new one, then the existing distance number is used. 4. Choose another vehicle source 5. Go to step 2 Figure 6 shows one example of distance number calculation with two vehicle sources according to the prescribed steps.

4. EXPERIMENTS AND DISCUSSION