[Routing] IRouteMetric selection for TurnRestrictedMultiTargetDijkstraRouter route method
Marcus Wolschon
Marcus at Wolschon.biz
Mon Sep 6 20:41:22 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 06.09.2010 15:05, schrieb Oleg Demchenko:
> Hi Marcus and All.
>
> I'm successfully running route estimation method with a default
> ShortestRoteMetric, but results are not acceptable for my task.
> method selects short, but very small roads first, instead of
> motorways and other fast driving roads.
>
> From a description I see that most suitable for my task is
> StaticFastestRouteMetric - metric counting the travel-time of the
> way using fixed averaged for known highway-types
>
> But when I'm trying to initialize StaticFastestRouteMetric object
> , I'm get an exception from TrafficMessageStore.java module, when
> program trying connect to external Traffic Message source
>
> private TrafficMessageStore() { * this.myDatabaseURL =
> Settings.getInstance().get("tmc.storepath", getDefaultURL());*
> this.myConnection = getConnection(); }
What exception do you get?
>
> I don't need any TrafficMessage for my purpose. Metric which
> prefer "fastest" roads building a path, will be suitable for my
> situation.
>
> Questions: 1) how to remove traffic logic from this metric?
Take the source, copy this metric to a new file, remove it, rename it
and there you have a new Metric.
> Any setup or command line parameter?
Obvisiously you can store the empty tmc-message -store in another
directory using the
*tmc.storepath -setting
(in ~/libosm/preferences.xml or using the --set or --override
paramerters described
in --help or at
http://sourceforge.net/apps/mediawiki/travelingsales/index.php?title=Traveling_Salesman
)
*
There is no way to use a command-line parameter to remove code from a
class.
> 2) In which source is defined average car speed depending on a way
> type?
>
The code of the metric should tell that:
http://travelingsales.svn.sourceforge.net/viewvc/travelingsales/trunk/osmnavigation/src/org/openstreetmap/travelingsalesman/routing/metrics/StaticFastestRouteMetric.java?revision=1499&view=markup
they are fixed for the cost-calculation in the sourcecode at this time.
At some later time these:
http://travelingsales.svn.sourceforge.net/viewvc/travelingsales/trunk/osmnavigation/src/org/openstreetmap/travelingsalesman/navigation/traffic/
may be used. Currently they are only used for getEstimatedSpeed() .
Marcus
> p.s. I'm using last versions of libosm, osmnavigation and
> TravelingSalesMan project downloaded from SVN.
>
> Thanks in advance.
>
> -- All the best Oleg Demchenko
>
>
> _______________________________________________ Routing mailing
> list Routing at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/routing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyFQ+EACgkQf1hPnk3Z0cSm2QCcDO56uBMZEhNw2dsTKqfYjhEL
G3EAoMaiXIiYcDD25CE4H5J966Ba0VzM
=6uXM
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/routing/attachments/20100906/16cdb262/attachment.html>
More information about the Routing
mailing list