Vehicle constructor

Vehicle({
  1. required String id,
  2. List<int>? capacity,
  3. String? description,
})

Constructs an Vehicle object.

id - Specify a unique ID for the vehicle. If multiple vehicles share the same ID, API would return an error. The IDs are case-sensitive. Please note that this field is mandatory and providing an empty string will result in an error. Note: We have modified the data type of this field. However, the latest change is backward compatible and an integer type vehicle ID is also valid. capacity - The capacity attribute is used to describe the multidimensional quantities of capacity for each vehicle. It is recommended to keep the dimensions of capacity and pickup or delivery in jobs and amount in shipments consistent. Read more about the behavior of this attribute in the Capacity Restrictions(https://docs.nextbillion.ai/docs/optimization/api/route-optimization-fast#capacity-restrictions) section. description - An optional description of the vehicle.

Implementation

Vehicle({
  required this.id,
  this.capacity,
  this.description,
});