Patch to show alternate routes on mouseover.

68 views
Skip to first unread message

Francisco José Peñarrubia

unread,
Jan 31, 2012, 1:48:16 PM1/31/12
to David Turner, opentripp...@googlegroups.com
Hi David.

Please, can you check the patch and see if it works for you?.

Thanks in advance.

Best regards.

Fran.

2012/1/31 Francisco José Peñarrubia <fpen...@gmail.com>
I think I almost deserve a "RTFM".... ;-)


I will try this and send the patch soon.

Best.

Fran.


2012/1/31 David Turner <nov...@novalis.org>
I don't know how to create patches from within Eclipse.  I think it
might be under the Team menu.  I usually use the command-line git.  At
the command-line:

git diff > alternate-routes.patch



On Tue, 2012-01-31 at 18:54 +0100, Francisco José Peñarrubia wrote:
> Hi all.
>
> I have modifications for OTP in order to show alternative routes when
> mouseover, but I can't find a way to create the patch with Eclipse.
>
> Any advice about creating the patch with Eclipse? (I'm starting with
> GIT, sorry).
>
> Best regards.
>
> Fran.
>
> El 31/01/2012 17:49, David Turner escribió:
> > On Tue, 2012-01-31 at 11:03 -0500, Vivien Deparday wrote:
> >> Hello all:
> >> I have two commits on my fork that may be worth integrating in the main
> >> repository.
> >>
> >> 94964e19e9: Make the main tab (with the forms) scrollable because on
> >> small screens when the form is long (for instance with the bike triangle
> >> and other options), the form gets cut and you cannot submit the search
> >>
> >> 5b2f877c1a: Make it easier to add several layers directly in the
> >> config.js If there is only one layer, it is the same as before but if
> >> there are several, the layer switcher is automatically added to the
> >> interface.
> >>
> >> Let me know if they are fine.
> > They look good to me.  I just applied them.  Here's what I did:
> >
> > git remote add vdeparday
> > https://github.com/vdeparday/OpenTripPlanner.git
> >
> > git fetch
> >
> > git cherry-pick 94964e19e9
> > git cherry-pick 5b2f877c1a
> >
> > git push origin master
> >
> > Thanks for the patches!
> >
>





--
Francisco José Peñarrubia

Equipo gvSIG
Software Colaborativo



--
Francisco José Peñarrubia

Equipo gvSIG
Software Colaborativo
Show-alternative-routes-when-mouse-over.patch

Frank

unread,
Feb 2, 2012, 8:50:41 PM2/2/12
to OpenTripPlanner Developers
Thanks Fran! Very nice...committed
https://github.com/openplans/OpenTripPlanner/commit/79c79519821a7b82cd751a90ca3f31e4f04f3cb0

On Jan 31, 10:48 am, Francisco José Peñarrubia <fpena...@gmail.com>
wrote:
> Hi David.
>
> Please, can you check the patch and see if it works for you?.
>
> Thanks in advance.
>
> Best regards.
>
> Fran.
>
> 2012/1/31 Francisco José Peñarrubia <fpena...@gmail.com>
>
>
>
>
>
>
>
>
>
> > I think I almost deserve a "RTFM".... ;-)
>
> >http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.egit.do...
>
> > I will try this and send the patch soon.
>
> > Best.
>
> > Fran.
>
> > 2012/1/31 David Turner <nova...@novalis.org>
>  Show-alternative-routes-when-mouse-over.patch
> 13KViewDownload

Francisco José Peñarrubia

unread,
Feb 3, 2012, 6:14:53 AM2/3/12
to opentripplanner-dev
I will try to find time to port some other parts of
http://www.emtvalencia.es/geoportal.

Which funcionality do you think I should prioritize? (I cannot expend
much time, so I prefer to start with simple things :-)
If it doesn't matter, I think I will start with printing support (or
maybe by learning GIT.... ;-) ).

Have fun!!.

Fran.

El 03/02/2012 2:50, Frank escribi�:

> On Jan 31, 10:48 am, Francisco Jos� Pe�arrubia<fpena...@gmail.com>


> wrote:
>> Hi David.
>>
>> Please, can you check the patch and see if it works for you?.
>>
>> Thanks in advance.
>>
>> Best regards.
>>
>> Fran.
>>

>> 2012/1/31 Francisco Jos� Pe�arrubia<fpena...@gmail.com>


>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> I think I almost deserve a "RTFM".... ;-)
>>> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.egit.do...
>>> I will try this and send the patch soon.
>>> Best.
>>> Fran.
>>> 2012/1/31 David Turner<nova...@novalis.org>
>>>> I don't know how to create patches from within Eclipse. I think it
>>>> might be under the Team menu. I usually use the command-line git. At
>>>> the command-line:
>>>> git diff> alternate-routes.patch

