need feedback on matching-algorithm for upcomming TMC-import

I need some feedback on the algorithm I sketched out using pseudocode on

What would be the best aproach if a segment/area/road is not a present in OSM
by a matching type=route -relation of it the combined members of such a relation
do not match?