The pickup and delivery service can be used to list the best solutions for pickup/collection and drop-off/delivery, whether for the transport of people or of goods.
The web service takes two types of data input:
- Existing journeys
- Pickup/collection points and drop-off/delivery points
The algorithm explores the solutions to find a pair that includes one pick-up point and one drop-off point in the existing journeys. It returns, for each journey, the best detours possible among the candidates (pick-up and drop-off points).
In the case where only one candidate (pickup or drop-off) is available, the web service tries to insert one step in existing journeys instead of two.
{ "url":"https://api.geoconcept.com/EU/GCW/geoconcept-web/api/lbs/pickupDelivery.json", "method":"POST", "body": { "routes" : [ { "id" : "trip_1", "departure" : { "lat" : "47.333990", "lon" : "-1.805604" }, "arrival" : { "lat" : "47.479740", "lon" : "-1.095251" }, "waypoints" : [ { "id" : "waypoint_1", "location" : { "lat" : "47.157530", "lon" : "-1.421958" } }] }], "pickupPoints" : [ { "id" : "depMeet_1", "location" : { "lat" : "47.228659", "lon" : "-1.600995" } }], "deliveryPoints" : [ { "id" : "arrMeet_1", "location" : { "lat" : "47.293823", "lon" : "-1.480789" } }], "constraints" : { "maxDetourDuration" : 3600, "minSharedDistance" : 0.1 }, "sortOptions" : { "routesAndCandidatesSortCriterium" : "MIN_DETOUR_DURATION" }, "configName":"car", "size" : { "routes" : 1, "candidates" : 1 } } }
Input
parameter | type | optional | description |
---|---|---|---|
routes |
array of routes/route (pickupDeliveryRouteInput) |
No |
Table of journeys as input. Pre-existing journeys in which candidates must be inserted. |
pickupPoints |
array of pickupPoints/pickupPoint (wayPoint) |
Yes |
Table of candidate pick-up points to insert in journeys. |
deliveryPoints |
array of deliveryPoints/deliveryPoint (wayPoint) |
Yes |
Table of possible drop-off candidates to insert in journeys. |
constraints |
(pickupDeliveryConstraints) |
Yes |
Definition of constraints to filter the journeys to use. |
sortOptions |
(pickupDeliverySortingOptions) |
Yes |
Definition of the sort on the results. |
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
configName |
Name of the configuration to use: |
yes |
|
snapMethod |
Snap to graph method |
yes |
standard |
exclusions |
List of restriction rules to use, separated by the ; character |
yes |
|
startDateTime |
Start date and time (format ISO8601: local time) example: 2014-01-21T09:00:00.000+01:00 (or 2014-01-21T09:00:00.000%2B01:00) for a start on 21 January 2014, at 9.00am in Paris |
yes |
|
avoidArea |
Forbidden transit zone in WKT format (POLYGON or MULTIPOLYGON) in the requested projection (srs parameter) |
yes |
|
size |
(pickupDeliverySizes) |
No |
Number of journeys and candidates to return. |
dataVersionHash |
string |
Yes |
Graph identifier (non-utilised) |
computeOptions |
Selection of variables to use in calculations, using semi-colons ; as separators: |
yes |
(pickupDeliveryRouteInput) journeys as input
parameter | type | optional | description |
---|---|---|---|
id |
string |
No |
Journey identifier |
departure |
(location) |
No |
Start point coordinates |
arrival |
(location) |
No |
Finish point coordinates |
distance |
long |
Yes |
Journey distance (in meters) |
duration |
long |
Yes |
Journey duration (in seconds) |
waypoints |
Array of wayPoint |
Yes |
List of journey steps |
(wayPoint) steps
parameter | type | optional | description |
---|---|---|---|
id |
string |
No |
Step identifier |
location |
(location) |
No |
Step coordinates |
stopoverPosition |
long |
Yes |
Position of the step in the journey, if the step is a stop. If no values are assigned, this step is just a waypoint. |
(location) coordinates
parameter | type | optional | description |
---|---|---|---|
lat |
double |
No |
Latitude of the point (in wgs84) |
long |
double |
No |
Longitude of the point (in wgs84) |
nodeId |
string |
Yes |
Graph node. Caution: a physical node does not have the same ID in another graph. |
(pickupDeliveryConstraints) contraintes
parameter | type | optional | description |
---|---|---|---|
maxDetourDuration |
long |
Yes |
Maximum duration of detour (in seconds). Only resulting journeys for which the duration added is less than this limit will
be returned by the web service. |
minSharedDistance |
long |
Yes |
Minimum value of common distance ratio. Only those resulting journeys for which the common distance ratio exceeds this limit
will be returned by the web service. |
(pickupDeliverySortingOptions) sort
parameter | type | optional | description |
---|---|---|---|
routesAndCandidatesSortCriterium |
(sortCriteriaEnum) |
Yes |
Sort options: |
(pickupDeliverySizes) number of returns
parameter | type | optional | description |
---|---|---|---|
routes |
long |
No |
Maximum number of journeys to return. |
candidates |
long |
No |
Maximum number of candidates to return for each journey. |
Output
parameter | type | description |
---|---|---|
results |
array of results/result (pickupDeliveryRouteResult) |
List of journeys calculated. |
(pickupDeliveryRouteResult) list of journeys calculated
parameter | type | description |
---|---|---|
routeId |
string |
List of journeys calculated. |
candidates |
array of candidates/candidate (pickupDeliveryRouteCandidate) |
List of possible detours for the journey. |
(pickupDeliveryRouteCandidate) list of detours possible for the journey
parameter | type | description |
---|---|---|
pickup |
(meetingPointCandidate) |
Pick-up candidate. |
delivery |
(meetingPointCandidate) |
Drop-off candidate. |
sharedRouteDuration |
long |
Common journey duration (in seconds). |
sharedRouteDistance |
long |
Common journey distance (in meters). |
totalDurationWithDetour |
long |
Total journey duration including the detour (in seconds). |
totalDistanceWithDetour |
long |
Total journey distance including the detour (in meters). |
detourDuration |
long |
Detour duration = (duration with detour) - (original journey duration) |
detourDistance |
long |
Detour distance = (distance with detour) - (original journey distance) |
sharedDistance |
double |
Common distance = ratio between (common distance) and (Total journey distance including the detour) |
(meetingPointCandidate) candidates
parameter | type | description |
---|---|---|
meetingPointId |
string |
Identifier for the pickup/drop-off location |
duration |
long |
For a pickup link: duration from the journey departure point to the pickup point (in seconds) |
distance |
long |
For a pickup link: distance from the journey departure point to the pickup point (in meters) |
meetingPointSubPath |
int |
Optimum segment position (in the journey) for the pickup/drop-off point. |
Case of an optimization applied successfully
{ "steps": [ { "x": 2.33906, "y": 48.84467, "id": "1", "duration": 600000, "effectiveStart": 0, "driveDistanceBefore": 0, "driveDistanceAfter": 5057, "driveTimeBefore": 0, "driveTimeAfter": 737740, "timeWindows": [ { "start": 0, "end": 3600000 }, [...] ] }, [...] ], "distanceMeters": 13502, "durationSeconds": 2015 }
- 1. How perform a route calculation without including any road tolls?
- 2. What are the maximum values allowed by predefined configName?
- 3. What are the exclusions available?
- 4. What are the Hazardous material exclusions?
- 5. What are Speed Patterns? How are they used?
- 6. How do you use heavy goods vehicle attributes?