>>>> On Tue, 2012-01-31 at 18:54 +0100, Francisco Jos� Pe�arrubia wrote:
>>>>> Hi all.
>>>>> I have modifications for OTP in order to show alternative routes when
>>>>> mouseover, but I can't find a way to create the patch with Eclipse.
>>>>> Any advice about creating the patch with Eclipse? (I'm starting with
>>>>> GIT, sorry).
>>>>> Best regards.
>>>>> Fran.

>>>>> El 31/01/2012 17:49, David Turner escribi�:


>>>>>> On Tue, 2012-01-31 at 11:03 -0500, Vivien Deparday wrote:
>>>>>>> Hello all:
>>>>>>> I have two commits on my fork that may be worth integrating in the
>>>> main
>>>>>>> repository.
>>>>>>> 94964e19e9: Make the main tab (with the forms) scrollable because on
>>>>>>> small screens when the form is long (for instance with the bike
>>>> triangle
>>>>>>> and other options), the form gets cut and you cannot submit the
>>>> search
>>>>>>> 5b2f877c1a: Make it easier to add several layers directly in the
>>>>>>> config.js If there is only one layer, it is the same as before but if
>>>>>>> there are several, the layer switcher is automatically added to the
>>>>>>> interface.
>>>>>>> Let me know if they are fine.
>>>>>> They look good to me. I just applied them. Here's what I did:
>>>>>> git remote add vdeparday
>>>>>> https://github.com/vdeparday/OpenTripPlanner.git
>>>>>> git fetch
>>>>>> git cherry-pick 94964e19e9
>>>>>> git cherry-pick 5b2f877c1a
>>>>>> git push origin master
>>>>>> Thanks for the patches!
>>> --

>>> Francisco Jos� Pe�arrubia


>>> Equipo gvSIG
>>> Software Colaborativo
>> --

>> Francisco Jos� Pe�arrubia


>>
>> Equipo gvSIG
>> Software Colaborativo
>>
>> Show-alternative-routes-when-mouse-over.patch
>> 13KViewDownload

--
Fran Pe�arrubia
Scolab
www.scolab.es

Asociaci�n gvSIG
www.gvsig.com

Laurent Gregoire

unread,
Feb 3, 2012, 6:40:16 AM2/3/12
to Francisco José Peñarrubia, opentripplanner-dev
Hi Francisco,

If I remember well you were talking about bike rental support at one
point, is it still something you plan to backport? (I know, you said
starting with simple stuff... which bike rental is probably not)

--Laurent

2012/2/3 Francisco José Peñarrubia <fpen...@gmail.com>:


> I will try to find time to port some other parts of
> http://www.emtvalencia.es/geoportal.
>
> Which funcionality do you think I should prioritize? (I cannot expend much
> time, so I prefer to start with simple things :-)
> If it doesn't matter, I think I will start with printing support (or maybe
> by learning GIT.... ;-) ).
>
> Have fun!!.
>
> Fran.
>

> El 03/02/2012 2:50, Frank escribió:
>
>> Thanks Fran!  Very nice...committed
>>
>> https://github.com/openplans/OpenTripPlanner/commit/79c79519821a7b82cd751a90ca3f31e4f04f3cb0
>>

>> On Jan 31, 10:48 am, Francisco José Peñarrubia<fpena...@gmail.com>


>> wrote:
>>>
>>> Hi David.
>>>
>>> Please, can you check the patch and see if it works for you?.
>>>
>>> Thanks in advance.
>>>
>>> Best regards.
>>>
>>> Fran.
>>>

>>> 2012/1/31 Francisco José Peñarrubia<fpena...@gmail.com>


>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> I think I almost deserve a "RTFM".... ;-)
>>>> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.egit.do...
>>>> I will try this and send the patch soon.
>>>> Best.
>>>> Fran.
>>>> 2012/1/31 David Turner<nova...@novalis.org>
>>>>>
>>>>> I don't know how to create patches from within Eclipse.  I think it
>>>>> might be under the Team menu.  I usually use the command-line git.  At
>>>>> the command-line:
>>>>> git diff>  alternate-routes.patch

>>>>> On Tue, 2012-01-31 at 18:54 +0100, Francisco José Peñarrubia wrote:
>>>>>>
>>>>>> Hi all.
>>>>>> I have modifications for OTP in order to show alternative routes when
>>>>>> mouseover, but I can't find a way to create the patch with Eclipse.
>>>>>> Any advice about creating the patch with Eclipse? (I'm starting with
>>>>>> GIT, sorry).
>>>>>> Best regards.
>>>>>> Fran.

