Route planning

H

Hugh Janus

Hi all,

I have the following problem on a project I am working on. Right now,
I am in the planning stage, which is where I want the help.

I have to calculate a route between two different points on a map. An
example of the map is shown below (it should show a pyramid with A-L
and lines joining them). The user specifies a point to start and a
point to finish and the program calculates a route between them. The
user can only go down, not up. e.g. Route B to J is valid, but not D
to B. Also, the program has to respect the lines between the points
e.g. B to J is valid but not B to K.
OK, so my first problem is how to store the map as data. I cannot use
a DB engine like SQL Server or MySQL so I am hoping to be able to
represent the map using an XML file. My idea is to store information
about each junction on the map along with who it connects to, e.g. A
connects to B and C, B connects to D and E.

To make matters worse, there are some routes that might be forbidden
because they are a out of access to a particular user. for example, a
level 1 user cannot pass through B to E but can through C to E.
However, a level 2 user can.

A
/ \
B C
/ \ / \
D E F G
/ \ / \ / \ / \
H I J K L


So, my question is this, can anyone help me with how I should store the
information in the XML file? Later on, I will be asking for help with
searching for routes but right now I want to concentrate on the
planning of storing the data in the best format/method.

How this makes sense and that someone can help!

TIA,
Hugh
 
P

Pritcham

Hugh

This may or may not help you but your 'route' looks very much like a
decision tree to me so you may want to look at XML schemas for decision
trees
(here's one:
http://groups.google.co.uk/group/mi...1d5fc?lnk=st&q=&rnum=1&hl=en#178e394864f1d5fc)

As for restricting certain user groups, I suppose it depends on how
you're structuring your groups - ie. as far as 'rights' goes then group
1 < group 2 < group 3 < group 4 etc then you can just store the
'minimum' group required to access that path.

Hope that helps
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top