Vehicle Specifications¶
Define precise vehicle characteristics to get accurate truck routing that accounts for size restrictions, weight limits, and hazardous materials regulations.
🎯 What are Vehicle Specifications?¶
Vehicle specifications allow you to define physical and operational characteristics of your vehicle. The routing algorithm uses these specifications to:
- Avoid roads with height/width restrictions
- Respect weight limits
- Navigate around tunnels for hazardous materials
- Find truck-appropriate routes
📋 Available Specifications¶
Physical Dimensions¶
| Parameter | Type | Range | Description |
|---|---|---|---|
length |
Integer | 0-30000 | Vehicle length in centimeters |
width |
Integer | 0-5000 | Vehicle width in centimeters |
height |
Integer | 0-5000 | Vehicle height in centimeters |
axle_count |
Integer | 2-255 | Total number of axles including trailers |
Hazardous Goods¶
Specify types of dangerous materials being transported:
explosive- Explosive materialsgas- Gaseous materialsflammable- Flammable materialscombustible- Combustible materialsorganic- Organic materialspoison- Poisonous materialsradioactive- Radioactive materialscorrosive- Corrosive materialspoisonous_inhalation- Poisonous inhalation materialsharmful_to_water- Materials harmful to waterother- Other hazardous materials
💡 Basic Usage¶
Standard Truck¶
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1200, // 12 meters
"width": 250, // 2.5 meters
"height": 350, // 3.5 meters
"axle_count": 4
},
"minimize": "distance"
}
Large Commercial Vehicle¶
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1650, // 16.5 meters
"width": 255, // 2.55 meters
"height": 400, // 4 meters
"axle_count": 5
},
"minimize": "duration"
}
Hazardous Materials Transport¶
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1200,
"width": 250,
"height": 350,
"axle_count": 4,
"hazardous_goods": ["flammable", "toxic"]
},
"avoid_features": ["tunnel"],
"minimize": "distance"
}
🎯 Use Cases¶
1. Delivery Truck Routing¶
Standard delivery vehicle:
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"waypoints": [
[41.0100, 28.9800],
[41.0122, 28.9820]
],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 900, // 9 meters
"width": 245, // 2.45 meters
"height": 330, // 3.3 meters
"axle_count": 3
}
}
2. Oversized Load Transportation¶
Heavy/oversized cargo:
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 2000, // 20 meters
"width": 300, // 3 meters
"height": 450, // 4.5 meters
"axle_count": 6
},
"minimize": "distance",
"alternatives": 1 // Get backup route
}
3. Fuel Delivery¶
Flammable materials transport:
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1100,
"width": 250,
"height": 380,
"axle_count": 4,
"hazardous_goods": ["flammable", "combustible"]
},
"avoid_features": ["tunnel", "controlled_access_highway"],
"minimize": "distance"
}
4. Chemical Transport¶
Multiple hazardous material types:
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1200,
"width": 250,
"height": 350,
"axle_count": 4,
"hazardous_goods": [
"corrosive",
"harmful_to_water",
"poison"
]
},
"avoid_features": ["tunnel", "ferry"],
"minimize": "duration"
}
🔧 Best Practices¶
1. Accurate Measurements¶
Always use precise measurements in centimeters:
// Good - Precise measurements
{
"length": 1200, // 12.00 meters
"width": 250, // 2.50 meters
"height": 350 // 3.50 meters
}
// Avoid - Rounded or imprecise
{
"length": 1000, // Might be inaccurate
"width": 200,
"height": 300
}
2. Include All Relevant Specs¶
Don't omit important specifications:
{
"vehicle": {
"length": 1200,
"width": 250,
"height": 350, // Critical for bridge clearances
"axle_count": 4 // Affects road restrictions
}
}
3. Hazardous Goods Classification¶
Be specific about hazardous materials:
{
"hazardous_goods": [
"flammable", // Type of danger
"combustible" // Additional classification
]
}
4. Combine with Feature Avoidance¶
Enhance safety with feature avoidance:
{
"vehicle": {
"length": 1200,
"hazardous_goods": ["radioactive"]
},
"avoid_features": ["tunnel", "ferry", "controlled_access_highway"]
}
📊 Vehicle Size Categories¶
Small Delivery Van¶
{
"length": 600, // 6 meters
"width": 200, // 2 meters
"height": 250, // 2.5 meters
"axle_count": 2
}
Medium Truck¶
{
"length": 1000, // 10 meters
"width": 245, // 2.45 meters
"height": 350, // 3.5 meters
"axle_count": 3
}
Large Semi-Truck¶
{
"length": 1650, // 16.5 meters
"width": 255, // 2.55 meters
"height": 400, // 4 meters
"axle_count": 5
}
Extra-Large Truck with Trailer¶
{
"length": 2050, // 20.5 meters
"width": 255, // 2.55 meters
"height": 410, // 4.1 meters
"axle_count": 6
}
⚠️ Important Considerations¶
Legal Limits¶
Different countries have different legal limits:
| Region | Max Length | Max Width | Max Height |
|---|---|---|---|
| EU | 16.5m | 2.55m | 4.0m |
| US | 19.8m | 2.6m | 4.11m |
| UK | 16.5m | 2.55m | 4.95m |
Ensure your specifications comply with local regulations.
Impact on Routing¶
Vehicle specifications significantly affect: - Available roads: Smaller network for larger vehicles - Route length: May require longer routes - Travel time: Restricted roads may slow travel - Toll costs: Higher tolls for larger vehicles
Hazardous Goods Routing¶
Hazardous materials routing: - Automatically avoids certain road types - May restrict tunnel usage - Affects ferry availability - Increases route distances
Performance¶
More specifications = more restrictions = longer calculation time: - Basic specs: Fast calculation - Full specs + hazardous goods: Moderate calculation time - Oversized + multiple hazmat types: Longer calculation time
🎯 Complete Example¶
Full Specification Request¶
import requests
API_BASE_URL = "https://api.flio.ai"
ROUTE_ENDPOINT = "/solver/route"
API_KEY = "YOUR-API-KEY"
payload = {
"tasks": [
{
"mode": "truck",
"origin": [41.0082, 28.9784],
"destination": [41.0150, 28.9850],
"vehicle": {
"length": 1200,
"width": 250,
"height": 350,
"axle_count": 4,
"hazardous_goods": ["flammable"]
},
"avoid_features": ["tunnel"],
"minimize": "distance",
"alternatives": 1,
"tolls": true,
"currency": "EUR"
}
]
}
url = f"{API_BASE_URL}{ROUTE_ENDPOINT}?api_key={API_KEY}"
response = requests.post(url, json=payload)
if response.status_code == 200:
data = response.json()
for route in data["tasks"][0]["routes"]:
# Process route considering vehicle specs
print(f"Route suitable for {payload['tasks'][0]['vehicle']}")
📚 See Also¶
Accurate vehicle specifications ensure safe, legal, and efficient routing for commercial vehicles. Always provide complete and precise measurements.