Default Problem¶
General Overview¶
The Default Problem is a basic wrapper used when no specific problem type is selected, and it inherits all behaviors of the Vehicle Routing Problem (VRP). By default, this problem type works with the Default Objective and focuses on minimizing total distance. It provides a balanced, general-purpose approach that you can use when you do not have specialized optimization preferences or are in the testing phase.
This basic problem type can serve as a starting point for complex logistics scenarios, but it is also suitable for straightforward cases that require simple multi-vehicle coordination.
Use Cases¶
Common real-world scenarios include:
- Logistics planning situations where no specific optimization preference has been set yet.
- System testing before selecting specialized problem types.
- Scenarios where simple multi-vehicle route coordination is needed.
- General distribution operations where distance minimization is sufficient.
- Basic route optimization experiences for users new to the API.
In all these scenarios, the system provides consistent performance with default settings and forms a solid foundation for transitioning to more complex requirements.
How It Works¶
This problem type inherits all VRP behaviors and organizes multi-vehicle customer service in the most optimal way. Key points to consider:
- Multiple vehicles start from and return to the same depot
- Each customer is visited exactly once
- All vehicles must have the same profile and features
- All jobs start from the same location (depot)
- Each job must have a unique end location
- Only distance cost (
per_km) is optimized using the Default Objective - Fixed costs (
fixed) and time-based costs (per_hour) are ignored - The default value for
per_kmis set to 1000
General Validation¶
Before building or solving a Default Problem request, confirm:
- The jobs list must contain at least one job.
- All jobs must have the same start location.
- All jobs must have unique end locations.
- All vehicles must have the same start location.
- Vehicles must have the same start location as the jobs.
- Vehicles must return to their start location.
- Each job must have an amount of 1.
- All vehicles must have the same profile.
- Each vehicle must have a non-negative
per_kmcost defined. - Vehicle capacity and job demands must be valid and consistent.
Example¶
Scenario:¶
A company has 2 delivery vehicles starting from the same depot to deliver packages to 6 customers. Each vehicle can visit any customer, and there are no capacity limits. The system will use the default distance optimization.
Goal:¶
Design routes that minimize the total distance traveled by all vehicles while ensuring each customer is visited exactly once.
Minimal Example Payload:¶
{
"vehicles": [
{
"id": "vehicle_1",
"start": [0, 0],
"end": [0, 0],
"constraints": {
"profile": "car",
"per_km": 1000,
"max_tasks": 5
}
},
{
"id": "vehicle_2",
"start": [0, 0],
"end": [0, 0],
"constraints": {
"profile": "car",
"per_km": 1000,
"max_tasks": 5
}
},
{
"id": "vehicle_3",
"start": [0, 0],
"end": [0, 0],
"constraints": {
"profile": "car",
"per_km": 1000,
"max_tasks": 5
}
}
],
"jobs": [
{
"id": "job_1",
"amount": 1,
"start": {
"coordinate": [0, 0]
},
"end": {
"coordinate": [10, 10]
}
},
{
"id": "job_2",
"amount": 1,
"start": {
"coordinate": [0, 0]
},
"end": {
"coordinate": [15, 15]
}
},
{
"id": "job_3",
"amount": 1,
"start": {
"coordinate": [0, 0]
},
"end": {
"coordinate": [20, 5]
}
}
],
"options": {
"problem": "VRP",
"objective": "distance",
"solver": "heuristic",
"map": "cartesian"
}
}