I want to model lots of flows across a lattice of nodes.
The simple way is to simply model flow as a series of a flowsTo b
relations - but this raises a problem where different flows cross a common lattice point, and what should remain as two independent flows merges into something less helpful.
So using the example above,
b flowsTo e
e flowsTo g
and
c flowsTo e
e flowsTo f
Describe two flows (the orange and purple ones) - but if modelled simply like this in RDF, loses the distinction between these two flows.
An alternative might be to have flow-specific predicates, such as a flowsToNameX b
, and a flowsToNameY c
, but as the number of flows increases, what I need is a way to collect all of these as a single collection.
Again, referring to the diagram, this might look like:
a RedFlowTo d
d RefFlowTo h
b OrangeFlowTo e
e OrangeFlowTo g
c PurpleFlowTo e
e PurpleFlowTo f
One way of doing this might be to define flowsToNameX
and flowsToNameY
as instances of some flow
class, but I've not come across this pattern anywhere in the literature.
This works fine for 3 flows, but I'm looking at modelling thousands of these separate paths, across a similar number of nodes. So named instance (i.e. flow) -level predicates are fine, but I'd like to be able to work with them using a common set of interfaces so I can express concepts like upstream
and downstream
etc, and query the RDF using as general a form as possible.
This must be a common pattern, are there any best-practice approaches to modelling it?