>>>> Francisco José Peñarrubia


>>>> Equipo gvSIG
>>>> Software Colaborativo
>>>
>>> --

>>> Francisco José Peñarrubia


>>>
>>> Equipo gvSIG
>>> Software Colaborativo
>>>
>>>  Show-alternative-routes-when-mouse-over.patch
>>> 13KViewDownload
>
>
> --

> Fran Peñarrubia
> Scolab
> www.scolab.es
>
> Asociación gvSIG
> www.gvsig.com
>

--
LΔЦRΞͶΓ
lαυrεητ. grεgοιrε @ gmαιl. cοm

Frank Purcell

unread,
Feb 3, 2012, 7:15:02 AM2/3/12
to opentripplanner-dev Planner Dev
Hey Fran,

I'll second Laurent's suggestion for supporting a Bike rental mode (plus, printing is already done to a certain extent ... I borrowed your idea, which is genius btw, of copying over the layers from the Ext UI's map to a second OpenLayers map in a non-Ext html print page). 

Another nice thing (beyond Bike rentals) about the Valencia map, which otp is lacking, are the route icons showing route number (route-short-name) information.  The current otp map icons only show a mode icon for each leg, but no route information for transit modes.  See https://github.com/openplans/OpenTripPlanner/issues/576

Another area of improvement would be the trip form, and a better interface for selecting mode of travel than a drop-down list.  https://github.com/openplans/OpenTripPlanner/issues/482.  Again, the Valencia radio buttons a better alternative.

Take care,
Frank

Laurent Gregoire

unread,
Feb 3, 2012, 7:49:08 AM2/3/12
to Francisco José Peñarrubia, opentripplanner-dev
Hi Francisco,

A good start may be effectively to have a generic support for
"sharing" (bike, car) on the OTP router itself (or only bike support?
car / bike may be too distinct by their use to generify them, and
there is no definite car support in OTP yet afaik). The graph builder
can then be adapted to various local sources of information. As far as
I know, there are OSM tag for bike rental stations, so they may be a
good default implementation to start with, and they do not have any
strings attached as they are public obviously.

--Laurent

2012/2/3 Francisco José Peñarrubia <fpen...@gmail.com>:

> Hi Laurent.
>
> Bike rental support is something interesting because can be applied also for
> car sharing and any other "sharing".
> But our implementation is not generic. It works for ValenBisi service (wich
> is simillar to many other cities, I guess. For example Paris and other
> JCDecaux services), and I don't know how much work it would take to adapt to
> other service, or make it generic. Probably, more time than I can dedicate
> in my spare time.
>
> We are involved in an electric car sharing project that may help to push
> this part, and this time it will help to make the code more generic.
> Unfortunatelly, the project is in a very early stage, and I don't know if it
> will be stopped or not (yet).
>
> Anyway, I can start with this, and see... but be patient :-( . It will help
> also to do this job using some kind of public service with written
> permission to use their data (bikes or cars). And some help from OTP
> developers in order to design a good interface suitable for all cases. I can
> use the buttons we use in emtvalencia, but I guess the solution will be
> better with some design or comments from more developers.
>
> Also, there is a problem about routing algorithm. It works with A* search,
> but I think it cannot be used with the contraction hierarchies algorithm.
> So, if you wants to mix bus, metro and bike sharing, it will work only if A*
> is used.
>
> Opinions?
>
> Cheers!.
>
> Fran.
>

Francisco José Peñarrubia

unread,
Feb 3, 2012, 8:43:11 AM2/3/12
to opentripplanner-dev
Hi Laurent.

I don't know if OpenStreetMaps has bike sharing stations. We directly
connect to the ValenBisi service to know the position of bike sharing
stations (and also recently to show how many bikes are available, etc).
Searching with Google I've found this excelent presentation:

http://www.slideshare.net/oliverobrien/visualising-bike-share

and it talks about this project:

https://github.com/andrewl/watb/

Maybe a good starting point to deal with this kind of service. Anyway,
could you point out to me the information about bike sharing points in OSM?

Thanks!.

Fran.

--

Laurent Gregoire

unread,
Feb 3, 2012, 9:57:23 AM2/3/12
to Francisco José Peñarrubia, opentripplanner-dev
OSM tag is called amenity=bicycle_rental. On the standard rendering,
it appears as a small bike icon with a key on top of it.
There are also keys for max capacity, operator name, stand name...
See here the specs:
http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dbicycle_rental

As far as OSM coverage, I do not know if it's well covered or not. I
know in Paris they are present, I did not checked for other cities.

HTH,

Matt Conway

unread,
Feb 3, 2012, 2:05:05 PM2/3/12
to opentripplanner-dev
I like the bike sharing the most, although I understand it's not a quick port. It may be wise to think about how the model can be expanded to include car share, as Laurent suggested. It may also be wise to think about how methods can be modularized, because I suspect that leaving a bike in a secure storage facility or a car in a parking lot will have many of the same challenges as sharing (it's basically a one-way bike share).
-Matt

2012/2/3 Laurent Gregoire <laurent....@gmail.com>

Laurent Gregoire

unread,
Feb 4, 2012, 6:30:19 AM2/4/12
to opentripplanner-dev
Below are some thoughts, hope that will help. Don't take it too
seriously as I do not see the implication of all this code-wise very
clearly as for now.

Bike-rental, owning your bike and transit multiply the use-case
matrix. As a user I could see the following various scenario (let's go
wild):
- You own your bike and you want to ride up to your destination,
- You own your bike but you want to park it (eventually filtering type
of parking: guarded, covered, ...) before your destination and
terminating your journey walking,
- Same as previous, but for the return journey: you have to pick-up
your bike at a dedicated location (which could even be "remembered"
somehow),
- You want to rent a bike or use transit, whichever is the
cheapest/fastest/more convenient,
- You want to rent a bike and leave it near the destination,
- You rent a bike and want to park it near the destination for the
return journey,
- Same as the previous cases, but for the return journey,
- Various bike/transit mixed mode (owning your bike or renting one),
renting a bike after a stretch of transit for example,
- ...

The most detailed example I see would be to ride your own bike up to
some station, park it, walk to the platform, take some transit, walk
to a bike rental station, bike to another bike rental station, leave
it, walk up to your destination. And with an intelligent system that
remembered that I left my bike at some bike stand on the way in, and
thus restricting the proposals on the way back to go through this
location in order to get my bike back :)

