Combines all vehicle-related parameters including:
Three Types:
When to Specify:
// Generic vehicle with just dimensions
const van: VehicleParameters = {
model: {
dimensions: {
heightMeters: 2.5,
weightKG: 3500
}
},
restrictions: {
commercial: true
}
};
// Combustion vehicle with fuel tracking
const fuelCar: VehicleParameters = {
engineType: 'combustion',
model: {
dimensions: { weightKG: 1500 }
},
state: {
currentFuelInLiters: 45
}
};
// Electric vehicle with charging
const ev: VehicleParameters = {
engineType: 'electric',
model: {
engine: {
consumption: {
charging: {
maxChargeKWH: 75,
connectorTypes: ['IEC_62196_TYPE_2']
}
}
}
},
state: {
currentChargePCT: 80
},
preferences: {
chargingPreferences: {
minChargeAtDestinationPCT: 20,
minChargeAtChargingStopsPCT: 10
}
}
};
// Hazmat truck
const hazmatTruck: VehicleParameters = {
model: {
dimensions: {
heightMeters: 4.0,
weightKG: 40000
}
},
restrictions: {
loadTypes: ['USHazmatClass3'],
commercial: true,
maxSpeedKMH: 80
}
};
Object describing vehicle details for routing.