Research Article

A Mixed-Flow Cellular Automaton Model for Vehicle Nonstrict Priority Give-Way Behavior at Crosswalks

Algorithm 1

The algorithm of mixed-flow CA model.
Step 1: driving rule.
 Step 1.1: input the current vehicle position ; current vehicle velocity ; a randomization with probability .
 Step 1.2: if the vehicle position is at decision point (equation (1)), then go to Step 2.
 Step 1.3: if the vehicle position +> boundary, then vehicles will leave the road.
 Step 1.4: the vehicle adjusts velocity according to the distance to the front vehicle; go to Step 4.
Step 2: decision point rule.
 Step 2.1: input the current bicycle positions and current bicycle velocities and .
 Step 2.2: assume that there exists a time , . If and , then the vehicle will crash with bicycles. This vehicle needs to stop at the conflict area boundary and go to Step 3.
 Step 2.3: if the driver chooses to give way, then go to Step 2.2; if the driver chooses nonstrict priority give way, then go to Step 4. The vehicle velocity is given by equation (4).
Step 3: launching rule.
 Step 3.1: input the current bicycle positions, current bicycle velocities and , and waiting time .
 Step 3.2: assume that there exists another time and the acceptable gap is given by equation (6). If the driver chooses to give way and , then the vehicle continues to wait; for waiting time, add 1; if the driver chooses nonstrict priority give way, then go to Step 4. The vehicle velocity .
 Step 3.3: if the waiting time is longer than T, the vehicle will launch into the conflict area, and bicycles will be forced to stop.
Step 4: movement.
 Update the position of vehicles and bicycles based on their velocities and ,. For the vehicle, , . For the bicycle, ,.