Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgr_withPointsDD return wrong cost when details:=false #979

Closed
apslight opened this issue Dec 21, 2017 · 1 comment
Closed

pgr_withPointsDD return wrong cost when details:=false #979

apslight opened this issue Dec 21, 2017 · 1 comment

Comments

@apslight
Copy link
Contributor

apslight commented Dec 21, 2017

QUERY

'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-1, 3.8, driving_side := 'b', details := false);

Driving distance starting from point -1 which is the little house one the left side of edge 1 and only for 3.8 units far away.

Output (when details:=false)

seq node edge cost agg_cost
1 -1 -1 0 0
2 1 1 0.4 0.4
3 2 1 0.6 0.6
4 5 4 0.3 1.6
5 6 8 1 2.6
6 8 7 1 2.6
7 10 10 1 2.6
8 7 6 0.3 3.6
9 9 9 1 3.6
10 11 11 1 3.6
11 13 14 1 3.6

details:=false which ignores other points of the points_sql.
Actual Behaviour : in 4th row the cost of travelling edge 4 is 0.3
Expected behaviour: But instead of 0.3 it should be 1 which is actual cost of travelling of edge 4.

QUERY (when details:= true)

'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-1, 3.8, driving_side := 'b', details := true);

Output (when details:= true)

seq node edge cost agg_cost
1 -1 -1 0 0
2 1 1 0.4 0.4
3 2 1 0.6 0.6
4 -6 4 0.7 1.3
5 5 4 0.3 1.6
6 6 8 1 2.6
7 8 7 1 2.6
8 10 10 1 2.6
9 -7 9 0.5 3.1
10 -3 12 0.6 3.2
11 -4 6 0.7 3.3
12 7 6 0.3 3.6
13 9 9 0.5 3.6
14 11 11 1 3.6
15 13 14 1 3.6

when details:=true then it is coming correct.

@cvvergara
Copy link
Member

@apsnazii
Can you also post the results when details := true just to have the comparison at sight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants