![]() |
|
Computers & Information Technologies « Everything related to computers and internet. » |
![]() |
|
Share | Thread Tools | Search this Thread |
![]() |
#1 |
Registered Member
Last Online: 07-12-2012
Join Date: Jan 2007
Posts: 507
Thanks: 38
Thanked 260 Times in 170 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
|
![]()
hello guys i'm targeting this task:
an object A will reach the object B the algorithm will find the path (link) between them not according to the distance ( it's NOT required to find the shortest path) but according to another criteria...something similar to the criteria that we give to a database to sort the results... something like that... the programming language is not important to me... thank you.
__________________
the Hell is empty...all Devils are here ![]() |
![]() |
![]() |
![]() |
#2 |
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
![]()
You mean according to priority?
What are you trying to do exactly. Be more clear and specific.
__________________
|
![]() |
![]() |
![]() |
#3 |
Registered Member
Last Online: 07-12-2012
Join Date: Jan 2007
Posts: 507
Thanks: 38
Thanked 260 Times in 170 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
|
![]()
well take the airplans as example if a user wants to go from airport a to airport b he can go directly...
as direct way: high cost less time as passing By airport C and D less cost more time and so on... i need a component that does not only find the shortest way (direct way) the user need to travel with the path that have for example the lowest cost or an average cost, hope that you got the idea
__________________
the Hell is empty...all Devils are here ![]() |
![]() |
![]() |
![]() |
#4 |
Ma ghayro
Last Online: 04-19-2018
Join Date: Dec 2005
Posts: 5,592
Thanks: 1,765
Thanked 4,201 Times in 2,361 Posts
Groans: 12
Groaned at 18 Times in 11 Posts
|
![]()
I don't really know if i got what you mean, therefore i created something that is more general and you can manipulate the way you wish. I used PHP to do it, since you didn't want database i had to use Array tree structure. You can add as much elements to the last array in the tree (price...) and it will be displayed in the output =)
Sorry for not doing the input form... i gotta go to bed, i've been awake all night. http://pastebin.com/f19665baa Result: ![]()
__________________
http://twitter.com/danymoussa
|
![]() |
![]() |
![]() |
#5 | |
Registered Member
Last Online: 10-02-2012
Join Date: Mar 2006
Posts: 366
Thanks: 110
Thanked 227 Times in 126 Posts
Groans: 12
Groaned at 14 Times in 8 Posts
|
![]()
sorry for not having the time to mak ethe component but i can tell you how you can send a user from airport C to airport D, it's so simple...
Quote:
I hope this can helps you ..
__________________
Let's paint the world ORANGE |
|
![]() |
![]() |
![]() |
#6 |
Registered Member
Last Online: 07-12-2012
Join Date: Jan 2007
Posts: 507
Thanks: 38
Thanked 260 Times in 170 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
|
![]()
thank you xcoder, hegma and google for your care...i need it similar to what xcoder provided.
i need the system to do the following steps first get from the user the departure airport A and the arrival airport B the system will look at all the airports linked to A the results are B C and D the system will take each possible path A-B A-C-B A-D-B A-C-D-B and calculate the distance time and cost for each path then the user will select to display the results filtered according to his needed criteria maybe he need the cheapest one or maybe the timeless one. as example: A-B: high cost less time less distance A-C-B: considerable cost more time more distance A-D-B: Low cost much more time more distance the use of the database is only to save the information, i can code it from scratch but if i could find a similar component available it will be better
__________________
the Hell is empty...all Devils are here ![]() |
![]() |
![]() |
![]() |
#7 | |
Ma ghayro
Last Online: 04-19-2018
Join Date: Dec 2005
Posts: 5,592
Thanks: 1,765
Thanked 4,201 Times in 2,361 Posts
Groans: 12
Groaned at 18 Times in 11 Posts
|
![]() Quote:
__________________
http://twitter.com/danymoussa
|
|
![]() |
![]() |
![]() |
#8 | |
Registered Member
Last Online: 07-12-2012
Join Date: Jan 2007
Posts: 507
Thanks: 38
Thanked 260 Times in 170 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
|
![]() Quote:
i know my friend i know...but the tutor don't want us to let the db do the job hehe he just want it to store the information...
__________________
the Hell is empty...all Devils are here ![]() |
|
![]() |
![]() |
![]() |
|
Tags |
component, needed |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
|
|