Fleet Management
info
Example applications for the Fleet Management C++ API are available on IssueTracker. You can clone the repository and launch the applications by following the setup instructions provided in the README file.
Magic Lane's Route Optimization empowers logistics teams to optimize fleet routing with 30+ constraints, traffic-based ETAs, and real-time adaptability, for faster, cost-effective deliveries, no matter the fleet size or vehicle type.

Add Optimization with Full Details
This example shows how to create and optimize a fleet management solution using the Fleet Management SDK, including custom optimizations, order details, vehicle constraints, and map visualization.
Add Optimization with Single Vehicle
This example shows how to create and optimize a fleet management solution with a single vehicle using the Fleet Management SDK, covering order details, vehicle constraints, and map visualization.
Add Optimization with Set Matrices
This example shows how to create and optimize a fleet management solution using the Fleet Management SDK with custom time and distance matrices, covering order details, vehicle constraints, and map visualization.
Add Optimization with Multiple Departures
This example shows how to optimize a fleet management solution using the Fleet Management SDK with multiple vehicles departing from different locations, covering order details, vehicle constraints, and map visualization.
Add Optimization with Multiple Destinations
This example shows how to optimize a fleet management solution using the Fleet Management SDK, where multiple vehicles start from one location but end at different destinations. It covers order details, vehicle constraints, and route visualization for efficient planning.
Add Optimization with Orders Sequences
This example shows how to optimize a fleet management solution using the Fleet Management SDK with order sequences. It covers order constraints, vehicle setup, and route visualization while allowing certain orders to follow a preferred but non-fixed sequence.
Add Optimization with Orders Sequence Pairs
This example shows how to optimize a fleet management solution using the Fleet Management SDK with order sequence pairs, ensuring pickups occur before deliveries. It covers order constraints, vehicle setup, and route visualization.
Add Optimization with Orders in the Same Route
This example shows how to optimize a fleet management solution where specific orders must be handled by the same vehicle, ensuring they remain on the same route. It covers order constraints, optimization settings, and route visualization.
Add Optimization with Fixed Orders Sequence
This example shows how to optimize a fleet management solution where specific orders must be visited in a fixed sequence by the same vehicle. It covers fixed order sequences and route visualization.
Reoptimize Optimization
This example shows how to reoptimize an existing optimization to generate a new and potentially better solution.
Update Optimization
This example shows how to update an existing optimization by modifying its configuration, vehicles, constraints, and other fields. The updated optimization can be reoptimized to generate a new solution; otherwise, the changes will not be applied to the optimization's routes.
Reoptimize Route
This example shows how to reoptimize an existing route to rearrange the orders into a better sequence of visits, if a more efficient sequence is available.
Update Route
This example shows how to update an existing route by modifying its configuration, vehicle constraints, and other fields. The updated route can be reoptimized to generate a new visit order. If not reoptimized, the changes won’t affect the route’s optimization. However, some configuration changes (e.g., ignoring time windows or adjusting optimization criteria) will automatically trigger reoptimization.
Unlink Route
This example shows how to unlink a route from its optimization. The route will be removed from the optimization, and a new optimization will be created for the unlinked route, retaining its configuration and vehicle constraints.
Merge Routes
This example shows how to merge multiple routes into one. A new optimization will be created for the merged route, inheriting configuration and vehicle constraints from the first route, but it will **not** be automatically optimized.
Generate Territories
This example demonstrates how to generate polygon territories from a list of coordinates and visualize them on a map.
Add Orders To Optimization
This example shows how to add a list of orders to an existing optimization, where the orders will be assigned to routes if reoptimization is enabled, or stored without assignment if reoptimization is not enabled.