pgr_gsoc_vrppdtw - Experimental - pgRouting Manual (2.6)
pgr_gsoc_vrppdtw - Experimental
Name
pgr_gsoc_vrppdtw
- Returns a solution for
Pick and Delivery
with
time windows
Vehicle Routing Problem
Warning
Experimental functions
-
They are not officially of the current release.
-
They likely will not be officially be part of the next release:
-
The functions might not make use of ANY-INTEGER and ANY-NUMERICAL
-
Name might change.
-
Signature might change.
-
Functionality might change.
-
pgTap tests might be missing.
-
Might need c/c++ coding.
-
May lack documentation.
-
Documentation if any might need to be rewritten.
-
Documentation examples might need to be automatically generated.
-
Might need a lot of feedback from the comunity.
-
Might depend on a proposed function of pgRouting
-
Might depend on a deprecated function of pgRouting
-
Description of the Signatures
Description of the sql query
Column |
Type |
Description |
---|---|---|
id |
|
Identifier of the customer.
|
x |
|
|
y |
|
|
demand |
|
How much is added / removed from the vehicle.
|
openTime |
|
The time relative to 0, when the customer opens. |
closeTime |
|
The time relative to 0, when the customer closes. |
serviceTime |
|
The duration of the loading / unloading. |
pIndex |
|
Value used when the current customer is a Delivery to find the corresponding Pickup |
dIndex |
|
Value used when the current customer is a Pickup to find the corresponding Delivery |
Description of the parameters of the signatures
Column |
Type |
Description |
---|---|---|
sql |
|
SQL query as described above. |
vehicle_num |
|
Maximum number of vehicles in the result. (currently is ignored) |
capacity |
|
Capacity of the vehicle. |
Description of the result
RETURNS SET OF pgr_costResult[]:
Column |
Type |
Description |
---|---|---|
seq |
|
Sequential value starting from 1 . |
id1 |
|
Current vehicle identifier. |
id2 |
|
Customer identifier. |
cost |
|
|
Examples
Example: Total number of rows returned
SELECT count(*) FROM pgr_gsoc_vrppdtw(
'SELECT * FROM customer ORDER BY id', 25, 200);
count
-------
126
(1 row)
Example: Results for only id1 values: 1, 5, and 9
SELECT * FROM pgr_gsoc_vrppdtw(
'SELECT * FROM customer ORDER BY id', 25, 200)
WHERE id1 in (1, 5, 9);
seq id1 id2 cost
-----+-----+-----+------------------
1 1 0 0
2 1 13 120.805843601499
3 1 17 214.805843601499
4 1 18 307.805843601499
5 1 19 402.805843601499
6 1 15 497.805843601499
7 1 16 592.805843601499
8 1 14 684.805843601499
9 1 12 777.805843601499
10 1 50 920.815276724293
11 1 52 1013.97755438446
12 1 49 1106.97755438446
13 1 47 1198.97755438446
14 1 0 1217.00531076178
57 5 0 0
58 5 90 110.615528128088
59 5 87 205.615528128088
60 5 86 296.615528128088
61 5 83 392.615528128088
62 5 82 485.615528128088
63 5 84 581.446480022934
64 5 85 674.27490714768
65 5 88 767.27490714768
66 5 89 860.103334272426
67 5 91 953.70888554789
68 5 0 976.069565322888
105 9 0 0
106 9 67 102.206555615734
107 9 65 193.206555615734
108 9 63 285.206555615734
109 9 62 380.206555615734
110 9 74 473.206555615734
111 9 72 568.206555615734
112 9 61 661.206555615734
113 9 64 663.206555615734
114 9 102 753.206555615734
115 9 68 846.206555615734
116 9 0 866.822083743822
(38 rows)