[pgrouting-users] Problem with way restrictions in shooting star if you have more then one rule for an edge

Max Weninger max.weninger at gmail.com
Fri Feb 3 06:19:40 EST 2012


Hi

Just FYI:
Since I use the trsp algorithm in my "self-made" car
navigation system I have "tweaked" it a little bit
to speed up the perfomance.

And I can say the trsp is really fast :)

Most of the time is "spent" during creating the graph 
for the djikstra after fetching the contents from the DB
which is done always. So to speed up I "moved" that part of
the code to be done only if the bounding box has changed
since the last "calculation". Otherwise the data is kept
in memory.

Just some numbers (my machine is not really fast :):
I have an "edge" table with 1648921 entries (in a sqlite3 DB
with libspatialite extension)
Calculating a route with a result of 720 edges (bounding box reduced the
edges to 99254) takes about 10 seconds with DB access and building
the graph. And about 1-2 seconds without :) DB access is not really the
important factor here. Building the graph takes most of the time.

This "modification" allows real "on-the-fly" route recalculation during
driving which "typically" is not changing the bounding box.

So again thanks for your work in providing the trsp algorithm :)

Regards

max

On Wed, 11 Jan 2012 20:48:32 -0500
Stephen Woodbridge <woodbri at swoodbridge.com> wrote:

> Max,
> 
> Great! we have tested this pretty extensively but we also appreciate
> you testing and feedback. One area that we need to get better at is
> setting up a standard testing framework that we can apply before
> releases to verify that we have not broken any code. We have
> discussed the need for this, but not the details of how to do it yet.
> 
> My thinking is along the lines of we create a database of graphs,
> test cases, expected results and have a test runner that runs the
> test stores the results in a table and reports the results.
> 
> An alternative to this would be to create a collection of files that 
> each represent some series of tests like the above, and can be loaded 
> run evaluated, and dropped. This might be easier to manage that one
> huge file.
> 
> It would be easy to automate the running of the tests using a Perl or 
> Python script to run each test in sequence and summarize the results.
> 
> I also think that it is probably a good idea for the developers to 
> create unit tests so that they can verify their code before it is 
> wrapped into postgres so we can separate algorithm issues from 
> integration or changes in the postgresql API that might break stuff.
> 
> Anyway if you have good simple test cases, I would love to get them
> and if you are interested in support pgRouting buy helping build some
> of the above, I would be happy to work on designing something that is
> easy to build and and maintain.
> 
> Thanks for the report.
> 
> OH and yes the last edge is always -1, but I forget the rationale for 
> why at the moment.
> 
> -Steve
> 
> On 1/11/2012 8:13 PM, Max Weninger wrote:
> > Hi again
> >
> > It does not only look good - its perfect :)
> > All my turn restriction "testcases" work as expected
> > and give the correct routing.
> >
> > Thanks a lot for the work and if you need some help
> > e.g for testing just give me a note.
> >
> > Regards
> >
> > max
> >
> > On Thu, 12 Jan 2012 02:02:48 +0100
> > Max Weninger<max.weninger at gmail.com>  wrote:
> >
> >> Hi
> >>
> >> Tried the new trsp code and it looks good :)
> >> I havent tried complex turn restrictions though
> >>
> >> But just a quick question:
> >> Is it normal that it always returns -1 as the last edge id?
> >>
> >> regards
> >>
> >> max
> >> On Wed, 11 Jan 2012 11:28:38 -0500
> >> Stephen Woodbridge<woodbri at swoodbridge.com>  wrote:
> >>>> I will take a look at the "new" code asap :)
> >>
> >>
> >
> > _______________________________________________
> > Pgrouting-users mailing list
> > Pgrouting-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pgrouting-users
> 
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users



More information about the Pgrouting-users mailing list