
The software routing 260,000 grocery deliveries a week - alexvoica
http://ocadotechnology.com/blog/ocado-internet-of-vans/
======
michaelt
I work for Ocado, and I've spent some time working on the routing system
(although I don't work on it any longer).

Feel free to ask any questions and I'll try to answer them as best I can,
without revealing anything I'm not supposed to reveal :)

~~~
sandGorgon
what is the stack you use ? especially for the algorithm hotpath ? I'm not
sure if you are using libraries like Gurobi or CPLEX.

~~~
michaelt
The optimiser is actually written in pure Java.

The JIT compiler works pretty well, and with tools like JITWatch, Honest
Profiler and the -XX:+LogCompilation -XX:+PrintAssembly options you can
understand how the hot paths are running in a lot of detail.

For our current operation, the optimisers' servers run Ubuntu on bare metal in
our own data centres. Of course, like in any large organisation we make plenty
of use of virtualization and EC2 - just not for our optimisers at this point
in time.

~~~
sandGorgon
did you not try to do this on the GPU by any chance ? Especially using CUDA
libraries. I'm wondering what is the state of art in this field.

~~~
michaelt
Our current design isn't well suited to adaption to a GPU, because it branches
a lot and the memory accesses aren't strided evenly. So we couldn't just plug
our current code into a java-to-cuda compiler; we'd need to change the design.

So no, we haven't yet tested using GPUs.

~~~
sandGorgon
Thank you for the answer. I was not aware that these kind of considerations
impact the cpu vs gpu debate. I was under the impression that most cpu heavy
computations can be ported to the gpu.

------
agravier
My buddy and I gave a talk about how we solve the same problem at RedMart.
We're not as large as Ocado (yet?), but this video has more technical content:
[https://www.youtube.com/watch?v=6fmFb3r7Tmg](https://www.youtube.com/watch?v=6fmFb3r7Tmg)

------
heinrichf
Interesting talk on the subject from a data scientist at Instacart:
[https://blog.dominodatalab.com/data-science-
instacart/](https://blog.dominodatalab.com/data-science-instacart/)

~~~
alexvoica
We've also looked at data science to solve the problem but found that a
traditional approach still offers the best performance.

~~~
FractalNerve
Can you define "traditional approach" please? :) What do you mean
specifically?

------
coldcode
This is a similar problem to figuring out search results when you try to find
an airline reservation. It's a problem people have been working on for almost
50 years and it still works, although there are a lot of likely shortcuts. I
also remember we had some kind of system that tried to optimize pricing and
schedules for airlines which which ran for days sometimes (this was in 2000 or
so). I think modern hardware is much better and allow algorithms that are much
more capable. I wonder how you test something this complex that is never
actually done; how do you know its working optimally (or at least acceptably)?

------
shock
I don't understand why this is on the front page. It has almost no technical
details, just a bragging piece.

------
mgleason_3
Took a couple classes in graph theory in college which was interesting because
of the complexity involved in solving for optimal routes. We started with
brute-force search and moved on to other shortest path problem algorithms like
the ones mentioned here:

[https://en.m.wikipedia.org/wiki/Shortest_path_problem](https://en.m.wikipedia.org/wiki/Shortest_path_problem)

This article doesn't seem to add anything to the field.

------
ensiferum
Pure advert. No actual tech content

------
Zizizizz
For someone quite interested in these kind of problems, what's the current
best practice for solving these kind of problems? Not on this scale but still
large enough that Google's built-in api for solving it (only 25 points
allowed) can't do it.

~~~
paulsutter
99% of their code will be ordinary CRUD plumbing, dealing with orders and
integrating with other systems. The algorithmic code is the fun part, and
they've had years to tune it.

This is just self-congratulatory PR, trying to persuade potential investors
that's they're a hard tech company.

~~~
joshvm
Ocado is an interesting case. Their public line is that they're a technology
company that happened to end up delivering groceries. They invest a lot in
automation and robotics - definitely a hard tech company:

[http://www.gizmodo.co.uk/2017/02/inside-ocado-discover-
the-h...](http://www.gizmodo.co.uk/2017/02/inside-ocado-discover-the-hidden-
robotic-intelligence-behind-your-online-shopping/)

This is not a vapourware start-up, they've been leading the grocery delivery
business in the UK for years. That said, they have the same problem as Amazon
in that they invest so much into RnD that they're not terribly profitable
(about £10M on a $1Bn turnover).

That said, in this particular example I don't know how much their solution
differs from Royal Mail (which uses fixed routes) or people like DHL, Fedex,
et al. Routing isn't exactly a new problem and courier companies presumably
have always had a lot of people working in operations research.

~~~
noir_lord
The missus uses Ocado, they really have their shit together in the UK on the
logistics side (a field I work in but not groceries), the deliveries are on
time, the process is slick and professional and the drivers are polite and
helpful.

She swears by them, I mostly swear at the bill.

------
throws3bit
Good brag, but fix your https.

