By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

Route planning

P: n/a
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

Aug 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/mic...8e394864f1d5fc)

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

Hugh Janus wrote:
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
Aug 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.