When points are also given as input:
Warning
These are proposed functions for next mayor release.
The squared vertices are the temporary vertices, The temporary vertices are added acordng to the dirving side, The following images visualy show the diferences on how depending on the driving side the data is interpreted.
Right driving side
Left driving side
doesn’t matter the driving side
This famly of functions was thought for routing vehicles, but might as well work for some other application that we can not think of.
The with points family of function give you the ability to route between arbitrary points located outside the original graph.
When given a point identified with a pid that its being mapped to and edge with an identifier edge_id, with a fraction along that edge (from the source to the target of the edge) and some additional information about which side of the edge the point is on, then routing from arbitrary points more accurately reflect routing vehicles in road networks,
In all this functions we have to take care of as many aspects as possible:
Must work for routing:
- Cars (directed graph)
- Pedestrians (undirected graph)
Arriving at the point:
- In either side of the street.
- Compulsory arrival on the side of the street where the point is located.
Countries with:
- Right side driving
- Left side driving
Some points are:
The numbering of the points are handled with negative sign.
The reason for doing this is to avoid confusion when there is a vertex with the same number as identifier as the points identifier.
A point is defined by the quadruplet: \((pid, eid, fraction, side)\)
ped: | is the point identifier |
---|
eid: | is an edge id of the edges_sql |
---|
fraction: | represents where the edge eid will be cut. |
---|
side: | Indicates the side of the edge where the point is located. |
---|
For edge (15, 9,12 10, 20), & lets insert point (2, 12, 0.3, r)
On a right hand side driving network
From first image above:
- We can arrive to the point only via vertex 9.
- It only afects the edge (15, 9,12, 10) so that edge is removed.
- Edge (15, 12,9, 20) is kept.
- Create new edges:
- (15, 9,-1, 3) edge from vertex 9 to point 1 has cost 3
- (15, -1,12, 7) edge from point 1 to vertex 12 has cost 7
On a left hand side driving network
From second image above:
- We can arrive to the point only via vertex 12.
- It only afects the edge (15, 12,9 20) so that edge is removed.
- Edge (15, 9,12, 10) is kept.
- Create new edges:
- (15, 12,-1, 14) edge from vertex 12 to point 1 has cost 14
- (15, -1,9, 6) edge from point 1 to vertex 9 has cost 6
Remember: | that fraction is from vertex 9 to vertex 12 |
---|
When driving side does not matter
From third image above:
- We can arrive to the point either via vertex 12 or via vertex 9
- Edge (15, 12,9 20) is removed.
- Edge (15, 9,12, 10) is removed.
- Create new edges:
- (15, 12,-1, 14) edge from vertex 12 to point 1 has cost 14
- (15, -1,9, 6) edge from point 1 to vertex 9 has cost 6
- (15, 9,-1, 3) edge from vertex 9 to point 1 has cost 3
- (15, -1,12, 7) edge from point 1 to vertex 12 has cost 7