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

Transition and measurement models for road networks

Open sglvladi opened this issue 2 years ago • 2 comments

This PR aims to add the following:

  • RoadNetwork type:
    • A subclass of networkx.DiGraph, with some limitations on the allowed node and edge attributes, and some additional methods.
  • OptimalPathToDestinationTransitionModel transition model:
    • A transition model that models a target travelling along the optimal path to a destination, on a given road network.
  • OptimalPathToDestinationMeasurementModel measurement model:
    • A measurement model that projects the target's position on the road network to a 2D position.

TODO

  • [x] Add tests
  • [ ] Remove/Reformat example

sglvladi avatar Jun 02 '23 13:06 sglvladi

Codecov Report

Attention: Patch coverage is 96.17647% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 93.56%. Comparing base (7fce938) to head (0f13262). Report is 23 commits behind head on main.

Files Patch % Lines
stonesoup/models/transition/graph.py 90.10% 4 Missing and 5 partials :warning:
stonesoup/models/measurement/graph.py 92.68% 0 Missing and 3 partials :warning:
stonesoup/functions/graph.py 98.03% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
+ Coverage   93.49%   93.56%   +0.06%     
==========================================
  Files         200      204       +4     
  Lines       12715    13055     +340     
  Branches     2615     2685      +70     
==========================================
+ Hits        11888    12215     +327     
- Misses        585      590       +5     
- Partials      242      250       +8     
Flag Coverage Δ
integration 65.26% <22.05%> (-1.16%) :arrow_down:
unittests 89.26% <96.17%> (+0.22%) :arrow_up:

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

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

codecov[bot] avatar Mar 18 '24 14:03 codecov[bot]

@jswright-dstl, @sdhiscocks this PR is ready for review. I've left the example in for now to help with the review, but plan to remove it before merging.

sglvladi avatar Mar 18 '24 14:03 sglvladi

@sglvladi

I'm happy to approve this PR once the demo scripts have been reformatted into an example. I've ran the scripts locally and think the content is there to make an example - the plots are especially convincing!

hpritchett-dstl avatar May 21 '25 12:05 hpritchett-dstl

Thanks @hpritchett-dstl . Working on that as we speak. Will push changes later today.

sglvladi avatar May 21 '25 12:05 sglvladi

@hpritchett-dstl Done. Failing tests seem to be unrelated to the introduced code.

I was a little unsure as to whether the docs script would fit better under the demos section (since it is a reproduction of publication results), or under the examples. Given that it is the only road network example, I have provisionally added it under examples. Happy to move it.

sglvladi avatar May 21 '25 17:05 sglvladi