-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Information and Network Architectures #903
Open
orosoman-dstl
wants to merge
173
commits into
main
Choose a base branch
from
architecture_repr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 161 commits
Commits
Show all changes
173 commits
Select commit
Hold shift + click to select a range
ef5e909
test
orosoman-dstl e448647
building blocks
orosoman-dstl fa1d881
add architecture density and test for density function
spike-dstl 54e1468
Change structure, expand Architecture class
orosoman-dstl c30fa92
add progress on plot function in architecture class
spike-dstl 506c1ab
Create basic functionality for Architecture.plot method
orosoman-dstl c6eb678
Add shape colour functionality
spike-dstl 82db2bd
Node title font size and kind of working node labelling system
spike-dstl 4c11c41
Architecture.plot expansion. Allows specification of position, node s…
orosoman-dstl cebf0dd
Improvement to plot function
spike-dstl d567c40
Add SensorSuite function
spike-dstl c84aa39
Beginning of data measurement and propagation for architectures.
orosoman-dstl 50d4701
Fixes to code
spike-dstl 8f31038
Rough propogation for network architectures.
orosoman-dstl cb6ddf0
bug fixes/neatening for Node.update
orosoman-dstl 727a2c6
making architectures gooder
orosoman-dstl fb63b3b
bug/fixes for Node.process(). Made SingleProbabilityHypothesis hashable
orosoman-dstl f5c7e47
Quick fix to architecture _set_dict() method
orosoman-dstl 9324470
add message class
spike-dstl f1f9d31
Add send_message and open_message functions
spike-dstl 176f91f
Add latency, Edge, Edges
orosoman-dstl 05d2027
Adjustments to send_message and update_message functions to account f…
spike-dstl 4aa0e1b
Further changes to Message and Edge classes.
orosoman-dstl 4a318e1
added fixture to test_architecture
orosoman-dstl 3b74502
halfway to fixing architecture propagation
orosoman-dstl 60d85be
minor test changes and dictionary key change
spike-dstl 66e1231
small changes
orosoman-dstl a2484b9
bug fixing towards correct measurement
orosoman-dstl e6fb87b
bug fixing towards correct measurement again
orosoman-dstl 6ccd89c
bug fixin
orosoman-dstl 8630329
propagation now works fully without latency
orosoman-dstl a07cf0f
bug fixin
orosoman-dstl b412716
data is passed only along direct edges
orosoman-dstl 0e95ad2
MultiTargetFusionTracker started
orosoman-dstl 99c879c
Debugging with latency successful
orosoman-dstl 79bdc7a
Move into new architecture sub-module. Begin implementation of threading
orosoman-dstl 846ba16
Changes to improve plot aesthetics
spike-dstl ccb6689
Bug fix to base.py to allow circular imports
spike-dstl ebfe7b1
Progress on fusion algorithm
spike-dstl d91d2cb
more tracker progress
spike-dstl 1259fcc
Notes and minor tweaks on fusion tracker
orosoman-dstl 98f576c
Notes and minor tweaks on fusion tracker 2
orosoman-dstl 37afe45
Fusion Tracker updates
spike-dstl 6768800
More work on tracker, still not working
spike-dstl dba51f5
Add automated hierarchical node positioning for fusion architectures …
spike-dstl c66d70a
sketch changes to tracker
orosoman-dstl f20967b
sketch of fusion tracker
orosoman-dstl 2809e5d
Convert stonesoup.architectures from a directory to a Python Package.…
spike-dstl 8007d40
Add tests for architecture.py, small fixes to other architecture file…
spike-dstl 6e8eaec
Delete stonesoup.architecture directory file after replacement with p…
spike-dstl 033426f
neatening of architectures
orosoman-dstl 6594649
Add thread for tracker for FusionNode
sdhiscocks d22f2fb
Add plot_style parameter to Architecture plot function to allow hiera…
spike-dstl d0e3cf9
Add more tests for architecture.py
spike-dstl 1bfb83a
renaming to sender/recipient terminology in architectures module
orosoman-dstl f3d7583
Change logic of InformationArchitecture.is_centralised() to use corre…
spike-dstl 26cc798
beginning tests for node and edge class including conftest file
orosoman-dstl 3bc9ddf
Various modifications for track to track fusion
sdhiscocks 7f4fc10
completion of test_edge_init, additions to architectures conftests
orosoman-dstl a1be94d
Tests for all plotting and helper functions in stonesoup.architecture…
spike-dstl 063a4bc
Fix issue with duplicating tracks in architectures
sdhiscocks b8720f4
add to architectures test_edge
orosoman-dstl bfaae80
minor test_edge changes
orosoman-dstl 7f7cdb8
Move test_architecture.py fixtures to conftest.py and reconfigure tes…
spike-dstl d375fc4
Allow monitoring of queue consumption for fuse node queues
sdhiscocks 3559ab7
Add a WIP wrapper for switching between two updaters
sdhiscocks fea112b
Add docstrings to architecture.__init__.py
spike-dstl b47a61e
test_edge mostly finished
orosoman-dstl 822baf9
Make interface for FusionQueue clearer
sdhiscocks c22a10f
Allow architecture latency to be any type of number
sdhiscocks 42a50e4
Fix logic with FusionNode in architectures
sdhiscocks 46dc20e
finished test_edge in architectures
orosoman-dstl 6e07082
Added fixtures for fusion network to conftest.py and further tests to…
spike-dstl f9d05da
finished test_edge in architectures
orosoman-dstl 0204992
Remove timeout constraint on FuseNode in architectures
sdhiscocks daf46c9
Tests for architecture.__init__.py except for .propagate()
spike-dstl bf42cc7
finished test_functions
orosoman-dstl abbee37
Add tests for propagate function, test fails currently
spike-dstl 4125148
Fix propagate tests, Flake8 errors
spike-dstl 3529f9a
finished test_node
orosoman-dstl 6d9c4b7
add networkx and graphviz to requirements
orosoman-dstl 876b34a
Change to how DOT code is written in plot() function
spike-dstl 8288bf3
Version 1 of architecture tutorial. Fixes to allow nodes to be plotted.
spike-dstl 958a2a3
Add pydot to requirements. Updates to architecture plot() and relevan…
spike-dstl 31c4238
Progress on NetworkArchitecture
spike-dstl f208d5a
NetworkArchitecture propagate() added functionality for nodes that do…
spike-dstl d8c7ee4
Additional functionality to NetworkArchitecture to enable passing of …
spike-dstl 1439679
Fixes to NetworkArchitecture() to consider edge cases, added tests fo…
spike-dstl c02db32
Added architecture tutorials: Introduction to Architectures in Stone …
spike-dstl 42df16f
Add use_arival_time property to Achitecture class to allow simulation…
spike-dstl b5596fe
Add metric table generator for comparing two tracks to a truth
spike-dstl a390776
Deepcopy datapieces to allow fusion node to recieve both induvidually…
spike-dstl 33d2f72
Minor changes to docs prose
orosoman-dstl 04396d5
Fix image loading in architecture tutorial 3
spike-dstl 9c0e7ee
Fix grammar for architecture documentation
orosoman-dstl 7958015
minor additional spelling and grammar fixes
orosoman-dstl b5a7c15
Update CircleCI build to include architectures dependencies
jswright-dstl f0db7b3
Clean up comments and documentation. Get rid of an unnecessary function
orosoman-dstl 7ecbe2a
Fix minor bug in typing
orosoman-dstl f88368d
Fix failing test by changing method of adjusting data timestamps when…
spike-dstl d79dfbb
Fix short underlines causing bug in architectures tutorials
spike-dstl 6bcf76f
Change Edge.unsent_data() method to consider edges rather than recipi…
spike-dstl 6aa9a4b
Filter for duplicate data on fusion queue, update network arch propag…
spike-dstl 0317589
Simplify some architecture plotting and enable display in docs
sdhiscocks 09491da
Install graphviz on CircleCI to render architecture diagrams
sdhiscocks de6a516
Use node labels when plotting in info./net. architecture example
sdhiscocks 6eb99e6
Fix architecture tutorial thumbnail images and remove old images
sdhiscocks 277ba18
Fix architecture tutorial doc build warnings
sdhiscocks 4f380ac
Add InformationArchitectureGenerator and NetworkArchitectureGenerator…
spike-dstl 127aed2
Simplify node label generation and avoid duplicate node names
sdhiscocks 3a200fd
Fixes to generator to produce more realistic decentralised graphs
spike-dstl af4be32
Progress on MultiArchitectureGenerators
spike-dstl 5f31187
Functionality added to ArchitectureGenerator classes to allow creatio…
spike-dstl 780bcc5
Bug fixes for ArchitectureGenerator classes
spike-dstl 8c8e11d
Add tests for architecture generators
spike-dstl 1eaf361
Add node labels to nodes generated by ArchitectureGenerator classes
spike-dstl 583f215
Add detail to architecture tutorials
spike-dstl 08a13a0
progress towards architecture generator bugs
spike-dstl bef7265
Fix bug in Architecture.propagate causing unintended lag/OOSM
spike-dstl 378e755
Rework to ArchitectureGenerator logic to produce more feasible archit…
spike-dstl a8993f6
Merge branch 'architecture_generator' into architecture_repr
spike-dstl 7d92bd2
Apply easier to address suggestions from #903 code review
orosoman-dstl c539359
Change to SiapDiffTableGenerator to allow more than 2 sets of metrics
spike-dstl fed2f5a
Merge branch 'architecture_repr' of https://github.com/dstl/Stone-Sou…
spike-dstl c79c2a5
Update Architecture tutorials to newer versions
spike-dstl 19f08fa
Minor title change
d3f9f97
Remove commented cell from architecture tutorial 3
spike-dstl c175a64
Merge branch 'main' into architecture_repr
spike-dstl 10d96e0
Update architecture branch to use new radar sensor resolution parameter.
spike-dstl babf8d4
Update stonesoup/architecture/__init__.py
orosoman-dstl 2d6dba4
Update stonesoup/architecture/__init__.py
orosoman-dstl 2707f9c
Update stonesoup/architecture/__init__.py
orosoman-dstl 498b051
Update stonesoup/architecture/__init__.py
orosoman-dstl 6f837f6
fix indent bug
orosoman-dstl 019979a
flake-8 fixes
orosoman-dstl e993ad9
"Address review comments. Remove unnecessary code"
orosoman-dstl b3ba8cf
remove tests for fusion tracker
orosoman-dstl 1fae468
Use timedelta to add to a datetime
orosoman-dstl df8ba83
Slicing GroundTruthPath converts back to StateMutableSequence - corre…
orosoman-dstl 2a95fd0
cleanup and mopve towards tests passing
orosoman-dstl 7166770
minor changes
orosoman-dstl 95319c0
Fix bug caused by timedelta rounding to zero, Update fully propagated…
spike-dstl b26a993
Fix bug with Edge.unsent_data not accepting RepeaterNodes
spike-dstl f64d0ea
Fix flake-8 errors on Architecture module after bug fixes
spike-dstl a03822d
Add docstrings to architecture.__init__.py
spike-dstl 0da6703
Improved coverage on arhitecture tests
spike-dstl 8c794b5
improve coverage
orosoman-dstl b511737
fix error in test_edge.py
orosoman-dstl ffd7fc1
Fix to test_message_destinations. Add test_update_messages() to test …
spike-dstl 35e814c
Improve coverage of architecture.node.
spike-dstl bd622b8
remove unnecessary RuntimeError check in FusionQueue
orosoman-dstl c334831
Fix architecture tests
sdhiscocks a4e16d3
fix flake8 and tutorial prose
orosoman-dstl 6ac1984
flake8
orosoman-dstl ae5f690
bullet point fix
orosoman-dstl 0d33ffd
bullet points...
orosoman-dstl 4d55517
bullet points...
orosoman-dstl 96ab028
bullet points...
orosoman-dstl 6ab5d3b
Add description to architecture tutorial 3
spike-dstl 9bec8ba
minor grammar fixes
orosoman-dstl 01e00d8
backslash needed
orosoman-dstl f597e16
Arch Tutorial 3: Replace Siap metrics with covariance based metric.
spike-dstl 2888d30
refine architecture tutorial 3
orosoman-dstl 7077bee
fix bullet points againnn
orosoman-dstl 62dd910
fix bullet points againnnnn
orosoman-dstl f9fabc1
fix list
orosoman-dstl 3e651ae
fix list
orosoman-dstl f142cd1
bug fix
orosoman-dstl 56ba870
match propogates architecture
orosoman-dstl 494de0b
flake8
orosoman-dstl 7c661aa
the
orosoman-dstl 74808f9
fix list formatting
orosoman-dstl 49dd925
formatting
orosoman-dstl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions
125
docs/tutorials/architecture/01_Introduction_to_Architectures.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
""" | ||
=============================================== | ||
1 - Introduction to Architectures in Stone Soup | ||
=============================================== | ||
""" | ||
|
||
# %% | ||
# Introduction | ||
# ------------ | ||
# | ||
# The architecture package in Stone Soup provides functionality to build information and network | ||
# architectures, enabling the user to simulate sensing, propagation and fusion of data. | ||
# Architectures are modelled by defining the nodes in the architecture, and edges that represent | ||
# connections between nodes. | ||
# | ||
# Nodes | ||
# ----- | ||
# | ||
# Nodes represent points in the architecture that collect, process (fuse), or simply forward on | ||
# data. Before advancing, a few definitions are required: | ||
# | ||
# - Relationships between nodes are defined as parent-child. In a directed graph, an edge from | ||
# node A to node B means that data is passed from the child node, A, to the parent node, B. | ||
# | ||
# - The children of node A, denoted :math:`children(A)`, is defined as the set of nodes B, where | ||
# there exists a direct edge from node B to node A (set of nodes that A receives data from). | ||
# | ||
# - The parents of node A, denoted :math:`parents(A)`, is defined as the set of nodes B, where | ||
# there exists a direct edge from node A to node B (set of nodes that A passes data to). | ||
# | ||
# Different types of node can provide different functionality in the architecture. The following | ||
# are available in Stone Soup: | ||
# | ||
# - :class:`.~SensorNode`: makes detections of targets and propagates data onwards through the | ||
# architecture. | ||
# | ||
# - :class:`.~FusionNode`: receives data from child nodes, and fuses to achieve a fused result. | ||
# The fused result can be propagated onwards. | ||
# | ||
# - :class:`.~SensorFusionNode`: has the functionality of both a SensorNode and a FusionNode. | ||
# | ||
# - :class:`.~RepeaterNode`: does not create or fuse data, but only propagates it onwards. | ||
# It is only used in network architectures. | ||
# | ||
# Set up and Node Properties | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
from stonesoup.architecture.node import Node | ||
|
||
node_A = Node(label='Node A') | ||
node_B = Node(label='Node B') | ||
node_C = Node(label='Node C') | ||
|
||
# %% | ||
# The :class:`.~Node` base class contains several properties. The `latency` property gives | ||
# functionality to simulate processing latency at the node. The rest of the properties (`label`, | ||
# `position`, `colour`, `shape`, `font_size`, `node_dim`), are used for graph plotting. | ||
|
||
node_A.colour = '#006494' | ||
|
||
node_A.shape = 'hexagon' | ||
|
||
# %% | ||
# :class:`~.SensorNode` and :class:`~.FusionNode` objects have additional properties that must be | ||
# defined. A :class:`~.SensorNode` must be given an additional `sensor` property - this must be a | ||
# :class:`~.Sensor`. A :class:`~.FusionNode` has two additional properties: `tracker` and | ||
# `fusion_queue`.`tracker` must both be :class:`~.Tracker`\s - the main tracker manages the | ||
# fusion at the node, while the `fusion_queue` property is a :class:`~.FusionQueue` by default - | ||
# this manages the inflow of data from child nodes. | ||
# | ||
# Edges | ||
# ----- | ||
# An edge represents a link between two nodes in an architecture. An :class:`~.Edge` contains a | ||
# property `nodes`: a tuple of :class:`~.Node` objects where the first entry in the tuple is | ||
# the child node and the second is the parent. Edges in Stone Soup are directional (data can | ||
# flow only in one direction), with data flowing from child to parent. Edge objects also | ||
# contain a `latency` property to enable simulation of latency caused by sending a message, | ||
# separately to node latency. | ||
|
||
from stonesoup.architecture.edge import Edge | ||
|
||
edge1 = Edge(nodes=(node_B, node_A)) | ||
edge2 = Edge(nodes=(node_C, node_A)) | ||
|
||
# %% | ||
# :class:`~.Edges` is a container class for :class:`~.Edge` objects. :class:`~.Edges` has an | ||
# `edges` property - a list of :class:`~.Edge` objects. An :class:`~.Edges` object is required | ||
# to pass into an :class:`~.Architecture`. | ||
|
||
from stonesoup.architecture.edge import Edges | ||
|
||
edges = Edges(edges=[edge1, edge2]) | ||
|
||
|
||
# %% | ||
# Architecture | ||
# ------------ | ||
# Architecture classes manage the simulation of data propagation across a network. Two | ||
# architecture classes are available in Stone Soup: :class:`~.InformationArchitecture` and | ||
# :class:`~.NetworkArchitecture`. Information architecture simulates how | ||
# information is shared across the network, only considering nodes that create or modify | ||
# information. Network architecture simulates how data is actually | ||
# propagated through a network. All nodes are considered including nodes that don't open or modify | ||
# any data. | ||
# | ||
# A good analogy for the two is receiving a parcel via post. The "information architecture" is | ||
# from sender to receiver, the former who creates the parcel, and the latter who opens it. | ||
# However, between these are many unseen but crucial steps which form the "network architecture". | ||
# In this analogy, the postman never does anything with the parcel besides deliver it, so functions | ||
# like a Stone Soup :class:`~.RepeaterNode`. | ||
# | ||
# | ||
# Architecture classes contain an `edges` property - this must be an :class:`~.Edges` object. | ||
# The `current_time` property of an Architecture instance maintains the current time within the | ||
# simulation. By default, this begins at the current time of the operating system. | ||
|
||
# sphinx_gallery_thumbnail_path = '_static/sphinx_gallery/ArchTutorial_1.png' | ||
|
||
from stonesoup.architecture import InformationArchitecture | ||
|
||
arch = InformationArchitecture(edges=edges) | ||
arch |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this or the other two pngs still being used?