astar (#17) - Problem with shooting_star (#349) - Message List

Problem with shooting_star

Hello!!

I try to test the algorithm on a simple situation  http://www.davidgis.fr/blog/index.php?2008/07/22/348-shooting-star-and-bridge-usage-example

My system: windows XP, postgresql-8.3.3-1, postgis-pg83-setup-1.3.3-1, pgRouting-1.02_pg-8.3.3

Data:

CREATE TABLE most (
gid integer,
source integer,
target integer,
cost double precision,
reverse_cost double precision,
to_cost double precision,
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
"rule" text
) WITHOUT OIDS;
INSERT INTO most (gid, source, target, cost, reverse_cost, to_cost, x1, y1, x2, y2, "rule") VALUES
(1, 1, 2, 27.5, 27.5, NULL, 60, 87.5, 60, 115, NULL),
(2, 2, 3, 25.495097567963924, 25.495097567963924, NULL, 60, 115, 85, 120, NULL),
(3, 1, 4, 62.5, 1000, NULL, 60, 87.5, 60, 25, NULL),
(4, 5, 6, 29.068883707497267, 29.068883707497267, NULL, 1, 1, 20, 23, NULL),
(5, 6, 4, 40.049968789001575, 40.049968789001575, NULL, 20, 23, 60, 25, NULL),
(6, 4, 7, 27.313000567495326, 27.313000567495326, NULL, 60, 25, 85, 36, NULL),
(7, 8, 1, 59, 59, NULL, 1, 87.5, 60, 87.5, NULL),
(8, 1, 9, 25, 25, 2000, 60, 87.5, 85, 87.5, '11'),
(8, 1, 9, 25, 25, 2000, 60, 87.5, 85, 87.5, '12'),
(9, 9, 10, 65, 65, 2000, 85, 87.5, 150, 87.5, '10'),
(9, 9, 10, 65, 65, 2000, 85, 87.5, 150, 87.5, '11'),
(9, 9, 10, 65, 65, 2000, 85, 87.5, 150, 87.5, '12'),
(10, 11, 3, 15, 15, NULL, 85, 135, 85, 120, NULL),
(11, 3, 9, 32.5, 32.5, 1000, 85, 120, 85, 87.5, '8'),
(11, 3, 9, 32.5, 32.5, 1000, 85, 120, 85, 87.5, '9'),
(12, 9, 7, 51.5, 51.5, 1000, 85, 87.5, 85, 36, '8'),
(12, 9, 7, 51.5, 51.5, 1000, 85, 87.5, 85, 36, '9'),
(13, 7, 12, 35, 35, NULL, 85, 36, 85, 1, NULL);

incorrect results:

SELECT edge_id FROM shortest_path_shooting_star('SELECT gid as id, source, target, cost, reverse_cost, x1, y1, x2, y2, rule, to_cost FROM most',13,7, true,true);
edge_id
13
13
12
8
7
SELECT edge_id,cost FROM shortest_path_shooting_star('SELECT gid as id, source, target, cost, reverse_cost, x1, y1, x2, y2, rule, to_cost FROM most',13,9, true,true);
edge_id
13
13
12
9
SELECT edge_id,cost FROM shortest_path_shooting_star('SELECT gid as id, source, target, cost, reverse_cost, x1, y1, x2, y2, rule, to_cost FROM most',12,9, true,true);
edge_id; cost
12; 51.5
6; 27.3130005674953
3; 1000
8; 25
9; 65

Etc. And many more wrong answers, can you tell what is the problem?

Sorry for my bad english, and thanks in advance