Stone-Soup icon indicating copy to clipboard operation
Stone-Soup copied to clipboard

One to one Assignment for Association

Open orosoman-dstl opened this issue 2 years ago • 2 comments

Created a new CompoundTimeRange class, a container class for TimeRange. This allows much greater flexibility for association objects, for example to associate two objects between the ranges [a,b] and [c,d] in a single TimeRangeAssociation.

New additions were made to the AssociationSet class mainly to reflect these changes.

The last main change was the new multidimensional_deconfliction algorithm. This is a very rudimentary but hopefully functional algorithm to ensure an AssociationSet has no associations that conflict - we can't have two different associations involving the same object at any given time. The algorithm is very basic, simply using the total length of an association as a proxy for strength of association, but I believe the groundwork has been laid to quickly implement something more advanced much more easily now.

orosoman-dstl avatar Jun 27 '22 11:06 orosoman-dstl

So TimeRange/s now inherits from Interval/s. I had to make a few changes to the latter classes due to a few edge cases not being accounted for - eg interval.isdisjoint(interval) was returning True, which is of course incorrect. I also changed the attribute names for both classes to "start" and "end", a good compromise hopefully between an implication of chronology for TimeRange/s, while still keeping it more generic for Interval/s. There may be further room to combine the classes - I will review tomorrow.

orosoman-dstl avatar Sep 05 '22 17:09 orosoman-dstl

Codecov Report

Patch coverage: 83.48% and project coverage change: -0.34% :warning:

Comparison is base (7e654c3) 94.43% compared to head (c7430d9) 94.10%. Report is 441 commits behind head on main.

:exclamation: Current head c7430d9 differs from pull request most recent head 5045a47. Consider uploading reports for the commit 5045a47 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
- Coverage   94.43%   94.10%   -0.34%     
==========================================
  Files         171      168       -3     
  Lines        8794     8531     -263     
  Branches     1707     1321     -386     
==========================================
- Hits         8305     8028     -277     
- Misses        352      359       +7     
- Partials      137      144       +7     
Flag Coverage Δ
integration 68.13% <38.64%> (-1.23%) :arrow_down:
unittests 92.14% <83.48%> (+1.41%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
stonesoup/metricgenerator/basicmetrics.py 100.00% <ø> (ø)
stonesoup/dataassociator/tracktotrack.py 92.25% <50.00%> (-1.17%) :arrow_down:
stonesoup/metricgenerator/tracktotruthmetrics.py 98.44% <80.00%> (-1.56%) :arrow_down:
stonesoup/dataassociator/_assignment.py 88.88% <81.35%> (-2.19%) :arrow_down:
stonesoup/types/time.py 83.76% <83.33%> (-16.24%) :arrow_down:
stonesoup/types/association.py 90.82% <86.30%> (-4.30%) :arrow_down:
stonesoup/types/interval.py 96.45% <86.84%> (-2.74%) :arrow_down:

... and 3 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 05 '22 18:09 codecov[bot]

Hopefully everything is now sorted - please have a peek when possible!

orosoman-dstl avatar Jul 18 '23 11:07 orosoman-dstl