A Little Advice Please!

This is a discussion on A Little Advice Please! within the C++ Programming forums, part of the General Programming Boards category; Im thinking of writing( or attempting to write ) a routing program for delivery trucks. I was wondering what the ...

  1. #1
    Registered User big146's Avatar
    Join Date
    Apr 2003
    Posts
    74

    A Little Advice Please!

    Im thinking of writing( or attempting to write ) a routing program for delivery trucks. I was wondering what the best way to go about this would be? I would like to use zipcodes, but I would also need that lattitude and longitude to be able route them in some kind of ascending or descending order. I was also thinking that maybe I could somehow come up with a DLL ( if that's what I needed...not sure ) to maybe hook into the CDROM that comes with the thomas brother map books( you know the one in the back that you get when you buy the map book ) That could possibly read the map and or grids to route them the most effeciently.( Is that legal ? )

    Any thought on how to procede would be appreciated. Aslo do you know where one might get lattitude and longitude for zipcodes for free?
    big146

  2. #2
    I'll take you down! polonyman's Avatar
    Join Date
    Sep 2004
    Posts
    50

    dunno

    i reckon u could do it, but its prety difficult to write a prog that can read a map, u would have to premark all the routes urself. Im not sayin it cant be done, but it would be difficult and c++ probably istnt the best language to do it in, i would reccomend you ask sum1 hu can program for windows. sorry i couldn't help u much

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,662
    If you want to work on an interesting problems, lookup Graph Theory and the Traveling Salesman Problem.

    gg

  4. #4
    Registered User big146's Avatar
    Join Date
    Apr 2003
    Posts
    74
    Thanks for the reply's, I think that the TSP theory is a little out of my realm codeplug.... but thank for the info... Im thinking that also maybe I could just load a database of things we aready know such as distance from one point to another and just sort them in ascending order. I would probably never need more than 30 addresse's at one time. Then just have the program find the next close point based on distance.

    Hmmm I'll keep chewing on this and see what I can come up with..

    thanks guys!
    big146

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,498
    Don't forget that the "cost" of each segment of the journey may vary (each arc has a weight in graph theory).
    For example, a particular road may be traversed in 30 minutes at 3am, but in rush hour it could take 2 hours.
    Likewise, individual roads are likely to be assymetrical (going one way is faster than the other), especially at peak times.
    Some routes may have tolls (eg bridges), and others not.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    And don 't forget about one way streets.

  7. #7
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    come up with a DLL ( if that's what I needed...not sure ) to maybe hook into the CDROM that comes with the thomas brother map books( you know the one in the back that you get when you buy the map book ) That could possibly read the map and or grids to route them the most effeciently.
    You don't need a DLL to read from the CD-ROM. A DLL just holds functions that you can load at run-time from your main program. In fact, I don't think it matters at all what drive you're loading from, just specify the drive letter in the path when you open the file and don't try writing to it. The real problem would be reading and parsing the map, you'd need to get the file format and then implement a loading procedure (or dynamic lookup, whatever you call it), and then find some way to work with the specific data provided in the map.

    >>Is that legal ?
    It might not be, if you're planning on selling your program or using it for commercial purposes.

    Im not sayin it cant be done, but it would be difficult and c++ probably istnt the best language to do it in, i would reccomend you ask sum1 hu can program for windows.
    I wonder what language would be "better" for the job. "Windows" language is better you say? Yes of course, silly of me; I should have thought of it myself. Oh wait, it's not a language and you can do it in C++ anyways.

    Anyway Big146, good luck with your project. Sorry I had nothing constructive to contribute
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  8. #8
    Registered User big146's Avatar
    Join Date
    Apr 2003
    Posts
    74
    I think that all the info I need is on the cd-rom...But that would probably mean that I would have to reverse engineer it to figure out what functions to hook...So that I could use the data already present then load my functions via DLL to just route the addresses. Even then I dont know for sure how well that would work. Just a thought..

    Other than that I would probably have to buy a database of zipcodes with latitude and longitude to be able to do it. I have searched google but either it comes up with just the major cities of calif or you have to buy it. I need all the cities in southern calif.

    It would be just for personal use...it was something I thought about working on as im learning C++...kinda of tired of just reading the exercises in the books( gets a little boring sometimes )
    big146

  9. #9
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>I would have to reverse engineer it to figure out what functions to hook...
    If that's what you mean, it does sound illegal

    >>I would probably have to buy a database of zipcodes with latitude and longitude to be able to do it.
    Couldn't you fake the data, if this isn't for real use? I mean, put random names of cities and random latitude/longitude for each into a file - as long as they don't contradict each other - call it 'map.dat' or something, and then pretend that it's filled with real data.

    **And if you really want a huge list, get your friends to help make up city names
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  10. #10
    Registered User big146's Avatar
    Join Date
    Apr 2003
    Posts
    74
    >>Couldn't you fake the data, if this isn't for real use?
    I gues i could,but i was trying to get the real deal going. I would use the program, but I would be the only one using it.

    But I guess I could try and write it using fake coordinates for now.. thx for the tip.
    big146

  11. #11
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>thx for the tip.
    It's a trick I use all the time. It's also really useful for testing, so you can make sure all the extreme cases work properly.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  12. #12
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    well one way to ease your trouble would be start by going to mapquest. Think about it from there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advice on C Programming with MSVC++ 2008
    By IT_Guy in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2009, 03:23 AM
  2. girl friend advice (prob. the wrong place)
    By B0bDole in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 10-22-2004, 06:38 PM
  3. need advice on project
    By lambs4 in forum C Programming
    Replies: 2
    Last Post: 07-23-2003, 01:06 PM
  4. need hardware advice....
    By forgottenPWord in forum Tech Board
    Replies: 5
    Last Post: 03-23-2003, 08:12 AM
  5. Newbie: Seek advice
    By gogo in forum C++ Programming
    Replies: 4
    Last Post: 11-06-2001, 09:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21