[pgrouting-dev] Time dependent data and input format

Daniel Kastl daniel at georepublic.de
Tue Jul 19 00:39:58 EDT 2011


>
> We can have two approaches:
>
> 1. Take some specific case like day and time, and write down code that will
> take care of above thing. When we bundle this for with pgRouting the query
> will become specific to that format.
> Whenever a new data format is there, someone will need to re-code step 2.
> Since, this is internal to pgRouting, this cannot be done by application
> developer. Then we would need to recompile whole thing as a separate query
> before using it.
>
> 2. We could implement specific functions that can be used as query to
> time_dep_costs. Those can be installed as separate pgRouting functions
> itself. For simple applications where the data is in intervals of 24 hours,
> and cyclic we can just provide a postgres plsql function and it should serve
> the function. I am not good at plsql, but I believe it is a very flexible
> tool and can be used for complex data formats as well (thoughts?)
>
> I think approach 2 is much better and it keeps the main tdsp query
> independent of the data format. We just need to write plsql functions for
> different data formats and supply those as sql argument to tdsp query to
> retrieve data from time_dep_costs table.
>
> If you think this is a good approach, I can start learning plsql in detail
> and work on writing retrieval functions for specific data formats.
>
> Is this model right? I can go ahead and start work on that.
>
>
Hi Jay,

Yes, I think (2) is better. When you look at the DARP function, it does
something similar, taking several queries as parameters. The last parameter
for example is a distance matrix. DARP function doesn't care how this
distance matrix is generated. It just needs to have the right format.
So if someone creates stores the matrix as a table in the database, it's
fine. But it's also OK to calculate the distance on the fly with some other
function.
So TDSP could do it the same way, right?

I'm not good at pl/pgsql ... I always pass the task to Anton ;-)
But I don't think it's too difficult to learn. It's maybe lacking extensive
documentation and a good editor.

When writing functions it's good to keep namespace support in mind. Just as
a side note.

Daniel




-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20110719/49cadf54/attachment.html


More information about the pgrouting-dev mailing list