[AccessD] Design Pointers - Mapping Routes

James Button jamesbutton at blueyonder.co.uk
Wed Nov 3 16:13:34 CDT 2021


Maybe put the data into an Excel type worksheet
A script to generate a structured set of data from that selected data with entry
in From column being the destination for that link.
Then you  just need to generate the strings of links that are possible
As in col a points to B, and C
And then assemble (in a separate worksheet) a set of linked row id's
Each entry starting with throw id of an entry in column "A" 
And then the row number of the entries that are in the destination column or the
entry in column "A"

So the 'search' process will scan down the columns for options that need to be
added to the strings that got to that column as a destination
That should allow easy assembly of the rows associated with each onward step
from A to wherever there is no further forward link
Discard any that do not get to a pointer to the destination.

(The col B entries that would go with A-B  for onward links. 
As well as a separate set of options for the A-C  with options on from C.
Etc.)

I suspect that doing the work all in Access using SQL would generate a very
complex set of entries in separate DBMS generated "TEMP" tables  


Then again - I ain't looked at the detailed Graph_theory.


JimB



-----Original Message-----
From: AccessD
<accessd-bounces+jamesbutton=blueyonder.co.uk at databaseadvisors.com> On Behalf Of
Stuart McLachlan
Sent: Wednesday, November 3, 2021 8:54 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Design Pointers - Mapping Routes

"Graph Theory"
https://en.wikipedia.org/wiki/Graph_theory

:)

-- 
Stuart

On 4 Nov 2021 at 9:22, David Emerson wrote:

> Hi Listers,
> 
> A table storing travel routes has fields for two points.  Data might
> look like this:
> 
> Point 1		Point 2
> A		B
> A		C
> B		C
> B		D
> C		D
> C		E
> E		D
> 
> As can be seen from the last record, the order of the point data may
> not be lowest/highest (it would be easier if the record could be
> entered as D/E but this is not the case).  There will however only be
> one combination of points (eg since there is a record for E/D there
> cannot be a record entered for D/E).
> 
> Questions to be answered from the data could be:
> 1) What are the possible routes from A to C (without covering the same
> section twice)? Answers: A-B, B-C A-C
> 
> 2) What are the possible routes from A to D (without covering the same
> section twice)? Answers: A-B, B-C, C-D A-B, B-C, C-E, E-D A-B, B-D
> 
> 3) What are the possible routes from A to E (without covering the same
> section twice)? Answers: A-B, B-C, C-D, D-E (note that D-E is the E/D
> record) A-B, B-C, C-E A-B, B-D, D-E (note that D-E is the E/D record)
> A-C, C-D, D-E (note that D-E is the E/D record) A-C, C-E
> 
> To get the answers it seems that I will need to use queries to come up
> with the different permutations for each record (eg E/D and D/E) so I
> can get all the matches of end point to start point values (and I
> would also need to check that the same route isn't used more than
> once)
> 
> Is there a better table structure to achieve this?
> 
> Can anyone point me in the right direction as to any theory behind
> this type of mapping, and any code that might help generate the
> solutions?
> 
> Regards
> 
> David Emerson
> Dalyn Software Ltd
> Wellington, New Zealand
> 
> 
> 
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
https://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list