Skip to content

Commit

Permalink
[pgRouting#1153] Option B
Browse files Browse the repository at this point in the history
Changes committed

Updating NEWS and release notes
	modified:   NEWS
	modified:   doc/src/release_notes.rst

Deleting unused file
	deleted:    doc/src/release_notes.back.rst

Fixing filenames
	renamed:    doc/queries/doc-pgr_eucledianTSP.queries -> doc/queries/doc-pgr_TSPeuclidean.queries
	renamed:    doc/tsp/pgr_eucledianTSP.rst -> doc/tsp/pgr_TSPeuclidean.rst
	renamed:    include/drivers/tsp/eucledianTSP_driver.h -> include/drivers/tsp/euclideanTSP_driver.h
	renamed:    include/tsp/eucledianDmatrix.h -> include/tsp/euclideanDmatrix.h
	renamed:    locale/de/LC_MESSAGES/pgr_eucledianTSP.po -> locale/de/LC_MESSAGES/pgr_TSPeuclidean.po
	renamed:    sql/tsp/eucledianTSP.sql -> sql/tsp/TSPeuclidean.sql
	renamed:    src/tsp/Dmatrix.cpp -> src/cpp_common/Dmatrix.cpp
	renamed:    src/tsp/newTSP.c -> src/tsp/TSP.c
	renamed:    src/tsp/newTSP_driver.cpp -> src/tsp/TSP_driver.cpp
	renamed:    src/tsp/eucledianDmatrix.cpp -> src/tsp/euclideanDmatrix.cpp
	renamed:    src/tsp/eucledianTSP.c -> src/tsp/euclideanTSP.c
	renamed:    src/tsp/eucledianTSP_driver.cpp -> src/tsp/euclideanTSP_driver.cpp

Using new filenames on Build
	modified:   src/cpp_common/CMakeLists.txt
	modified:   src/tsp/CMakeLists.txt
	modified:   doc/queries/CMakeLists.txt
	modified:   doc/tsp/CMakeLists.txt
	modified:   sql/tsp/CMakeLists.txt

Fixing documentation
	modified:   doc/queries/doc-pgr_TSP.queries
	modified:   doc/src/pgRouting-concepts.rst
	modified:   doc/tsp/TSP-family.rst
	modified:   doc/tsp/pgr_TSP.rst

Fixing spelling & using new names
	modified:   include/c_types/pickDeliver/pickDeliveryOrders_t.h
	modified:   include/c_types/pickDeliver/vehicle_t.h
	modified:   include/tsp/pgr_tsp.hpp

Reorganizing TSP directory
	modified:   sql/tsp/TSP.sql
	new file:   sql/tsp/_TSP.sql
	new file:   sql/tsp/_TSPeuclidean.sql

Current signatures
	modified:   sql/sigs/pgrouting--3.0.0.sig

pgTap tests
* New tests
	new file:   pgtap/tsp/TSPeuclidean/illegal_values.sql
	new file:   pgtap/tsp/TSPeuclidean/innerQuery.sql
	new file:   pgtap/tsp/TSPeuclidean/types_check.sql
* renaming old test
	renamed:    pgtap/tsp/no_crash_test-eucledianTSP.sql -> pgtap/tsp/TSPeuclidean/no_crash_test.sql
* Deleting no longer used test
	deleted:    pgtap/tsp/pgr_eucledianTSP_types_check.sql

Documentation queries
* Fixing filenames
	renamed:    test/tsp/doc-pgr_TSP-windows.test.sql -> test/tsp/doc-pgr_TSP.test.sql
	renamed:    test/tsp/doc-pgr_eucledianTSP.result -> test/tsp/doc-pgr_TSPeuclidean.result
	renamed:    test/tsp/doc-pgr_TSP-windows.result -> test/tsp/win-pgr_TSP.result
	renamed:    test/tsp/doc-pgr_TSP-mac.test.sql -> test/tsp/win-pgr_TSP.test.sql
* Using correct spelling inside files
	modified:   test/tsp/development/gr9882-tsp.test.sql
	modified:   test/tsp/development/qa194-tsp.test.sql
	modified:   test/tsp/development/wi29-tsp.result
	modified:   test/tsp/development/wi29-tsp.test.sql
	modified:   test/tsp/doc-pgr_TSP.result
	modified:   test/tsp/performance/dj38.sql
	modified:   test/tsp/performance/qa194.sql
	modified:   test/tsp/performance/wi29.sql
* New tests
	new file:   test/tsp/doc-pgr_TSPeuclidean.test.sql
* Using new file names
	modified:   test/tsp/test.conf
* Deleting unused tests
	deleted:    test/tsp/doc-pgr_TSP-mac.result
	deleted:    test/tsp/doc-pgr_eucledianTSP.test.sql
	deleted:    test/tsp/doc-tsp-mac.result
	deleted:    test/tsp/doc-tsp-mac.test.sql
	deleted:    test/tsp/doc-tsp-windows.result
	deleted:    test/tsp/doc-tsp-windows.test.sql

Reflect changes on transifex configuration
	modified:   .tx/config

Moving to legacy deprecated TSP signatures
	new file:   sql/legacy/tsp/TSPeucledian.sql
	renamed:    sql/tsp/_makeDistanceMatrix.sql -> sql/legacy/tsp/_makeDistanceMatrix.sql
	renamed:    sql/tsp/tsp_v2.0_coordinates.sql -> sql/legacy/tsp/tsp_v2.0_coordinates.sql
	renamed:    sql/tsp/tsp_v2.0_matrix.sql -> sql/legacy/tsp/tsp_v2.0_matrix.sql

Removing trailing spaces
	modified:   src/common/orders_input.c
	modified:   src/common/vehicles_input.c
  • Loading branch information
cvvergara committed Dec 31, 2018
1 parent a4a667b commit d5956d7
Show file tree
Hide file tree
Showing 64 changed files with 850 additions and 1,710 deletions.
6 changes: 3 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ file_filter = locale/<lang>/LC_MESSAGES/pgr_dijkstraCostMatrix.po
source_file = locale/pot/pgr_dijkstraCostMatrix.pot
source_lang = en

[pgrouting.pgr_eucledianTSP]
file_filter = locale/<lang>/LC_MESSAGES/pgr_eucledianTSP.po
source_file = locale/pot/pgr_eucledianTSP.pot
[pgrouting.pgr_euclideanTSP]
file_filter = locale/<lang>/LC_MESSAGES/pgr_euclideanTSP.po
source_file = locale/pot/pgr_euclideanTSP.pot
source_lang = en

[pgrouting.pgr_dijkstraCost]
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
pgRouting 3.0.0 Release Notes
-------------------------------------------------------------------------------

*Fixed Issues*

* [#1153 ](https://github.com/pgRouting/pgrouting/issues/1153)_: Renamed pgr_eucledianTSP to pgr_TSPeuclidean

*New Experimental functions*

* Prim family
Expand Down Expand Up @@ -97,6 +101,8 @@ pgRouting 3.0.0 Release Notes
* pgr_maxFlowEdmondsKarp
* pgr_maximumcardinalitymatching

* TSP old signatures




Expand Down
2 changes: 1 addition & 1 deletion doc/queries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SET(LOCAL_FILES
doc-pgr_nodeNetwork.queries
doc-pgr_analyzeOneWay.queries
doc-pgr_createVerticesTable.queries
doc-pgr_eucledianTSP.queries
doc-pgr_TSPeuclidean.queries
doc-pgr_TSP.queries
doc-pickDeliverEuclidean.queries
doc-contractGraph.queries
Expand Down
44 changes: 26 additions & 18 deletions doc/queries/doc-pgr_TSP.queries
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,31 @@ BEGIN
SET client_min_messages TO NOTICE;
SET
-- q1
WITH
query AS (
SELECT * FROM pgr_TSP(
$$
SELECT * FROM pgr_dijkstraCostMatrix(
'SELECT id, source, target, cost, reverse_cost FROM edge_table',
(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
directed := false
)
$$
)
)
SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
under_20
----------
t
(1 row)
SELECT * FROM pgr_TSP(
$$
SELECT * FROM pgr_dijkstraCostMatrix(
'SELECT id, source, target, cost, reverse_cost FROM edge_table',
(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
directed := false)
$$,
randomize := false);
seq | node | cost | agg_cost
-----+------+------+----------
1 | 1 | 3 | 0
2 | 4 | 1 | 3
3 | 9 | 1 | 4
4 | 12 | 1 | 5
5 | 11 | 2 | 6
6 | 13 | 1 | 8
7 | 10 | 1 | 9
8 | 5 | 2 | 10
9 | 7 | 1 | 12
10 | 8 | 2 | 13
11 | 6 | 1 | 15
12 | 3 | 1 | 16
13 | 2 | 1 | 17
14 | 1 | 0 | 18
(14 rows)

-- q2
SELECT * FROM pgr_TSP(
Expand Down Expand Up @@ -57,7 +65,7 @@ SELECT * FROM pgr_TSP(
SELECT * FROM pgr_withPointsCostMatrix(
'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
'SELECT pid, edge_id, fraction from pointsOfInterest',
array[-1, 3, 5, 6, -6], directed := false);
array[-1, 3, 5, 6, -6], directed := false)
$$,
start_id := 5,
randomize := false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ BEGIN
SET client_min_messages TO NOTICE;
SET
-- q1
WITH
query AS (
SELECT * FROM pgr_eucledianTSP(
$$
SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y FROM edge_table_vertices_pgr
$$
)
)
SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 18;
under_20
----------
t
(1 row)
SELECT * FROM pgr_TSPeuclidean(
$$
SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y FROM edge_table_vertices_pgr
$$,
randomize := false);
seq | node | cost | agg_cost
-----+------+-------------------+------------------
1 | 1 | 1.4142135623731 | 0
2 | 3 | 1 | 1.4142135623731
3 | 4 | 1 | 2.41421356237309
4 | 9 | 1 | 3.41421356237309
5 | 6 | 0.58309518948453 | 4.41421356237309
6 | 16 | 0.860232526704263 | 4.99730875185763
7 | 12 | 1.11803398874989 | 5.85754127856189
8 | 17 | 1.11803398874989 | 6.97557526731178
9 | 11 | 1 | 8.09360925606168
10 | 10 | 0.5 | 9.09360925606168
11 | 15 | 0.5 | 9.59360925606168
12 | 13 | 1.58113883008419 | 10.0936092560617
13 | 14 | 1.58113883008419 | 11.6747480861459
14 | 7 | 1 | 13.2558869162301
15 | 8 | 1 | 14.2558869162301
16 | 5 | 1 | 15.2558869162301
17 | 2 | 1 | 16.2558869162301
18 | 1 | 0 | 17.2558869162301
(18 rows)

-- q2
SELECT* from pgr_eucledianTSP(
SELECT* from pgr_TSPeuclidean(
$$
SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
$$,
tries_per_temperature := 3,
cooling_factor := 0.5,
randomize := false
);
randomize := false);
seq | node | cost | agg_cost
-----+------+------------------+------------------
1 | 1 | 1.4142135623731 | 0
Expand All @@ -51,14 +63,13 @@ SELECT* from pgr_eucledianTSP(
-- q3
SET client_min_messages TO DEBUG1;
SET
SELECT* from pgr_eucledianTSP(
SELECT* from pgr_TSPeuclidean(
$$
SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
$$,
tries_per_temperature := 0,
randomize := false
);
DEBUG: pgr_eucledianTSP Processing Information
randomize := false);
DEBUG: Processing Information
Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK

Cycle(100) total changes =0 0 were because delta energy < 0
Expand Down
2 changes: 1 addition & 1 deletion doc/src/pgRouting-concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ Description of the return values for a :doc:`costMatrix-category` function

.. return_cost_start

Returns set of ``(start_vid, end_vid, agg_cost)``
Returns SET OF ``(start_vid, end_vid, agg_cost)``

============== ========== =================================================
Column Type Description
Expand Down
Loading

0 comments on commit d5956d7

Please sign in to comment.