 Does your software manage a fleet of vehicles, such as field technicians, taxis or last mile delivery trucks? You can reduce the driving time of your fleet by 25%. Save tons of money. Increase productivity. Reduce CO2 emissions. How? Optimate and optimize your vehicle trips with AI. Hi, I'm Jeffrey de Smit, creator and lead of OptoPlaner, the open source constraint solver for Java, Kotlin and Python programmers. Let me help you optimize your vehicle routing problem. For example, in this case, we have a depot in the middle of a region and we need to visit a number of locations across the country. So for example, these dots here are locations that we want to visit. We have a number of vehicles, the purple, green, yellow, blue vehicle and we need to decide for each of these visits which vehicle visits those locations and in which order they do that. And that's how we can actually reduce the driving time of these vehicles. Now these vehicles could be field technicians, they could be installing for example cable or internet at these locations at people's homes, but it could also be a last mile delivery where we're delivering items which they bought online. So there's a number of constraints here. First of all, you might have the constraints like a capacity constraint where a certain vehicle can only carry an amountage of weight and volume and every visit takes in a number of weight and volume in that truck. And we want to make sure of course there's enough room inside the truck to go to all of the visits. Another thing you might have is a skill constraint. For example, this vehicle is armored and to actually go to this location you need to have an armored vehicle because it's an expensive delivery. Similarly, if you have field technicians you might need a special skill at this particular location and only the technician with that skill can go to that location of course. Another big one is time windows, especially with field technicians. If you need to go to a certain location with a customer between in the morning between 8 and 10 a.m. or 8 and 12 a.m. you need to make sure you arrive there on time not too early not too late. There's also soft constraints like certain visits can weigh today or and of course the biggest soft constraint of them all is you want to reduce the total driving time. You want to make these paths as short as possible as quick as possible so you can actually visit more locations with the same amount of vehicles or do the same job with less vehicles. So let's take a look at how that works in a demo. Here I'm going to load a number of locations in Belgium and I'm going to start sending out a number of trucks to there as you can see. We're going to try to optimize the total driving time which you can see here on the top right. So we started at 17 hours but as the algorithms inside Optoplaner find better and better solutions you get a shorter and quicker shorter actually quicker and quicker route which is typically also a shorter route so it also doesn't just reduce the driving time but also the amount of fuel consumed which is good in today's environment. So you can see it's optimized it but the nice thing I can do is I can actually do real-time planning. So what's real-time planning? That's when a customer calls and in real-time we want to respond to that call and actually change some of our routes as needed. So I'm going to just click here in location and you'll see that Optoplaner in real-time optimizes this location and takes it along and as I click on more locations you can see that it will actually adjust its routes and this might have effects to some of the other routes to optimize this as best as possible. Now in a more advanced case you would also do non-disruptive real-time planning where you don't disrupt the routes that's already going on too much but of course the more you are able to disrupt the more you can actually optimize based on that new information that's so that's nice too. So how do you implement this? Well let me go to the code so this is how the constraints are defined and let me just show you what this is in Java and of course we can do this in Kotlin and in Python too. So how does it work? There's a here we define our constraints one of the constraints is the vehicle capacity constraint so we don't want to load too much weight into one vehicle so what we're going to do in this constraint is we're going to say for each of the planning visits we are going to group them by the vehicle so all of the planning visits that are visit by the same vehicle we're going to group them and we're going to sum their demand so for example the first visit might need 10 tons the second visit might need three tons together that's 13 tons so that would be the total demand on that vehicle then we're going to check with a filter if that vehicle's capacity if the demand is actually more than that vehicle's capacity so in that case we are putting more in the vehicle than the vehicle can actually handle that's a bad thing so we're going to tell top planner don't do that don't put that many visits on this vehicle or don't put that combination of visits on this vehicle and we're going to penalize that we're going to say there's one hard constraint broken and we're also actually going to specify how much it is broken this is quite usually interesting usually so we're going to say okay for every ton we have too much demand on that vehicle we're going to actually penalize that and we're going to say this is the vehicle capacity constraint in a very very similar way you can add any constraints you can think of and typically organizations always have their own little special constraints and so we can handle those and we can just add those and we could write this in a much simpler way with a for loop traditional programming but this approach is far far more scalable why it does something called incremental calculation calculates delta but when when the when opto planner optimizes the solution which is a huge scalability gain and on top of that it usually hashes for to do things like grouping or joints and so forth which also increase speed so if you want to try this out what you what do you do is you go to the opto planner website and you click on the quick starts button and on the quick start links and you just download the quick start and try it out yourself thank you for listening