[pgrouting-dev] Bls: pgrouting-dev Digest, Vol 25, Issue 13

Haruhi Suzumiya haruhi.suzumiyachan at yahoo.com
Wed Jul 11 15:22:54 PDT 2012


Dear Mr. Steve 

Glad to know astar_sp already use ecludian. :)
I used astar_sp for the function from the start. 
Is there possibility i can see the script ecludian? i tried to find, but the script is in library.(am i right ?) or there is a documentation about it?

Boost Graph code, If i found some heuristic, i'll try to write it. :)
Thanks for the anwer,

Dear Mr. Sanak

Thanks for answer, nice tutorial. Thank you so much :)



This mailing list is really great, i hope everyone who 'new' used pgrouting know about it. Really help. Thankyou. :)



Thanks & Regards,
Robi








________________________________
 Dari: "pgrouting-dev-request at lists.osgeo.org" <pgrouting-dev-request at lists.osgeo.org>
Kepada: pgrouting-dev at lists.osgeo.org 
Dikirim: Selasa, 10 Juli 2012 19:21
Judul: pgrouting-dev Digest, Vol 25, Issue 13
 
Send pgrouting-dev mailing list submissions to
    pgrouting-dev at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
or, via email, send a message with subject or body 'help' to
    pgrouting-dev-request at lists.osgeo.org

You can reach the person managing the list at
    pgrouting-dev-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than
 "Re: Contents of pgrouting-dev digest..."


Today's Topics:

   1. Ask how to use : Euclidean distance heuristic in A*    in
      pgrouting (Haruhi Suzumiya)
   2. Re: Ask how to use : Euclidean distance heuristic in A* in
      pgrouting (Stephen Woodbridge)
   3. Re: Ask how to use : Euclidean distance heuristic in A* in
      pgrouting (Sanak)
   4. duplicate function names in core (Mario Basa)
   5. Re: Ask how to use : Euclidean distance heuristic in A* in
      pgrouting (Steve Horn)


----------------------------------------------------------------------

Message: 1
Date: Tue, 10 Jul 2012 09:24:53 +0800 (SGT)
From: Haruhi Suzumiya <haruhi.suzumiyachan at yahoo.com>
To: "pgrouting-dev at lists.osgeo.org" <pgrouting-dev at lists.osgeo.org>
Subject: [pgrouting-dev] Ask how to use : Euclidean distance heuristic
    in A*    in pgrouting
Message-ID:
    <1341883493.85457.YahooMailNeo at web190103.mail.sg3.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Good morning,
?
Dear mr/mrs, :)


I'm robi, my username is haruhi. I'm newbie in pgrouting.?
I want to try use euclidean distance heuristic in A* in pgrouting, may u
give me tutorial how to change the heuristic and recompile it?
 :)
Fyi, I'm use windows 7, postgre 1.8.4, pgRouting-1.02_pg-8.3.3 :)


Thankyou and regards,
Robi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20120710/f5ae9295/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 09 Jul 2012 23:27:22 -0400
From: Stephen Woodbridge <woodbri at swoodbridge.com>
To: pgrouting-dev at lists.osgeo.org
Subject: Re: [pgrouting-dev] Ask how to use : Euclidean distance
    heuristic in A* in pgrouting
Message-ID: <4FFBA11A.7000100 at swoodbridge.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 7/9/2012 9:24 PM, Haruhi Suzumiya wrote:
> Good morning,
>
> Dear mr/mrs, :)
>
> I'm robi, my username is haruhi. I'm newbie in pgrouting.
> I want to try use euclidean distance heuristic in A* in pgrouting, may u
> give me tutorial how to change the heuristic and recompile it? :)
> Fyi, I'm use windows 7, postgre 1.8.4, pgRouting-1.02_pg-8.3.3 :)

Hi Robi,

The pgRouting package already supports A* and by definition it uses a 
euclidean distance heuristic. See the function shortest_path_astar(), 
there also may be some wrapper function with names like astar_sp_*

The wrapper function are just higher level convenience function.

There are a couple of tutorials around
 that probably have good examples 
of how to use the functions.

If you want to change the heuristic, then you will need to look at the 
Boost Graph code that is used to implement it. We don't have any 
documentation on the implementation, but there are a lot of docs on 
Boost Graph and you can get help from that list.

