Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Vehicle Routing Problem

Author  Topic 

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 12:00:58
Has anyone ever done this?
in sql or otherwise?




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp

Kristen
Test

22859 Posts

Posted - 2006-11-08 : 13:05:24
I use MS Autoroute!

I've always known of this as the "traveling salesman problem" which gives plenty of seemingly useful hits in Google. Sticking SQL on the end of the search phrase provides hits, but at a glance I'm not sure how SQL-y they are

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 13:09:18
Vehicle Routing Problem is a variation of traveling salesman problem.

we have 100 customers and 8 service men that need to service the customers.
It's a high end male escort service.
So somehow i'd first have to see what customers heed servicing, how far are they from the nearest service man
and how to best utilize that service man.

MS AutoRoute can do all that?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-11-08 : 13:12:11
quote:
Originally posted by spirit1

It's a high end male escort service.



Stop giving Rob's Part time job info out so freely

UPS/ FEDEX must have made this problem an art form



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-08 : 13:17:35
"MS AutoRoute can do all that?"

No, not now I see the problem. It does sound like a set-based solution should be a good-fit though; but heck! what do I know ...

You can give AutoRoute "n" destinations and it will optimise a route that visits them all.

But you can't give it "m" service engineers and have it optimise who goes to which call

Our photocopy repair guys, and service folk like them, may well be using something to plan their routes. And I suppose UPS/FEDEX may have something which decides which van a particular parcel goes on - although they might be doing "Bob knows/does area 10, this parcel is for area 10, put it on Bobs van, and here's an optimised route plan for Bob"

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 13:46:25
if i could only ring up fedex/ups and aske them how they do it

it's a bit late to be thinking about a set based solution.

but this is still a problem in academic research so it's not simple
Corey where are thou?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-08 : 13:51:36
Yes. I have complete solution in VB with source code I made a few years ago, using Dijkstras algorithm.
Works very well.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-08 : 13:59:12
Hey! That is a project for me next week. Converting VB code to SQL code.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 13:59:30
well unless you're willing to show it to me, that doesn't help me much



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 14:01:27
well my exact problem is acctually a MDVRP - multi depot VRP.
and with 100 possibly overlapping customers... it isn't that computer friendly



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-08 : 14:13:35
The SQL code I can show.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-08 : 14:20:38
great. when you convert it, post it.
I'll buy you a beer when we meet



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-09 : 01:24:35
I have two projects. One "simple mode" where adding Node A to Node B, also implies that it is possible to go from B to A.
Or advanced mode, where you have to add both A-B and B-A, because the time or cost is different when travelling either way.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-09 : 04:04:30
Spirit1: I assume you are working on the INSERT statements for all the one way streets? <g>
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-09 : 04:20:33
well we're not going to do it that exactly.

We have to plan the route from a city to city in whole germany so i don't need streets.
luckily.

I'm just looking at the options for now and it's not 100% that it's going to be a SQL solution.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-15 : 19:13:24
Dijkstra's Shortest Path algorithm
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=77262



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-08-16 : 09:40:10
How'dya dig that post up from over a year ago?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-16 : 13:04:50
I followed Kristen's interesting links post.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -