[pgrouting-dev] testing TSP example fails
Stephen Woodbridge
woodbri at swoodbridge.com
Sat Jun 15 13:46:25 PDT 2013
If you are in the pgrouting git source tree like:
git clone git://github.com/pgRouting/pgrouting.git
cd pgrouting
git checkout develop
cat tools/doit # this is my build script, it may not work for you
tools/doit
tools/test-runner.pl # this will run all the tests
The test script make a test database, loads the data and runs the tests.
If you look in src/tsp/test
CMakeLists.txt tsp-any-00.rest tsp-any-01.test tsp-any-03.rest
test.conf tsp-any-00.test tsp-any-02.rest tsp-any-03.test
tsp-any-00.data tsp-any-01.rest tsp-any-02.test
createdb runtests
psql runtests -c "create extension postgis"
psql runtests -c "create extension pgrouting"
psql runtests -f src/tsp/test/tsp-any-00.data # load some data
psql runtests -A -t -f src/tsp/test/tsp-any-00.test
psql runtests -A -t -f src/tsp/test/tsp-any-01.test
psql runtests -A -t -f src/tsp/test/tsp-any-02.test
psql runtests -A -t -f src/tsp/test/tsp-any-03.test
The output of each command should be the same as *.rest file.
-Steve
On 6/15/2013 4:39 PM, Stephen Mather wrote:
> Ubuntu 12.04LTS
>
> Postgis 2.0.1 r9979
> GEOS 3.3.8-capi-1.7.8
> proj 4.8.0
> gdal 1.9.2
> Libxml 2.7.8
>
> pgr_version ()
> 2.0.0-Dev
> V2.0.0-alpha,31,15ac46d,feature-travis,1.46.1
>
> When I run tests, it fails on every test w function not found. Do I need to prep the database in any way to run the tests?
>
> Stephen Mather <stephen at smathermather.com> wrote:
>
>> I have not tried tests yet but have have run astar and djikstra w no problem. When does vacation start... I can run tests asap... :)
>>
>> Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>>
>>> On 6/15/2013 2:44 PM, Stephen Mather wrote:
>>>> Hi All,
>>>>
>>>> More TSP for today. In testing the example in the docs against the
>>>> example data, I get what is to me a cryptic error:
>>>>
>>>> SELECT * FROM pgr_tsp('SELECT id AS source_id, x, y FROM
>>>> vertex_table','2,7,11',7);
>>>>
>>>> ERROR: Error TSP fail to findEulerianPath, check your distance matrix
>>>> is valid.
>>>
>>> This typically means there is something bad happening in the distance
>>> matrix that is getting passed to the TSP function. Hmmm.
>>>
>>> I would start with can you run the test cases or do they fail on your
>>> system.
>>>
>>> What OS system and versions of stuff are you running?
>>>
>>> There TSP solution for 3 points is a triangle, it is a trivial case
>>> where the input is the output. I thought is tested for that case but
>>> maybe not.
>>>
>>> BTW, I will be away on vacation without net access through June 25th, so
>>> I will not be much help until I get back.
>>>
>>> -Steve
>>>
>>>> ********** Error **********
>>>>
>>>> ERROR: Error TSP fail to findEulerianPath, check your distance matrix is
>>>> valid.
>>>> SQL state: XX000
>>>>
>>>> I get an entirely different error against my OSM data, but one error at
>>>> a time... .
>>>>
>>>> Best,
>>>> Steve
>>>>
>>>>
>>>> _______________________________________________
>>>> pgrouting-dev mailing list
>>>> pgrouting-dev at lists.osgeo.org
>>>> 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
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> 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
>
More information about the pgrouting-dev
mailing list