VroomVehicle class
Class Representing a Vroom API Vehicle model required as input to the optimization API endpoint.
Full Data Schema available here: https://github.com/VROOM-Project/vroom/blob/master/docs/API.md#vehicles
Constructors
-
VroomVehicle({required int id, String profile = 'driving-car', String? description, ORSCoordinate? start, int? startIndex, ORSCoordinate? end, int? endIndex, List<
int> ? capacity, List<int> ? skills, List<int> ? timeWindow, List<VroomVehicleBreak> ? breaks, double? speedFactor = 1, int? maxTasks, List<VroomVehicleStep> ? steps}) -
const
-
VroomVehicle.fromJson(Map<
String, dynamic> json) -
Generates a VroomVehicle from a Map having keys matching the Vroom API
Vehicle model that includes:
factory
Properties
-
breaks
→ List<
VroomVehicleBreak> ? -
List of
VroomVehicleBreak
describing breaks.final -
capacity
→ List<
int> ? -
List of
int
describing multidimensional quantities.final - description → String?
-
String describing this vehicle.
final
- end → ORSCoordinate?
-
ORSCoordinate object describing the end location of this vehicle.
final
- endIndex → int?
-
int End index of relevant row and column in custom matrices.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → int
-
Unique int identifier for this vehicle.
final
- maxTasks → int?
-
int defining the maximum number of tasks in a route for this vehicle.
final
- profile → String
-
String describing the routing profile for this vehicle.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
skills
→ List<
int> ? -
List of
int
defining skills.final - speedFactor → double?
-
double value used to scale all vehicle travel times. (Defaults to 1)
The respected precision is limited to two digits after the decimal point.
final
- start → ORSCoordinate?
-
ORSCoordinate object describing the start location of this vehicle.
final
- startIndex → int?
-
int Start index of relevant row and column in custom matrices.
final
-
steps
→ List<
VroomVehicleStep> ? -
List of
VroomVehicleStep
describing a custom route for this vehicle.final -
timeWindow
→ List<
int> ? -
List of
int
Time window describing working hours.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Map representation of this VroomVehicle object having keys: 'id', 'profile', 'description', 'start', 'start_index', 'end', 'end_index', 'capacity', 'skills', 'time_window', 'breaks', 'speed_factor', 'max_tasks' and 'steps'.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override