PDA

View Full Version : find all path between any two nodes



sks4444
07-24-2018, 11:38 PM
requesting for the vba program for finding all possible paths between any two nodes in a bi-directional route map. inpit is given in sheet 1 as a=from; B=to; C=distance, d= time; e= fare.
output is given in sheet 2 as
A1=from ....;
B1= to ....;
A2= possible path1; B2 = DISTANCE C2= TIME TAKEN D2 = TOTAL FARE
A3 = possible path 2; B3 = DISTANCE C3= TIME TAKEN D3 = TOTAL FARE
A4=possible path 3; B4 = DISTANCE C4= TIME TAKEN D4 = TOTAL FARE
A5=possible path 4; B5 = DISTANCE C5= TIME TAKEN D5 = TOTAL FARE
A6=possible path 5; B6 = DISTANCE C6= TIME TAKEN D6 = TOTAL FARE


AS




A B C
D
G E
F


IN PUT
A-B = 200, 00:02:30, 10/-
B-C = 195, 00:02:00, 10/-
C-D = 210, 00:02:30, 12/-
D-E = 180, 00:02:10, 10/-
E-F = 210, 00:02:40, 14/-
F-G = 230, 00:02:45, 15/-
C-G = 200, 00:02:30, 10/-




OUTPUT

FROM B - TO F

1 - B-C-D-E-F
2 - B-C-G-F

macropod
07-27-2018, 03:09 PM
Cross-posted at:
https://www.excelforum.com/excel-programming-vba-macros/1239348-find-all-path-between-any-two-nodes-in-a-loop-graph.html
https://www.mrexcel.com/forum/excel-questions/1064833-find-all-possible-paths-between-any-two-nodes-bi-directional-route-map.html

Please read VBA Express' policy on Cross-Posting in item 3 of the rules: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3