Initialization |
: denotes the theoretical passing time of pedestrians |
: denotes the theoretical passing time of the vehicle |
: denotes the number of pedestrians |
: denotes the maximum number of the Monte-Carlo simulation |
Set , , , , , , Nstag, , in which: |
: The number of times of vehicle passes under zero-step mode |
: The number of times of pedestrians passes under zero-step mode |
: The number of times of vehicle passes under one-step mode |
: The number of times of pedestrians passes under one-step mode |
: The number of times of vehicle passes under two-step mode |
: The number of times of pedestrians passes under two-step mode |
stag: The number of times of stagnation of the pedestrians and vehicle |
coll: The number of times of collision of the pedestrians and vehicle |
Repeat the Monte-Carlo simulation times |
for to |
Determine the estimated passing time and probability of the dominant strategy for each pedestrian and vehicle |
Generate random numbers , , and satisfying the normal distribution |
Calculates and |
Assess whether the pedestrians and driver can achieve common knowledge under zero-step mode |
Generate random numbers: |
ifany |
|
else if all |
|
else |
Assess whether the pedestrians and driver can achieve common knowledge under one-step mode |
Calculates the acceleration probability of pedestrians and vehicle and |
Generate random numbers: |
if any |
|
else if all |
|
else |
Assess whether the pedestrians and driver can achieve common knowledge under two-step mode |
Calculates the acceleration probability of pedestrians and vehicle and |
Generate random numbers: |
if any , |
|
else if all , |
|
else if all |
|
else if any , , |
|
end |
end |
end |
end |