Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Figuring out the percentage completion through a decision tree

Status
Not open for further replies.

supermatchgame

Programmer
May 16, 2007
50
GB
Dunno if this is the right forum, however...

...my dev team is working on a series of user scripts to talk them through certain customer processes. We want to put a percentage complete bar at the top.

We're not sure, however, how to calculate the percentage completion given that there are multiple branches in the script tree, each with a varying number of nodes.

Has anyone who has solved this problem recommend any articles on the web?

Thanks,

Mark.
 

"multiple branches in the script tree, each with a varying number of nodes"

This right here means that you can't reliably calculate the percentage done, because you don't know what future choices/branches will be chosen. Thus the amount remaining at any given point will often, if not always, unknown.

I suggest looking at the processes and see if there are relatively broad but discrete steps or categories to which the various nodes could be assigned. Then you could show a user where in the chain of steps/categories they are at any given point. It's not a progress bar per se, but it will give an indication of progress nonetheless.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
That's what we said this morning. It's ok where you have a decent amount of nodes that aren't decision points but the scripts we're working on don't really allow for this. The one that's in front of me right now has one path that goes through six decision points in a row, so I would only be able to show the user where they have completed 0% and 100% of the script.

There has to be a solution to this. I have filled out surveys on the internet and been told 'you are x percent complete'. Perhaps they have all been written in such a way that what I'm talking about is achieveable.
 
weird, but ...

get the longest path from the start (aka MaxSteps).



at each node you find the longest path to the end (aka RemSteps) path to the end.

% traversed = 1 - ((MaxSteps RemSteps) / MaxSteps)

This would not be a smoth indicator, but should always be monotomically increasing

MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top