[pgrouting-users] TRSP

Steve Horn steve at stevehorn.cc
Wed Jun 27 08:30:23 PDT 2012


Works perfectly. Thanks Max!

On Wed, Jun 27, 2012 at 11:01 AM, Max Weninger <max.weninger at gmail.com>wrote:

> Hi
>
> You would need to change GraphDefinition.cpp like
> Just "straight out of my brain" :)
>
> Return 0 instead of -1
> dont set err_msg
>
> and add something like
>
> *path = (path_element_t *) malloc(sizeof(path_element_t)));
> *path_count = 1;
>
> and set the attributes with "defaults" that you want
> to use to "mark" this path as "empty"
>
> (*path)[0].vertex_id = xxx;
> (*path)[0].edge_id = yyy;
> (*path)[0].cost = zzz;
>
> regards
>
> max
>
> > To clarify:
> > When I say "I would like to continue processing" I mean to say that I
> > would like my plpgsql function to continue processing (the function
> > that is calling into the turn_restrict_shortest_path).
> >
> > On Wed, Jun 27, 2012 at 10:40 AM, Steve Horn <steve at stevehorn.cc>
> > wrote:
> >
> > > yeah, path with len==0 is another way to say it.
> > >
> > > On around line 423 of GraphDefinition.cpp the *err_msg variable is
> > > assigned "Path Not Found" and a -1 is returned.
> > >
> > > This causes the plpgsql function to abort. Instead of aborting I
> > > would like to continue processing.
> > >
> > >
> > > On Wed, Jun 27, 2012 at 10:29 AM, Max Weninger
> > > <max.weninger at gmail.com>wrote:
> > >
> > >> Hi
> > >>
> > >> What do you actually mean with "no path"
> > >> Do you mean a path with len==0?
> > >>
> > >> regards
> > >>
> > >> max
> > >>
> > >> On Wed, 27 Jun 2012 10:19:03 -0400
> > >> Steve Horn <steve at stevehorn.cc> wrote:
> > >>
> > >> > Hey Stephen,
> > >> > I am working with the TRSP code. Instead of returning an error
> > >> > when the path cannot be found, I was wondering how difficult it
> > >> > would be to change the function to return no path result instead?
> > >>
> > >> _______________________________________________
> > >> Pgrouting-users mailing list
> > >> Pgrouting-users at lists.osgeo.org
> > >> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
> > >>
> > >
> > >
> > >
> > > --
> > > Steve Horn
> > >
> > >
> >
> >
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 
Steve Horn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120627/caec107f/attachment.html>


More information about the Pgrouting-users mailing list