+ Reply to Thread
Results 1 to 1 of 1

modelling a path through a hierarchy

  1. #1
    Registered User
    Join Date
    06-10-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2019 for Mac
    Posts
    26

    Unhappy modelling a path through a hierarchy

    Hi. I've made one or two posts about this before (here's my original one), but I think I still need some help.

    I've been trying to make a formula that returns, per node in a hierarchical-type diagram, the number of steps required to be adjacent to that node (given certain criteria outlined at the end of this post). I think I've actually nearly done it, but I can't figure out the last part. I've made this diagram to try to make things easier to understand:

    Untitled-1.jpg

    I'm essentially trying to make a formula that generates the cumulative route in the diagram, based on information about the hierarchy of nodes. It looks like the number of steps equals the level the node occupies minus the position of the starting node (2, in this case). So the number of steps required to be adjacent to nodes 39, 30 and 32 is 3-2=1. This seems to work until there are branches in the diagram and this is where I get stuck. Just from looking at the diagram, it looks like the formula should look something like steps = (level-2) + (the number of steps taken off the main path), so that node 9 is (4-2) + 2 (these are the steps taken from node 29 to 32 and 32 to 33) = 4. I've tried but I can't figure out how to integrate these additional steps into the formula. Please help me.

    Book1.xlsx

    P.S. These are the three criteria that must be satisfied:

    1. If a branch node is "locked," like node 39, then its descendant nodes should be ignored. This criterion is listed under CRIT2 in the attached spreadsheet.
    2. If a terminal node is "empty," like nodes 35, 36 and 37, then it should be ignored. This criterion is listed under CRIT3 in the attached spreadsheet.
    3. If more than four steps are required to move back along nodes already traversed, as is the case moving from node 783 to be adjacent to node 14, then those four steps add an additional step to the cumulative route. Otherwise, backtracking doesn't add steps.

    I've also posted this question here.
    Last edited by rinkjames; 06-29-2012 at 05:13 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1