import { LngLatLike } from 'maplibre-gl'; import { TravelMode } from '@src/common/interface'; import { NBRequestStatus } from './common'; export declare enum OptimizationMvrpPointReturnType { Any = "any", Last = "last" } /** * Deprecated * * Notes: * the expected order for all coordinates arrays is [lon, lat] * all timings are in seconds * all distances are in meters * a time_window object is a pair of timestamps in the form [start, end] * cost values in output are the one used in the optimization objective (currently equal to duration) * a "task" is either a job, a pickup or a delivery */ export interface OptimizationMvrpOrderRequest { /** Text description of location.If set, this description will be returned in the response */ description?: string; /** Array of job objects describing the stops/places to visit. Each Job object has the following parameters */ jobs?: OptimizationMvrpOrderJob[]; /** This indicates the locations that will be used for optimization. The object contains the following parameters. */ locations: OptimizationMvrpOrderLocation; /** A parameter which which sets the transportation mode for the route. PS: Only the 4w/car profile is enabled by default. The other customised routing profiles are only supported in premium plan. */ mode?: TravelMode | string; /** The shipments object describes the pickup and delivery tasks */ shipments?: OptimizationMvrpOrderShipment[]; /** vehicles is the array of vehicle objects with the following parameters. */ vehicles: OptimizationMvrpOrderVehicle[]; /** Describes the locations of depots */ depots?: OptimizationMvrpOrderDepot[]; /** * api key for the request */ apiKey?: string; } export interface OptimizationMvrpOrderJob { /** * an array of integers describing multidimensional quantities for delivery * * Items in the array would refer to types of delivery objects and associated count for that object. For example, if your use case is `flower delivery`, position 0 in the array might be the number of `roses` to be delivered and position 1 in the array might be the number of `tulips` to be delivered at the location. */ delivery?: number[]; /** Unique reference ID for the job */ id: number; /** * Description of the job */ description?: string; /** * Valid values are 0 to (No. of locations in the locations object -1) * * Index of a location in the locations object which marks the latitude, longitude for the job */ location_index: number; /** * an array of integers describing multidimensional quantities for pickup. Items in the array would refer to types of pickup objects and associated count for that object. For example, if your use case is `flower delivery`, position 0 in the array might be the number of `roses` to be picked up and position 1 in the array might be the number of `tulips` to be picked up at the location. */ pickup?: number[]; /** * Default = 0 Valid values are 0 to 100 * * Describe the priority of this job. Priority only decides whether this job will be assigned, but will not necessarily influence the sequencing of the job. */ priority?: number; /** * Unit is seconds. * * The service duration for this job (defaults to 0) */ service?: number; /** * The unit is in second. Its default value is 0. * * Describe the job setup duration. */ setup?: number; /** * An array of integers used to list the capabilities/attributes/skills for the job. These could be used to set a job attribute (EV - possibly in a low-emission zone), capability (cold storage, refuel), or driver skillset. */ skills?: number[]; /** * An array of time_window objects describing valid slots for job service start. Each time_window object contains a start time and end time for the window. * * Example: [[1656487800,1656516600],[1656570000,1656620000]] * */ time_windows?: number[][]; } export interface OptimizationMvrpOrderLocation { /** reference ID for the set of locations */ id: number; /** * The index into the list is used when setting job and vehicle locations. */ location: LngLatLike[]; /** * Describe if the location is curbside. */ approaches?: string[]; } interface NormalizedOptimizationMvrpOrderLocation extends Omit { location: string; } export interface OptimizationMvrpOrderShipment { /** Describe multidimensional quantities */ /** * Description of the shipment */ description?: string; amount?: number[]; delivery: { id: number; location_index: number; service?: number; time_windows?: [number, number][]; }; pickup: { id: number; location_index: number; service?: number; time_windows?: [number, number][]; }; /** * Describe the priority of this shipment. The valid value is in range of [0, 100]. Its default value is `0`. Priority only decides whether this shipment will be assigned, but has nothing to do with the sequence of shipments. */ priority?: number; /** Describe the mandatory skills for this shipment */ skills?: number[]; } export interface OptimizationMvrpOrderVehicle { /** * Describe the breaks the driver will take */ breaks?: { id: number; service?: number; time_windows: number[][]; }; /** * Description of the vehicle */ description?: string; /** * Describe the depot assigned to this vehicle */ depot?: number; capacity?: number[]; end_index?: number; id: number; max_tasks?: number; skills?: number[]; start_index?: number; time_window?: [number, number]; } export interface OptimizationMvrpOrderDepot { /** Add a description for this depot */ description?: string; /** Describe the id of this depot */ id: number; /** Describe the location of depot */ location_index: number; } export interface NormalizedOptimizationMvrpRequest extends OptimizationMvrpOrderRequest { /** Pipe separated list of points along a path on which a snap to road will be done. The default maximum limit is 200 */ location: NormalizedOptimizationMvrpOrderLocation; } export interface OptimizationMvrpRetrieveRequest { /** Unique Reference ID for the submitted VRP. It is the id returned from optimization POST response. */ id: string; /** * api key for the request */ apiKey?: string; } export interface OptimizationMvrpOrderResult { id: string; message: string; status: NBRequestStatus; } /** * * Notes: * the expected order for all coordinates arrays is [lon, lat] * all timings are in seconds * all distances are in meters * a time_window object is a pair of timestamps in the form [start, end] * cost values in output are the one used in the optimization objective (currently equal to duration) * a "task" is either a job, a pickup or a delivery */ export interface OptimizationMvrpRetrieveResult { /** This will return a value if it is set in the description top level property. */ description?: string; /** Describe the error if one occurs during processing data */ message: string; result: OptimizationMvrpRetrieveResultData; /** Describes the process status */ status: NBRequestStatus; } export interface OptimizationMvrpRetrieveResultData { /** * 0: no error, 1: internal error, 2: input error, 3: routing error */ code?: number; error: string; routes: OptimizationMvrpRoute[]; summary: OptimizationMvrpSummary; unassigned: OptimizationMvrpUnassigned[]; } export interface OptimizationMvrpRoute { /** Describe the vehicle ID */ vehicle: number; /** The vehicle-overtime of this route */ vehicle_overtime: number; /** Describe the cost of this route. Right now it is equal to duration */ cost?: number; /** Describe the total deliveries in this route */ delivery?: number[]; /** Describe the total distance in this route */ distance?: number; /** Describe the duration of this route */ duration?: number; /** geometry */ geometry?: string; /** Describe the total pickups in this route */ pickup?: number[]; /** Describe the sum of priorities for this route */ priority?: number; /** Describe the total service time for this route */ service?: number; /** Describe the total setup time for this route */ setup?: number; /** Describe the steps in this route */ steps?: OptimizationMvrpRouteStep[]; /** Description of the vehicle on the route */ description?: string; /** Describe the waiting time at this step */ waiting_time?: number; } export interface OptimizationMvrpRouteStep { /** Describe the arrival time at this step */ arrival?: number; /** Describe this step */ description?: string; /** Describe the duration to this step. (The duration is accumulated here which means it includes the time spent on previous steps) */ duration?: number; /** Describe the id of this task */ id?: number; /** Describe the visit-lateness of this step */ late_by?: number; /** Describe the load of the vehicle after the completion of this step */ load?: number[]; /** Describe the coordinate at this step */ location?: number[]; /** Describe the location index at this step */ location_index?: number; /** Describe the service duration at this step */ service: number; /** Describe the setup duration at this step */ setup: number; /** Describe the task type of this step */ type: string; /** Describe the violations in this step */ violation?: { /** Describe the cause of violation */ cause?: string; duration?: number; }[]; /** Describe the waiting time at this step */ waiting_time?: number; } export interface OptimizationMvrpSummary { cost?: number; delivery?: number[]; distance?: number; duration?: number; num_late_visits?: number; num_vehicle_overtime?: number; pickup?: number[]; prioriy?: number; routes?: number; service?: number; setup?: number; total_vehicle_overtime?: number; total_visit_lateness?: number; unassigned?: number; violation?: { cause?: string; duration?: number; }; waiting_time?: number; } export interface OptimizationMvrpUnassigned { id?: number; location?: number[]; task_type?: string; description?: string; } /** * A service solves for the optimization of a Multi(or single) vehicle routing problem. */ export declare class OptimizationMvrpService { constructor(); postVRP(opt: OptimizationMvrpOrderRequest): Promise; retrieve(opt: OptimizationMvrpRetrieveRequest): Promise; } export {}; //# sourceMappingURL=optimization-mvrp.d.ts.map