[pgrouting-dev] Class Skeleton for VRP solver

Hi,
I am trying to develop the classes for the VRP solution. I was going through some relevant papers and some codes from VRPH (https://projects.coin-or.org/VRPH) and based on that I have come up with the attached skeleton. I am going to add it to git. I have put all the classes in one header, but they can be put in several headers and cpp. I am bit confused on that.

Please have a look at the classes. I have tried to give meaningful names. Your feedback will be very much helpful.

  • Razequl

Sorry,

I forgot to attach the file which is attached now.

-Razequl

VRP_Solver.h (5.59 KB)

···

On Sat, Jul 6, 2013 at 2:06 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Hi,
I am trying to develop the classes for the VRP solution. I was going through some relevant papers and some codes from VRPH (https://projects.coin-or.org/VRPH) and based on that I have come up with the attached skeleton. I am going to add it to git. I have put all the classes in one header, but they can be put in several headers and cpp. I am bit confused on that.

Please have a look at the classes. I have tried to give meaningful names. Your feedback will be very much helpful.

  • Razequl

I Razequl,

What about placing files like this in Gist: https://gist.github.com/
Good to read and possible to make comments right to the file.

Daniel

···

On Sat, Jul 6, 2013 at 5:17 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Sorry,

I forgot to attach the file which is attached now.

-Razequl


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On Sat, Jul 6, 2013 at 2:06 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Hi,
I am trying to develop the classes for the VRP solution. I was going through some relevant papers and some codes from VRPH (https://projects.coin-or.org/VRPH) and based on that I have come up with the attached skeleton. I am going to add it to git. I have put all the classes in one header, but they can be put in several headers and cpp. I am bit confused on that.

Please have a look at the classes. I have tried to give meaningful names. Your feedback will be very much helpful.

  • Razequl

Thanks Daniel.
I have put it in Gist. Here is the link:
https://gist.github.com/zibon/5939625

-Razequl

···

On Sat, Jul 6, 2013 at 8:07 AM, Daniel Kastl <daniel@georepublic.de> wrote:

I Razequl,

What about placing files like this in Gist: https://gist.github.com/
Good to read and possible to make comments right to the file.

Daniel

On Sat, Jul 6, 2013 at 5:17 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Sorry,

I forgot to attach the file which is attached now.

-Razequl


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On Sat, Jul 6, 2013 at 2:06 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Hi,
I am trying to develop the classes for the VRP solution. I was going through some relevant papers and some codes from VRPH (https://projects.coin-or.org/VRPH) and based on that I have come up with the attached skeleton. I am going to add it to git. I have put all the classes in one header, but they can be put in several headers and cpp. I am bit confused on that.

Please have a look at the classes. I have tried to give meaningful names. Your feedback will be very much helpful.

  • Razequl

Dear Razequl,

Sorry for being that late - but I had an in depth look at your header file and generally you had have done a good job in abstracting the VRP. Hence this serves as starting point four your implementation! Generally I follow Steve’s suggestions posted on the gist page on how to document the standard usage of the objects created, in order to get an impression on how to use them properly.

Generally I think you made a good decision in looking at VRPH first before actually starting to implement things J

Thanks very much and all the best

Johannes

Von: Razequl Islam [mailto:ziboncsedu@gmail.com]
Gesendet: Samstag, 06. Juli 2013 13:29
An: Daniel Kastl
Cc: Johannes Scholz; Stephen Woodbridge; pgRouting developers mailing list
Betreff: Re: Class Skeleton for VRP solver

Thanks Daniel.

I have put it in Gist. Here is the link:

https://gist.github.com/zibon/5939625

-Razequl

On Sat, Jul 6, 2013 at 8:07 AM, Daniel Kastl <daniel@georepublic.de> wrote:

I Razequl,

What about placing files like this in Gist: https://gist.github.com/

Good to read and possible to make comments right to the file.

Daniel

On Sat, Jul 6, 2013 at 5:17 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Sorry,

I forgot to attach the file which is attached now.

-Razequl

On Sat, Jul 6, 2013 at 2:06 AM, Razequl Islam <ziboncsedu@gmail.com> wrote:

Hi,

I am trying to develop the classes for the VRP solution. I was going through some relevant papers and some codes from VRPH (https://projects.coin-or.org/VRPH) and based on that I have come up with the attached skeleton. I am going to add it to git. I have put all the classes in one header, but they can be put in several headers and cpp. I am bit confused on that.

Please have a look at the classes. I have tried to give meaningful names. Your feedback will be very much helpful.

  • Razequl


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

Dear List

Currently the Travelling sales person code takes a 4+x4+ distance matrix of distances between nodes in the range 0-x and returns a list of node.

The attached function takes a sql query in the form

'select source,target,cost from xxxxxx'

where source and target can be any numerical values, the return is a list of the same node values.

For example
  id | source | target | cost
----+--------+--------+------
   1 | 1 | 2 | 30
   2 | 1 | 3 | 40
   3 | 1 | 42 | 10
   0 | 2 | 1 | 30
   5 | 2 | 3 | 60
   6 | 2 | 42 | 70
   7 | 3 | 1 | 40
   8 | 3 | 2 | 60
   9 | 3 | 42 | 90
  10 | 42 | 1 | 10
  11 | 42 | 2 | 70
  12 | 42 | 3 | 90

select pgr_mktspret('select source,target,cost from edge5',42);
  pgr_mktspret
--------------
  (0,42)
  (1,1)
  (2,3)
  (3,2)
(4 rows)
select pgr_mktspret('select source,target,cost from edge5',3,2);
  pgr_mktspret
--------------
  (0,3)
  (1,1)
  (2,42)
  (3,2)
(4 rows)

Its based on some sql code that Steve posted several days ago.

tspmkmat.sql (6.22 KB)

hi List,

Is it possible to rewrite the sample data network to ( http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata )to include a more distinctive data sample?

I have been trying to use it to provide an input data sample for a TSP problem. I had problems because the current network generates several routes that all look identical to the TSP so if you attempt to do some topological work, you end up with several identicial routes selections.

For example the selection

SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

where x  is in the range 0-3 will generate 4 paths of which the profile is two routes of 121 or 212 measured in distance unit terms

Dave.

On 7/8/2013 5:59 AM, Dave Potts wrote:

hi List,

Is it possible to rewrite the sample data network to (
http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata
)to include a more distinctive data sample?

I have been trying to use it to provide an input data sample for a TSP
problem. I had problems because the current network generates several
routes that all look identical to the TSP so if you attempt to do some
topological work, you end up with several identicial routes selections.

For example the selection

SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

where x is in the range 0-3 will generate 4 paths of which the profile is two routes of 121 or 212 measured in distance unit terms

Dave,

Daniel was trying to use one sample data for all the examples and in general this as worked well for most of the examples where we are computing simple routes. I think the driving distance and tsp examples probably need to have a slightly larger graph too adequately demonstrate the function.

If you have another graph that you think might be more appropriate for demonstrating both of these commands commands I think there is room for it. I know Daniel and I are both tied up at the moment on funded project work at the moment, but it you were inclined to make an additional sample graph and update the docs we would love to get a pull request to help out the release.

We have put a lot of effort into having complete documentation coverage of all the functions in 2.0. We still have some work to do but this is an area that we would be happy to get help on. If you don't have time to do this at least open a ticket so it gets tracked.

Best regards,
   -Steve

Dave,

Thank you for offering these functions to the community. I think that these might be very helpful alternatives to for accessing the TSP functionality.

I still need to get back to my sample code I posted as soon as I have a chance to see if I can figure out what is cause the weird results.

I would recommend that you create a gist at https://gist.github.com/

And post the link and a short description on the wiki at
https://github.com/pgRouting/pgrouting/wiki/Writing-functions

Thanks,
   -Steve

On 7/8/2013 5:45 AM, Dave Potts wrote:

Dear List

Currently the Travelling sales person code takes a 4+x4+ distance matrix
of distances between nodes in the range 0-x and returns a list of node.

The attached function takes a sql query in the form

'select source,target,cost from xxxxxx'

where source and target can be any numerical values, the return is a
list of the same node values.

For example
  id | source | target | cost
----+--------+--------+------
   1 | 1 | 2 | 30
   2 | 1 | 3 | 40
   3 | 1 | 42 | 10
   0 | 2 | 1 | 30
   5 | 2 | 3 | 60
   6 | 2 | 42 | 70
   7 | 3 | 1 | 40
   8 | 3 | 2 | 60
   9 | 3 | 42 | 90
  10 | 42 | 1 | 10
  11 | 42 | 2 | 70
  12 | 42 | 3 | 90

select pgr_mktspret('select source,target,cost from edge5',42);
  pgr_mktspret
--------------
  (0,42)
  (1,1)
  (2,3)
  (3,2)
(4 rows)
select pgr_mktspret('select source,target,cost from edge5',3,2);
  pgr_mktspret
--------------
  (0,3)
  (1,1)
  (2,42)
  (3,2)
(4 rows)

Its based on some sql code that Steve posted several days ago.

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

On 08/07/13 14:27, Stephen Woodbridge wrote:

On 7/8/2013 5:59 AM, Dave Potts wrote:

hi Steve

What bit of software was used to visualise the existing network? Is it based on a screen shot from something like mapserver?

I for one am very great full to the vast amount of effort that has been put in to version 2.0.

Dave.

hi List,

Is it possible to rewrite the sample data network to (
http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

)to include a more distinctive data sample?

I have been trying to use it to provide an input data sample for a TSP
problem. I had problems because the current network generates several
routes that all look identical to the TSP so if you attempt to do some
topological work, you end up with several identicial routes selections.

For example the selection

SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

where x is in the range 0-3 will generate 4 paths of which the profile is two routes of 121 or 212 measured in distance unit terms

Dave,

Daniel was trying to use one sample data for all the examples and in general this as worked well for most of the examples where we are computing simple routes. I think the driving distance and tsp examples probably need to have a slightly larger graph too adequately demonstrate the function.

If you have another graph that you think might be more appropriate for demonstrating both of these commands commands I think there is room for it. I know Daniel and I are both tied up at the moment on funded project work at the moment, but it you were inclined to make an additional sample graph and update the docs we would love to get a pull request to help out the release.

We have put a lot of effort into having complete documentation coverage of all the functions in 2.0. We still have some work to do but this is an area that we would be happy to get help on. If you don't have time to do this at least open a ticket so it gets tracked.

Best regards,
  -Steve
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

On 7/8/2013 9:27 AM, Dave Potts wrote:

On 08/07/13 14:27, Stephen Woodbridge wrote:

On 7/8/2013 5:59 AM, Dave Potts wrote:

hi Steve

What bit of software was used to visualise the existing network? Is it
based on a screen shot from something like mapserver?

Yes, I used the stuff at tools/mapserver/
I you set the extents correctly in the mapfile then you can generate the image with shp2img -m yourmapfile.map -o output.png

I for one am very great full to the vast amount of effort that has been
put in to version 2.0.

Thanks, there are an amazing large number of little things to track down and get working. I'm so glad I made the test suite up front that has really helped with checking for regressions. I also want to thank you and all the other users that have taken the time to test things out and report issues and successes.

Thanks,
   -Steve

Dave.

hi List,

Is it possible to rewrite the sample data network to (
http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

)to include a more distinctive data sample?

I have been trying to use it to provide an input data sample for a TSP
problem. I had problems because the current network generates several
routes that all look identical to the TSP so if you attempt to do some
topological work, you end up with several identicial routes selections.

For example the selection

SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

where x is in the range 0-3 will generate 4 paths of which the
profile is two routes of 121 or 212 measured in distance unit terms

Dave,

Daniel was trying to use one sample data for all the examples and in
general this as worked well for most of the examples where we are
computing simple routes. I think the driving distance and tsp examples
probably need to have a slightly larger graph too adequately
demonstrate the function.

If you have another graph that you think might be more appropriate for
demonstrating both of these commands commands I think there is room
for it. I know Daniel and I are both tied up at the moment on funded
project work at the moment, but it you were inclined to make an
additional sample graph and update the docs we would love to get a
pull request to help out the release.

We have put a lot of effort into having complete documentation
coverage of all the functions in 2.0. We still have some work to do
but this is an area that we would be happy to get help on. If you
don't have time to do this at least open a ticket so it gets tracked.

Best regards,
  -Steve
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

On Mon, Jul 8, 2013 at 10:27 PM, Dave Potts <dave.potts@pinan.co.uk> wrote:

On 08/07/13 14:27, Stephen Woodbridge wrote:

On 7/8/2013 5:59 AM, Dave Potts wrote:

hi Steve

What bit of software was used to visualise the existing network? Is it
based on a screen shot from something like mapserver?

I for one am very great full to the vast amount of effort that has been
put in to version 2.0.

Hi Steve,

With the sample data I was a bit lazy, I must admit.
Steve had this network image and a table, so I just used it.

I know that it doesn't work so well for TSP and Driving Distance. Some
larger network would be better.
But then the SQL to copy and paste also becomes much larger.

Well, I'm glad if someone could provide a better but still simple sample
network for the documentation.
It's not so easy to find something that covers all algorithms and is still
simple.
Right now it's still the better option than no sample network :wink:

Daniel

Dave.

hi List,

Is it possible to rewrite the sample data network to (
http://docs.pgrouting.org/dev/**doc/src/developer/sampledata.**
html#sampledata<http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata&gt;
)to include a more distinctive data sample?

I have been trying to use it to provide an input data sample for a TSP
problem. I had problems because the current network generates several
routes that all look identical to the TSP so if you attempt to do some
topological work, you end up with several identicial routes selections.

For example the selection

SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},**
{3,2,0,2},{3,2,2,0}}',X);

where x is in the range 0-3 will generate 4 paths of which the profile
is two routes of 121 or 212 measured in distance unit terms

Dave,

Daniel was trying to use one sample data for all the examples and in
general this as worked well for most of the examples where we are computing
simple routes. I think the driving distance and tsp examples probably need
to have a slightly larger graph too adequately demonstrate the function.

If you have another graph that you think might be more appropriate for
demonstrating both of these commands commands I think there is room for it.
I know Daniel and I are both tied up at the moment on funded project work
at the moment, but it you were inclined to make an additional sample graph
and update the docs we would love to get a pull request to help out the
release.

We have put a lot of effort into having complete documentation coverage
of all the functions in 2.0. We still have some work to do but this is an
area that we would be happy to get help on. If you don't have time to do
this at least open a ticket so it gets tracked.

Best regards,
  -Steve
______________________________**_________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/**mailman/listinfo/pgrouting-dev&lt;http://lists.osgeo.org/mailman/listinfo/pgrouting-dev&gt;

______________________________**_________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/**mailman/listinfo/pgrouting-dev&lt;http://lists.osgeo.org/mailman/listinfo/pgrouting-dev&gt;

--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On 08/07/13 15:36, Daniel Kastl wrote:
hi Daniel, Steve,

I had a bit of play and came up with this

map.png is the output of running
shp2img -m demo.map

The file demo.map is a mapserver file for creating the picture

mktabl.sql is an sql script for making the tables

and sql2tab.sql dumps the contents of route_table and vertexts tables as source,target,cost setting

One off the problems that I with the existing demo map is that most of the costs of getting from a to b is always 1, this is designed to be different.

I any body can think of any improvements, please let me known

Dave.

On Mon, Jul 8, 2013 at 10:27 PM, Dave Potts <dave.potts@pinan.co.uk <mailto:dave.potts@pinan.co.uk>> wrote:

    On 08/07/13 14:27, Stephen Woodbridge wrote:

        On 7/8/2013 5:59 AM, Dave Potts wrote:

    hi Steve

    What bit of software was used to visualise the existing network?
     Is it based on a screen shot from something like mapserver?

    I for one am very great full to the vast amount of effort that has
    been put in to version 2.0.

Hi Steve,

With the sample data I was a bit lazy, I must admit.
Steve had this network image and a table, so I just used it.

I know that it doesn't work so well for TSP and Driving Distance. Some larger network would be better.
But then the SQL to copy and paste also becomes much larger.

Well, I'm glad if someone could provide a better but still simple sample network for the documentation.
It's not so easy to find something that covers all algorithms and is still simple.
Right now it's still the better option than no sample network :wink:

Daniel

    Dave.

            hi List,

            Is it possible to rewrite the sample data network to (
            http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

            )to include a more distinctive data sample?

            I have been trying to use it to provide an input data
            sample for a TSP
            problem. I had problems because the current network
            generates several
            routes that all look identical to the TSP so if you
            attempt to do some
            topological work, you end up with several identicial
            routes selections.

            For example the selection

            SELECT seq, id FROM
            pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

            where x is in the range 0-3 will generate 4 paths of
            which the profile is two routes of 121 or 212 measured in
            distance unit terms

        Dave,

        Daniel was trying to use one sample data for all the examples
        and in general this as worked well for most of the examples
        where we are computing simple routes. I think the driving
        distance and tsp examples probably need to have a slightly
        larger graph too adequately demonstrate the function.

        If you have another graph that you think might be more
        appropriate for demonstrating both of these commands commands
        I think there is room for it. I know Daniel and I are both
        tied up at the moment on funded project work at the moment,
        but it you were inclined to make an additional sample graph
        and update the docs we would love to get a pull request to
        help out the release.

        We have put a lot of effort into having complete documentation
        coverage of all the functions in 2.0. We still have some work
        to do but this is an area that we would be happy to get help
        on. If you don't have time to do this at least open a ticket
        so it gets tracked.

        Best regards,
          -Steve
        _______________________________________________
        pgrouting-dev mailing list
        pgrouting-dev@lists.osgeo.org
        <mailto:pgrouting-dev@lists.osgeo.org>
        http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

    _______________________________________________
    pgrouting-dev mailing list
    pgrouting-dev@lists.osgeo.org <mailto:pgrouting-dev@lists.osgeo.org>
    http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de <mailto:daniel.kastl@georepublic.de>
Web: http://georepublic.de/&gt;

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

map.png

demo.map (1.51 KB)

mktab.sql (7.2 KB)

sql2tab.sql (246 Bytes)

FYI, there are a lot of changes moving from postgis 2.0 to 2.1 in that all the function names have changed and that the "unknown" srid has changed from -1 to 0. While the function name changes are more obvious, the srid change is not and I notice that your definition uses srid=-1.

It might be safer to not specify any srid in which case I think it will default to the appropriate value. I'm not sure if you can do this on the addgeometrycolumn() function. So we might just need to fiddle with stuff like this in the transition.

-Steve

On 7/8/2013 4:15 PM, Dave Potts wrote:

On 08/07/13 15:36, Daniel Kastl wrote:
hi Daniel, Steve,

I had a bit of play and came up with this

map.png is the output of running
shp2img -m demo.map

The file demo.map is a mapserver file for creating the picture

mktabl.sql is an sql script for making the tables

and sql2tab.sql dumps the contents of route_table and vertexts tables as
source,target,cost setting

One off the problems that I with the existing demo map is that most of
the costs of getting from a to b is always 1, this is designed to be
different.

I any body can think of any improvements, please let me known

Dave.

On Mon, Jul 8, 2013 at 10:27 PM, Dave Potts <dave.potts@pinan.co.uk
<mailto:dave.potts@pinan.co.uk>> wrote:

    On 08/07/13 14:27, Stephen Woodbridge wrote:

        On 7/8/2013 5:59 AM, Dave Potts wrote:

    hi Steve

    What bit of software was used to visualise the existing network?
     Is it based on a screen shot from something like mapserver?

    I for one am very great full to the vast amount of effort that has
    been put in to version 2.0.

Hi Steve,

With the sample data I was a bit lazy, I must admit.
Steve had this network image and a table, so I just used it.

I know that it doesn't work so well for TSP and Driving Distance. Some
larger network would be better.
But then the SQL to copy and paste also becomes much larger.

Well, I'm glad if someone could provide a better but still simple
sample network for the documentation.
It's not so easy to find something that covers all algorithms and is
still simple.
Right now it's still the better option than no sample network :wink:

Daniel

    Dave.

            hi List,

            Is it possible to rewrite the sample data network to (
            http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

            )to include a more distinctive data sample?

            I have been trying to use it to provide an input data
            sample for a TSP
            problem. I had problems because the current network
            generates several
            routes that all look identical to the TSP so if you
            attempt to do some
            topological work, you end up with several identicial
            routes selections.

            For example the selection

            SELECT seq, id FROM
            pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

            where x is in the range 0-3 will generate 4 paths of
            which the profile is two routes of 121 or 212 measured in
            distance unit terms

        Dave,

        Daniel was trying to use one sample data for all the examples
        and in general this as worked well for most of the examples
        where we are computing simple routes. I think the driving
        distance and tsp examples probably need to have a slightly
        larger graph too adequately demonstrate the function.

        If you have another graph that you think might be more
        appropriate for demonstrating both of these commands commands
        I think there is room for it. I know Daniel and I are both
        tied up at the moment on funded project work at the moment,
        but it you were inclined to make an additional sample graph
        and update the docs we would love to get a pull request to
        help out the release.

        We have put a lot of effort into having complete documentation
        coverage of all the functions in 2.0. We still have some work
        to do but this is an area that we would be happy to get help
        on. If you don't have time to do this at least open a ticket
        so it gets tracked.

        Best regards,
          -Steve
        _______________________________________________
        pgrouting-dev mailing list
        pgrouting-dev@lists.osgeo.org
        <mailto:pgrouting-dev@lists.osgeo.org>
        http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

    _______________________________________________
    pgrouting-dev mailing list
    pgrouting-dev@lists.osgeo.org <mailto:pgrouting-dev@lists.osgeo.org>
    http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de <mailto:daniel.kastl@georepublic.de>
Web: http://georepublic.de/&gt;

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

On 09/07/13 17:42, Stephen Woodbridge wrote:
Setting the srs was done by choice,I wanted to ensure that the srs value listed in postgis would match the one listed in the mapserver file. but if needs to be changed......
Dave.

FYI, there are a lot of changes moving from postgis 2.0 to 2.1 in that all the function names have changed and that the "unknown" srid has changed from -1 to 0. While the function name changes are more obvious, the srid change is not and I notice that your definition uses srid=-1.

It might be safer to not specify any srid in which case I think it will default to the appropriate value. I'm not sure if you can do this on the addgeometrycolumn() function. So we might just need to fiddle with stuff like this in the transition.

-Steve

On 7/8/2013 4:15 PM, Dave Potts wrote:

On 08/07/13 15:36, Daniel Kastl wrote:
hi Daniel, Steve,

I had a bit of play and came up with this

map.png is the output of running
shp2img -m demo.map

The file demo.map is a mapserver file for creating the picture

mktabl.sql is an sql script for making the tables

and sql2tab.sql dumps the contents of route_table and vertexts tables as
source,target,cost setting

One off the problems that I with the existing demo map is that most of
the costs of getting from a to b is always 1, this is designed to be
different.

I any body can think of any improvements, please let me known

Dave.

On Mon, Jul 8, 2013 at 10:27 PM, Dave Potts <dave.potts@pinan.co.uk
<mailto:dave.potts@pinan.co.uk>> wrote:

    On 08/07/13 14:27, Stephen Woodbridge wrote:

        On 7/8/2013 5:59 AM, Dave Potts wrote:

    hi Steve

    What bit of software was used to visualise the existing network?
     Is it based on a screen shot from something like mapserver?

    I for one am very great full to the vast amount of effort that has
    been put in to version 2.0.

Hi Steve,

With the sample data I was a bit lazy, I must admit.
Steve had this network image and a table, so I just used it.

I know that it doesn't work so well for TSP and Driving Distance. Some
larger network would be better.
But then the SQL to copy and paste also becomes much larger.

Well, I'm glad if someone could provide a better but still simple
sample network for the documentation.
It's not so easy to find something that covers all algorithms and is
still simple.
Right now it's still the better option than no sample network :wink:

Daniel

    Dave.

            hi List,

            Is it possible to rewrite the sample data network to (
http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

            )to include a more distinctive data sample?

            I have been trying to use it to provide an input data
            sample for a TSP
            problem. I had problems because the current network
            generates several
            routes that all look identical to the TSP so if you
            attempt to do some
            topological work, you end up with several identicial
            routes selections.

            For example the selection

            SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',X);

            where x is in the range 0-3 will generate 4 paths of
            which the profile is two routes of 121 or 212 measured in
            distance unit terms

        Dave,

        Daniel was trying to use one sample data for all the examples
        and in general this as worked well for most of the examples
        where we are computing simple routes. I think the driving
        distance and tsp examples probably need to have a slightly
        larger graph too adequately demonstrate the function.

        If you have another graph that you think might be more
        appropriate for demonstrating both of these commands commands
        I think there is room for it. I know Daniel and I are both
        tied up at the moment on funded project work at the moment,
        but it you were inclined to make an additional sample graph
        and update the docs we would love to get a pull request to
        help out the release.

        We have put a lot of effort into having complete documentation
        coverage of all the functions in 2.0. We still have some work
        to do but this is an area that we would be happy to get help
        on. If you don't have time to do this at least open a ticket
        so it gets tracked.

        Best regards,
          -Steve
        _______________________________________________
        pgrouting-dev mailing list
        pgrouting-dev@lists.osgeo.org
        <mailto:pgrouting-dev@lists.osgeo.org>
        http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

    _______________________________________________
    pgrouting-dev mailing list
    pgrouting-dev@lists.osgeo.org <mailto:pgrouting-dev@lists.osgeo.org>
    http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de <mailto:daniel.kastl@georepublic.de>
Web: http://georepublic.de/&gt;

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev