Issue 6 - The Optimize Edit

Page 1


THE OPTIMIZE EDIT

THEOPTIMIZEEDIT

LIFTING THE LID ON OPTIMISATION AN AIMINISERIES V2

Welcome to Issue 6 of the Optimize Edit and the second edition of our miniseries, written by our Head of Research and Development Dr Ross Conroy. This edition is all about lifting the lid on optimisation and AI.

Lifting the lid on optimisation, I would like to introduce you to one of the little AI shortcuts that can be taken of clustering nearby jobs together. It is very common for nearby stops to all be serviced by the same vehicle and intuitively this makes sense, if the vehicle is in the area is it likely (but not always) to be more efficient for the nearby vehicle to make the nearby stop compared to further away vehicles. This clustering can act as a starting point from which further strategies can be executed to further refine a plan.

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

To help make AI appear more understandable I am going to step you through one of the simplest clustering algorithms called K-Means. Its name may make it sound complex and if you were brave enough to Google it you may have been baffled by mathematical formulas. However behind the scenes it is a simple algorithm the only maths knowledge required is Pythagoras (a2 + b2 = c2) and calculating averages, along with some simple instructions that are no more complex than a cake recipe you can follow along.

Lets start with some coordinates plotted on graph. These coordinates could represent longitudes and latitudes of stop locations but to keep the calculations simple for this demonstration we use a 20 by 20 grid.

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

Now we need to introduce centroids Don’t worry they are nothing complex, they are a representation of the central point for each cluster. However we need a starting point for each cluster, for this we can generate random coordinates to become centroids, which is what has been pictured here. Three points have been randomly generated to become our initial centroid locations and for the purposes of illustration, each has been given a colour; red, green and blue.

We now begin to introduce some calculations into the mix. For each data point we need to find the nearest centroid to it. This can be done with Pythagoras for a line of sight distance as pictured below. In this example for the highlighted point the blue centroid is closest.

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

Repeating this for all locations allows us to assign each point to a cluster by assigning each location to its nearest centroid.

Now is where we introduce averages into the mix. We now need to relocate each centroid to now represent the central location for its cluster. This is done by calculating an average for the x and y coordinates of all the locations in the cluster. We then replace each centroid with the new average coordinate

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

We now repeat the previous step of finding the nearest centroid for each location, however this time some of the blue locations are now closer to the red centroid. These locations will leave the blue cluster and join the red cluster.

Updating centroid average locations again, this time the centroids don’t move anywhere near as much as they did before, with the green cluster not moving at all

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

Finally repeating the steps of finding the nearest centroid you can see that no locations changed clusters. This is our trigger to stop the k-means algorithm with locations now grouped into clusters. We can then use these clusters to determine which jobs to initially assign to which vehicles.

LIFTING THE LID ON OPTIMISATION AND AIMINISERIES V2

Hopefully you have been able to follow along with this demonstration of how the K-Means algorithm works. I also hope this little insight into just one of the algorithms commonly used in AI has helped to make AI seem less scary and more understandable. Often AI is seen as a “black box” style technology where data goes in and answers come out, this couldn’t be further from the truth and reality is behind the scenes algorithms such as this are processing the data input to calculate results. It is the combinations of algorithms like K-Means and many others working together which create the complex problem solving ability such as optimising vehicle logistics ”

If you are interested, you can head over to our website, www.optimizenow.ai to find out more about how we implement this technology to optimise fleets with maximum efficiency.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Issue 6 - The Optimize Edit by Optimize.ai - Issuu