[pgrouting-dev] Re: Implementation of core Time Dependent Dijkstra function

Anton Patrushev anton.patrushev at georepublic.de
Mon Jun 6 02:24:04 EDT 2011


Hi Jay,

Those two parameters exist mostly by historical reasons (hysterical raisins :))
Of course indirected graph can be represented by directed graph where
reverse costs for all edges are equal to costs. But in this case we
need one extra non-empty field in edges table which increases the
amount of stored data (not big deal though).

Now if undirected = true, we add reverse_cost=cost automatically.

In your case I guess that graph is directed without reverse cost.

Anton.

On 6/6/11, Jay Mahadeokar <jai.mahadeokar at gmail.com> wrote:
> Hi,
>
> I am writing a function tdsp_caller() which will call the core tdsp()
> function, on lines of boost_dijkstra() function in boost_wrapper.cpp.
>
> The prototype is like this:
> int tdsp_wrapper(
>
>             edge_columns_t *edges,
>             unsigned int edge_count,
>             weight_map_element_t *weight_map_elements,
>             int weight_map_element_count,
>             int start_vertex,
>             int end_vertex,
>             bool directed,
>             bool has_reverse_cost,
>             path_element_t **path,
>             int *path_count,
>             char **err_msg
>
>             );
>
> I am confused about the has_reverse_cost and directed variables in this
> scenario. I have mainly tested for directed graphs till now. I think for
> undirected graphs, we can add reverse edge while generating graph to make it
> directed.
>
> Now, since the costs here are the travel_time in the weight_map
> corresponding to each start_time, do we need a has_reverse_cost variable
> here? If yes, what would be its significance?
>
> Regards,
>
> --
> Regards,
> -Jay Mahadeokar
>


-- 
Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany

Anton Patrushev
CTO

eMail: anton.patrushev at georepublic.de
Web: http://georepublic.de

Tel: +49 (089) 420 959 519
Sip: 1959519 at sipgate.de

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl


More information about the pgrouting-dev mailing list