dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
388 stars 128 forks source link

improve solution for R-tree key error #782

Open rcgorman-dstl opened 1 year ago

rcgorman-dstl commented 1 year ago

generate_hypotheses method in TPRTreeMixIn class in tree.py file was previously throwing key errors when finding intersections in some loop iterations. Try/except block was added to reset TPR tree when key error is encountered and rebuild the TPR tree from scratch as a workaround to run successfully. As key errors are frequent, this is likely increasing run time of data association using TPR tree and resulting in sub-optimal performance. It is not clear why key errors are thrown in the first place so this requires further investigation so a better fix can be provided.