Thank you Paolo,
I also thought about using instances or objects however I have (only sometimes) just exactly the same thing on different possions in the tree.
[SNIP]
Hi Peter,
If I understand you correctly, you are saying that (only occasionally) you have the same object more than once in the same diagram (hierarchy).
I'm going to define some terms because even in English most people don't make correct distinctions between them and thereby cause confusion.
Hierarchy: A directed graph where each node
may have superordinate level nodes (parents) and
may subordinate level nodes (children). Hierarchies come in two possible forms: Trees and Lattices.
Tree: A hierarchy where each node has
at most one superordinate (parent) node.
Lattice: A hierarchy where each node may
have more than one superordinate (parent) node.
With those definitions in mind, if the same node appears more than once in the graph (which is your model) then you don't have a tree, you have a lattice. Why is this "pickyness (pedantry)" important? Because it gets tot he heart of what we are doing.
We should not be trying to render a tree if we don't have one. That's "lying"! (Or at least a form of Stephen Colbert's "Truthiness")
As I said in the earlier post, we initially
thought (in our Risk Analysis case) we had the same item multiple times but we eventually UNDERSTOOD that we didn't.
So my strong suggestion is that you have another look at the theory of what you are trying to do and determine if (because of the the theoretical first principles you are using) you will
always have tree or if you actually have a lattice that most often reduces to a tree. If the latter, then you shouldn't force the lattice to look like a tree when it actually isn't. If the lattice reduces to a tree (in any arbitrary case) then so be it.
Let us know how you go, as I'm likely to want to do something similar as we expand our risk analysis aspect.
HTH,
Paolo