I can't comment on the implementation since I'm not familiar with the
inner workings of OTP, but I'd like to say very cool and thanks for
working on this! It has reignited my interest in getting an OTP
instance setup for the Washington D.C. region.
-Josh
On 04/10/2012 12:01 PM, Laurent GRÉGOIRE wrote:
> The approach taken is to reuse multi-state per vertex capabilities for
> non-transit mode (no duplication of the street graph needed). IMHO this
> is more flexible in the long term if a more complex states matrix is
> needed (I'm thinking of park-and-ride here).
Thanks for your work on this, and your detailed explanation. We were
just discussing bike rental capabilities recently, and you have
implemented exactly the approach we planned to use (mode-switching loop
edges).
> I break here the assumption that an edge link two different vertexes:
> the bike rental vertex is unique per rental station. However this has an
> impact on backward assertion test in StateEditor which has to be
> disabled when both vertex are equals (to confirm -- does this assertion
> is really mandatory?)
I wouldn't say it's mandatory. I believe it was just added when
debugging a specific problem, and left in as a general graph coherency
safeguard. Of course it would also be possible to make the bike
rental/drop off edges parallel to the street/bike-station link edges
(i.e. have a rental edge connect the station to the street). It would
also be possible to eliminate the link edges or distinct edge types
entirely by making the behavior of the rental/dropoff loop edge
mode-sensitive.
> - Addition of a new boolean state "bike renting" in State.StateData.
> - I break here the assumption that *the non-transit traverse mode is
> fixed* : this is the biggest change so far, and imply that the current
> traverse mode depends on the current state.
Yes, we were going to need to change this. I was expecting to add a
back-mode field to State to express which mode was used to traverse the
back-edge, instead of the wrapped edgeNarratives we now use. In fact I
think the main reason EdgeNarratives still exist distinctly from edges
is to indicate mode. What does everyone think of this approach?
Traversal mode seems like state to me.
> - State.dominates() take into account bike rental mode. Two different
> bike-renting states never dominates each other to allow for proper
> handling of multiple states per vertex.
Right, I think we want states of different modes to be incomparable
(i.e. neither dominates the other).
> I'd love to hear some feedback on this development before going further;
> if the current patch is heading in the correct direction and any other
> comments.
It sounds like you have adequately considered all the implications of
bike rental, and would be happy to further discuss specific
implementation decisions. The main challenge at this point is more
organizational: I am in the midst of a major overhaul of TraverseOptions
and the stack of Service interfaces we go through to get a path. (see
branch sptservice, more on that in a later email.) We should definitely
coordinate over the next couple of weeks so we don't end up with two
interesting branches that are near impossible to merge.
-Andrew
Thanks for your work on this, and your detailed explanation. We were just discussing bike rental capabilities recently, and you have implemented exactly the approach we planned to use (mode-switching loop edges).The approach taken is to reuse multi-state per vertex capabilities for
non-transit mode (no duplication of the street graph needed). IMHO this
is more flexible in the long term if a more complex states matrix is
needed (I'm thinking of park-and-ride here).
I wouldn't say it's mandatory. I believe it was just added when debugging a specific problem, and left in as a general graph coherency safeguard. Of course it would also be possible to make the bike rental/drop off edges parallel to the street/bike-station link edges (i.e. have a rental edge connect the station to the street). It would also be possible to eliminate the link edges or distinct edge types entirely by making the behavior of the rental/dropoff loop edge mode-sensitive.I break here the assumption that an edge link two different vertexes:
the bike rental vertex is unique per rental station. However this has an
impact on backward assertion test in StateEditor which has to be
disabled when both vertex are equals (to confirm -- does this assertion
is really mandatory?)
It sounds like you have adequately considered all the implications of bike rental, and would be happy to further discuss specific implementation decisions. The main challenge at this point is more organizational: I am in the midst of a major overhaul of TraverseOptions and the stack of Service interfaces we go through to get a path. (see branch sptservice, more on that in a later email.) We should definitely coordinate over the next couple of weeks so we don't end up with two interesting branches that are near impossible to merge.I'd love to hear some feedback on this development before going further;
if the current patch is heading in the correct direction and any other
comments.
-- Fran Peñarrubia Scolab www.scolab.es Asociación gvSIG www.gvsig.com
Realtime availability is only used for trips planned for times near now
anyway; for future trips, we assume that everything is available.
Yes, this is what I'm worried about. Of course, we might do thatanyway, since someone could come along and snag the last bike.
I'm also not 100% sure about planning based on estimates of
availability. I worry about stranding someone far away from
civilization with no bike available. This is especially true if there
is a sudden surge in demand because of (for instance) a transit strike.
There, our normal predictors would be too optimistic.
If we could tell people where all the nearby bike share stations are, we
could plan the sort of hyperpath that you suggest, which tells people to
go to one of a set of nearby bike share stations. I worry that this
would end up multiplying the number of states too much, as states with
bikes rented from different stations would have to be different (at
least within some epsilon).
Or we could take the approach used currently with transit: propose a set of (3 or more) paths with "bike rental station" banning: ie computing three time a path, the first one with all stations, the second one w/o the set of used stations of the first, etc... The user would then pick the best one based on bike availability, as displayed in the client interface. And if we choose a small enough waiting time for a station with no bike available, this station could then be still proposed as a second of third choice. But that may be a bit complex to implement in case of "bike rental + transit" modes.