Skip to content

Commit

Permalink
no name parameters on _pgr_vrpOneDepot
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Jun 28, 2017
1 parent 43e94b8 commit 6701a89
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 373 deletions.
247 changes: 0 additions & 247 deletions doc/queries/oneDepotWrapper.queries

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.0.0--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3275,10 +3275,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3304,25 +3304,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3345,6 +3345,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.0.1--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3275,10 +3275,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3304,25 +3304,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3345,6 +3345,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.1.0--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3373,10 +3373,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3402,25 +3402,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3443,6 +3443,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.2.0--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3227,10 +3227,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3256,25 +3256,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3297,6 +3297,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.2.1--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3227,10 +3227,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3256,25 +3256,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3297,6 +3297,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.2.2--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3227,10 +3227,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3256,25 +3256,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3297,6 +3297,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
19 changes: 10 additions & 9 deletions tools/sql-update-scripts/pgrouting--2.2.3--2.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3227,10 +3227,10 @@ CREATE OR REPLACE FUNCTION pgr_pickDeliverEuclidean (


CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
customers_sql TEXT,
vehicles_sql TEXT,
TEXT, -- customers_sql
TEXT, -- vehicles_sql
TEXT, -- matrix_sql
depot_id INTEGER,
INTEGER, -- depot_id

OUT seq INTEGER,
OUT vehicle_seq INTEGER,
Expand All @@ -3256,25 +3256,25 @@ final_sql TEXT;
BEGIN

orders_sql = $$WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
pickups AS (
SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
FROM vrp_orders, pickups
WHERE vrp_orders.id != $$ || depot_id;
WHERE vrp_orders.id != $$ || $4;


trucks_sql = $$ WITH
vrp_orders AS ($$ || customers_sql || $$ ),
vrp_vehicles AS ($$ || vehicles_sql || $$ ),
vrp_orders AS ($$ || $1 || $$ ),
vrp_vehicles AS ($$ || $2 || $$ ),
starts AS (
SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
FROM vrp_orders
WHERE id = $$ || depot_id || $$
WHERE id = $$ || $4 || $$
)
SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
$$;
Expand All @@ -3297,6 +3297,7 @@ END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT;


-----------------------------------------------------------------------
-- Core function for vrp with sigle depot computation
-- See README for description
Expand Down
Loading

0 comments on commit 6701a89

Please sign in to comment.