congestion curve extracted from the current data is computed and placed in a u201c min heap u201d i e a data structure that maintains candidates sorted in ascending order by the distance values if the current data has not observed congested conditions in the past 40 minutes then the current condition is identified as being non congested roadway conditions congested or non congested from historical data with the three closest distance values are selected as prediction candidates the process of assigning distance values to pairs of current and historical roadway conditions and consecutive selection of the three pairs with smallest distance values is called u201c curve matching u201d of the roadway condition patterns once prediction candidates are identified 24 hour segments corresponding to prediction candidates are traced for each of the prediction lengths i e 15 30 60 120 mins from the current time of the day and these values are recorded as prediction candidate values when a prediction candidate belongs to a group of conditions the average of the data values for that time of the day across all members of the groups is used as the prediction candidate value a weighted average of the three prediction candidate values for each prediction length is used as the final prediction distance values used in picking.