What I would do is write a wrapper for the Boost Graph code and reads a 
text file to input the graph, sets up the structures to pass the data to 
algorithm to run it and then prints out the results. You can do all this 
outside of the database which greatly simplifies debugging your changes. 
When you have it working the way you want, then it should be a clean 
drop in replacement for the existing code or you can clone the existing 
code and rename it for the new algorithm.

-Steve W


------------------------------

Message: 3
Date: Tue, 10 Jul 2012 16:20:45
 +0900
From: Sanak <geosanak at gmail.com>
To: pgRouting developers mailing list <pgrouting-dev at lists.osgeo.org>
Subject: Re: [pgrouting-dev] Ask how to use : Euclidean distance
    heuristic in A* in pgrouting
Message-ID:
    <CALeT7PBPSN9cQ1Qyq0u6fNPdwRY3YoxPytyAc-EUFWass2j65A at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Robi,

I am not familiar with A* heuristic logic,
but if you want to build pgRouting Windows binary,
see following source and docs.

https://github.com/sanak/pgrouting
https://github.com/sanak/pgrouting/blob/mingw/BUILD.mingw
https://github.com/sanak/pgrouting/blob/mingw/BUILD.mingw64

And if you want to skip building dependency libraries,
use following build environment.

http://sdrv.ms/NFCgr2
+- Build.zip     ... for 32bit work folder. (extract to "C:\")
+- MinGW.zip ... for 32bit build environment. (extract to "C:\" and run
"C:\MinGW\msys\1.0\msys.bat")
+- Build64.zip ... for 64bit work folder. (extract to "C:\")
+- ming64.zip ... for 64bit build environment. (based on PostGIS one.
extract to "C:\" and run "C:\ming64\msys\msys.bat")

Regards,

2012/7/10 Stephen Woodbridge
 <woodbri at swoodbridge.com>

> On 7/9/2012 9:24 PM, Haruhi Suzumiya wrote:
>
>> Good morning,
>>
>> Dear mr/mrs, :)
>>
>> I'm robi, my username is haruhi. I'm newbie in pgrouting.
>> I want to try use euclidean distance heuristic in A* in pgrouting, may u
>> give me tutorial how to change the heuristic and recompile it? :)
>> Fyi, I'm use windows 7, postgre 1.8.4, pgRouting-1.02_pg-8.3.3 :)
>>
>
> Hi Robi,
>
> The pgRouting package already supports A* and by definition it uses a
> euclidean distance heuristic. See the function shortest_path_astar(), there
> also may be some wrapper function with names like astar_sp_*
>
> The wrapper function are just higher level convenience function.
>
> There are a couple of
 tutorials around that probably have good examples of
> how to use the functions.
>
> If you want to change the heuristic, then you will need to look at the
> Boost Graph code that is used to implement it. We don't have any
> documentation on the implementation, but there are a lot of docs on Boost
> Graph and you can get help from that list.
>
> What I would do is write a wrapper for the Boost Graph code and reads a
> text file to input the graph, sets up the structures to pass the data to
> algorithm to run it and then prints out the results. You can do all this
> outside of the database which greatly simplifies debugging your changes.
> When you have it working the way you want, then it should be a clean drop
> in replacement for the existing code or you can clone the existing code and
> rename it for the new algorithm.
>
> -Steve W
>
 ______________________________**_________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/pgrouting-dev<http://lists.osgeo.org/mailman/listinfo/pgrouting-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20120710/72b00301/attachment-0001.html>

------------------------------

Message: 4
Date: Tue, 10 Jul 2012 17:23:19 +0800
From: Mario Basa
 <mario.basa at gmail.com>
To: pgrouting-dev at lists.osgeo.org
Subject: [pgrouting-dev] duplicate function names in core
Message-ID:
    <CAJwAmBPWaLmxBwy2iJMTwG+WvqO=ZqJt4OKWj1tr0SKJunJKwA at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hello,

I am encountering problems placing the drivedist.c and
boost_drivedist.cpp into core (everything compiles, drivedist works
but astar searches dumps core. If I take out drivedist, astar works
like normal.), so I decided to poke around the source. I just found
out that there are so many duplicate functions (i.e.
finish(),text2char(),etc.) and struct names
 (edge_column,etc.) in each
of the C files.

Since C does not have any namespace functionality nor function
overloading, I don't have any idea which one will be called whenever
there is a library call. Scary since this will be difficult to debug.

Now that pgRouting is getting source contributions, I think this will
be a good time that we start discussing function naming conventions to
avoid duplicates as well as directory (core and extensions)
structures.

Regards,

Mario.


------------------------------

Message: 5
Date: Tue, 10 Jul 2012 08:21:20 -0400
From: Steve Horn <steve at stevehorn.cc>
To: pgRouting developers mailing list <pgrouting-dev at lists.osgeo.org>
Subject: Re: [pgrouting-dev] Ask how to use
 : Euclidean distance
    heuristic in A* in pgrouting
Message-ID:
    <CAFLkBaW9+mPjHz_tLZ=9owhdFowXjs3ieSLmPQUqqAu4Wix7ag at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Robi,
Since you have the instructions on how to recompile, I can tell you that
the heuristic function can be changed in the file astar_boost_wrapper.cpp
in the core/src directory around line 82. Look for the comment:

//You can choose any heuristical function from below
//return ::max(dx, dy);
//return ::sqrt(dx * dx + dy * dy)/4;
//return 0;
return (::fabs(dx)+::fabs(dy))/2;

On Tue, Jul 10, 2012 at 3:20 AM, Sanak <geosanak at gmail.com> wrote:

> Hi
 Robi,
>
> I am not familiar with A* heuristic logic,
> but if you want to build pgRouting Windows binary,
> see following source and docs.
>
> https://github.com/sanak/pgrouting
> https://github.com/sanak/pgrouting/blob/mingw/BUILD.mingw
> https://github.com/sanak/pgrouting/blob/mingw/BUILD.mingw64
>
> And if you want to skip building dependency libraries,
> use following build environment.
>
> http://sdrv.ms/NFCgr2
>  +- Build.zip     ... for 32bit work folder. (extract to "C:\")
>  +- MinGW.zip ... for 32bit build environment. (extract to "C:\" and
 run
> "C:\MinGW\msys\1.0\msys.bat")
>  +- Build64.zip ... for 64bit work folder. (extract to "C:\")
>  +- ming64.zip ... for 64bit build environment. (based on PostGIS one.
> extract to "C:\" and run "C:\ming64\msys\msys.bat")
>
> Regards,
>
> 2012/7/10 Stephen Woodbridge <woodbri at swoodbridge.com>
>
>> On 7/9/2012 9:24 PM, Haruhi Suzumiya wrote:
>>
>>> Good morning,
>>>
>>> Dear mr/mrs, :)
>>>
>>> I'm robi, my username is haruhi. I'm newbie in pgrouting.
>>> I want to try use euclidean distance heuristic in A* in pgrouting, may u
>>> give me tutorial how to change the heuristic and recompile it? :)
>>> Fyi, I'm use windows 7, postgre 1.8.4, pgRouting-1.02_pg-8.3.3
 :)
>>>
>>
>> Hi Robi,
>>
>> The pgRouting package already supports A* and by definition it uses a
>> euclidean distance heuristic. See the function shortest_path_astar(), there
>> also may be some wrapper function with names like astar_sp_*
>>
>> The wrapper function are just higher level convenience function.
>>
>> There are a couple of tutorials around that probably have good examples
>> of how to use the functions.
>>
>> If you want to change the heuristic, then you will need to look at the
>> Boost Graph code that is used to implement it. We don't have any
>> documentation on the implementation, but there are a lot of docs on Boost
>> Graph and you can get help from that list.
>>
>> What I would do is write a wrapper for the Boost Graph code and reads a
>> text file to
 input the graph, sets up the structures to pass the data to
>> algorithm to run it and then prints out the results. You can do all this
>> outside of the database which greatly simplifies debugging your changes.
>> When you have it working the way you want, then it should be a clean drop
>> in replacement for the existing code or you can clone the existing code and
>> rename it for the new algorithm.
>>
>> -Steve W
>> ______________________________**_________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/**mailman/listinfo/pgrouting-dev<http://lists.osgeo.org/mailman/listinfo/pgrouting-dev>
>>
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>


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

------------------------------

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


End of pgrouting-dev Digest, Vol 25, Issue 13
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20120712/df108cd8/attachment-0001.html>


More information about the pgrouting-dev mailing list