Download Programmers Manual - RSAP

Transcript
more and more cases are added to the database. Although the accuracy of the analysis is
expected to increase as the number of “applicable” trajectories increases, the time for
completing the analysis will also increase. It is assumed that a maximum of forty
trajectories will provide sufficient accuracy with acceptable analysis time; however, the
maximum number of trajectory cases is defined on the RSAPv3 Control Form, where it
can be readily changed. The following lines of code (1) sort the composite scores in
descending order, (2) selects the trajectories cases with the highest scores for use in the
analysis, (3) determines the lowest composite score and the average composite score of
the selected trajectory cases.
Call MatrixSort({sort trajectory scores in descending order})
sumTrajscore = 0 ' initialize sum of trajectories scores
Do While {number of selected cases} < {min number} Or {composite score} >
0.93_
And {number of selected cases} < Application.Max({min number}, {max
number})
num_traj(iVeh) = num_traj(iVeh) + 1 ‘ increase count of selected
trajectory cases
sumTrajscore = sumTrajscore + {current trajectory score}
Loop
minTrajscore = {minimum value of selected trajectory scores}
avgTrajscore = sumTrajscore / num_traj(iVeh)
Redefine the Selected Trajectory Cases Based on Traffic Direction and Departure
Side
As discussed earlier, the trajectory paths in the trajectory database have all been
normalized to a local reference frame with positive path coordinates (e.g., consistent with
primary-right encroachments). The trajectory path data must be transformed to the global
coordinate frame for application in the analysis. The following lines of code re-dimension
the trajectory path variables and transform the trajectory path coordinates from local to
global coordinates for each trajectory case selected for the analysis.
ReDim trajx(num_veh, num_traj(iVeh), num_pre(iVeh) + 300)
ReDim trajy(num_veh, num_traj(iVeh), num_pre(iVeh) + 300)
ReDim MaxL(num_veh, num_traj(iVeh))
ReDim MinY(num_veh, num_traj(iVeh))
ReDim MaxY(num_veh, num_traj(iVeh))
For i = 1 To {total number of selected trajectories}
MinY(iVeh, i) = 1000000#
MaxY(iVeh, i) = -1000000#
C-103