Hi Patrick,
Sorry for the delay in my answer, I was at a conference all day long
yesterday.
Indeed as Jorden said the P+R development Mecatran made (based on an
older proof of concept) has been merged recently and should be available
in the master branch.
Just a few notes on the implementation:
- P+R sources are based on static OSM data (it rely on a quite precise
geometry and OSM is the easiest way to define it). By definition P+R are
static structures.
- A drivable entrance and a walkable exit has to be defined, and
*connected with a common node* to the way area defined as the P+R.
- There is no support for P+R nodes, but usually this is not a problem
as a P+R is almost always defined as an area with a surface. Sometimes
subterranean P+R are defined using only entrance/exit nodes: they have
to be translated to areas with appropriate levels. Keeping entrance/exit
nodes is harmless.
- There is also no support for P+R defined as "relations" between areas.
The case is rare though (never seen any), relation are needed only if
you have holed P+R, which is rather unusual. Anyway only the outer
polyline is needed so tagging the appropriate outer(s) way area(s)
should be enough.
- When building the graph with P+R support, the number of P+R should be
printed during the building process, unaccessible P+R are printed as
warnings.
- P+R support is enabled/disabled using the staticParkAndRide flag of
the OpenStreetMapGraphBuilderImpl class, it is enabled by default so
nothing have to be done in particular.
- Parking/walking cost is based on simple distance between entrance
location and geometric center of the P+R area location, as you do not
know in advance where your car will be parked. This distance is weighted
with a constant "convolution factor" taking into account the fact that
you have to drive alongside alleys --and not smashing other cars to go
directly to some empty spot :). We do not take into account in this
computation the number of levels for multi-storey parkings, which can be
defined in OSM tags; this support would be straightforward to add.
- The results rely on proper weighting for car segments. Usually this is
where we lack details: if you assume car speed to be too fast you will
end-up parking to the nearest P+R of your destination and walking from
there; but this is not what you usually want, usually the aim of P+R is
favoring transit over driving in urban areas. We solved this in our
early prototype using a constant large coefficient for weighting driving
portion, as we were missing a very precise car speed estimation; since
then the car support has improved so this may be less necessary. But
this weighting is usually harmless as it only impact the generalized
cost of car vs other modes, neither the timings nor the comparisons
between same mode.
Maybe Jorden can give some feedback on the last point for the NL
project, on the impact of estimated car speed on getting reliable P+R
results.
Attached some teaser screenshots to see what it looks like.
HTH,
--
Laurent GRÉGOIRE
laurent....@gmail.com
On 21/02/14 10:08, Jorden Verwer wrote:
> Park and ride support was only merged into OTP master last week, so it's a
> very recent addition (even though the code itself is somewhat older).
> Laurent Grégoire of Mecatran (the company that wrote the code) is probably
> the person who can explain it to you best. I believe he also reads this
> mailing list, so he'll probably reply in a couple of days or so.
>
> If you already want to try it yourself, check out the latest version of the
> master branch, switch to the OpenLayers client and give it a try. It's not
> going to work without OSM data, though, but you can just run it and see
> what happens.