I guess here the trick is to reduce all this to A) a manageable set of
options that a standard Joe user can easily use, B) something that is
implementable :)

As far as I understood from previous discussions about bike sharing
mode, there was two type of implementations possible: 1) splitting the
whole graph in two sub-spaces for representing the two states (with a
rented bike, w/o a rented bike), with vertices to cross one subspace
to the other at bike rental location nodes (possibly crossing only
one-way if the location is empty or full), 2) attaching a "state" to
the graph traversal front, state change happening in bike rental
nodes. And as far as I remember that was option 1) that was chosen on
the Valencia development (please correct me if I'm wrong). But to
handle a large state matrix (foot/own bike/rental bike/car/...) option
1) could eventually be limited in the long-term as it imply more
memory and a static view of state changes, right? I'm not a specialist
here but option 2) seems more flexible.

Adding nodes for bike parks and bike rental station with the following
state change matrix could cover many cases:
States:
State 1. walk mode
State 2. renting a bike (+state 2b, rented bike but walking alongside)
State 3. own bike (+state 3b, own bike but walking alongside)

State changes per nodes:
Node "bike rental station": state 1 > 2 (if bike available and "bike
rental mode" is ON), 2 > 1 (if station is not full)
Node "bike park": state 2 > 1, 3 > 1, 1 > 2 (if you already left your
rental bike here), 3 > 1 (if you already left your own bike here).

Possible arrival/departure state:
State 1. you start/arrive w/o a bike
State 2/2b. you already have a rented bike (from a previous journey)
State 3/3b. you start/arrive with your own bike

One issue I see here is state change 1>2 and 1>3 at bike park, as it
requires a specific parameter (remembering where your bike is parked).
But maybe bike park coverage is too far fetched. Especially that a
user can always park his bike almost anywhere, the requirement to park
your bike at a park stand is never "strict".

Is there a page already existing for bike-sharing? It may be wise to
start one if not to write down some specs/thoughts.

HTH,

--Laurent

Francisco José Peñarrubia

unread,
Feb 13, 2012, 5:00:02 AM2/13/12
to opentripplanner-dev
Salut Laurent.

First of all, thanks for the use case.

I have to admit I never thought in all these cases. Our algorithm deals
only with the case of merging bus and metro with bike sharing, and I
think it will be too much complicated to adapt it to all the use cases
you point out.

I will try to create a branch in GIT in order to learn to use it and put
there some small changes (in the beginning), and when I feel comfortable
with GIT, I will try to put bike sharing support. It will take long
time, I guess... :-(

Cheers, and thanks again for your analysis.

Fran.

--

Reply all
Reply to author
Forward
0 new messages