CuOpt solves Vehicle Routing Problems (VRPs) by optimizing a multi-part objective function. The objective is evaluated in a strict priority order. An example demonstrating these priorities is shown at the bottom of this page.
Primary Objective: Minimize Number of Vehicles Used
The highest priority objective in cuOpt is always to minimize the number of vehicles used. CuOpt will accept a significantly worse route cost (distance/time/etc.) if doing so allows it to use fewer vehicles. If you want your solution to use at least a certain number of vehicles, you can tell cuOpt that it needs to use at least a spcecified number of vehicles.
Secondary Objective: Weighted Scoring Across Six Factors
Once cuOpt has found solutions using the minimum possible number of vehicles, it then chooses the best solution among those with the fewest number of vehicles based on a weighted combination of additional objectives. These additional objectives are controlled using user-specified weights among the following six objective components:
- Costs
- Times (includes travel time, service time, and break time)
- Prizes
- Vehicle fixed costs
- Variance in route sizes
- Variance in route service times
The solver computes an overall score as a weighted sum of these components. The goal is to find a solution with the lowest total score.
Prizes are treated as a benefit, so it is negated internally. This means collecting more prize reduces the objective value.
The weight on costs is always assumed to be one, unless specified otherwise. Meaning if you want costs to be completely ignored, you explicitly have to specify a weight of zero for costs.
Therefore, if no weights are specified, cuOpt will, by default, minimize the total cost. Also, cost values are always required by cuOpt, even if you assign a weight of zero to them. If you do not care about the cost values, you can populate the costs with all zeros so that cuOpt will not factor them into the objective function.
Example demonstrating prioritized objectives
Consider this routing problem:
Two vehicles are available:
- Vehicle 1 starts at A
- Vehicle 2 starts at D
Two deliveries are required:
- Pickup at B, deliver to A
- Pickup at C, deliver to D
Distances:
- A–B = 1 mile
- C–D = 1 mile
- B–C = 98 miles
In an intuitive routing plan, each vehicle would serve the nearby delivery:
- Vehicle 1: A → B → A (2 miles)
- Vehicle 2: D → C → D (2 miles)
Total distance = 4 miles
However, without any restrictions, cuOpt will choose to use only one vehicle and cross the long B-C segment, resulting in a total distance of 200 miles.
If you want to avoid this, you have a few options. In this example, you could force cuOpt to use at least 2 vehicles, meaning it would use them both. If you modeled the travel distance as cost or time you could cap the amount of cost or time each vehicle spends on the route.
Comments
0 comments
Please sign in to leave a comment.