You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve bike and/or bike2, for that create branch improve_bike
clean up code, e.g. InstructionList.getWayName, FlagEncoder.get*Type etc belongs somehow more together
introduce a preferred routing. Use 3 prefer similar to already existing + we then need a different FastestWeighting for bike
make it working that bike prefers tracks or other side roads more as currently too often national ways are chosen -> national ways is not really helpful to decrease priority as lots of streets e.g. in cities are part of such a relation even if they are only tertiary weight
A question to the "introduce a preferred routing" feature:
Will it be somehow possible to specify dynamically in the search request if I want the fastest route, or the "safest"?
some integration tests do not pass, e.g. please look into krems. Some are hard for an outsider as the one way near the river is bicycle:designated and the other is a bike route relation. So not sure which one is better
I'll add some more integration tests for my routes.
PriorityWeighting will only used for bike encoders. As for now only those encoders have a getPriority method.
I've added a bikeEncoder.collect method with a sorted map (which assigns every priority a 'double weight') which is more powerful than lots of if-then-else statements as one can easier overwrite super class behaviour and other stuff
I'm going to push some tunings shortly. Could you please add files/neudrossenfeld.osm.pbf and file files/harsdorf.osm.pbf to git, these are not yet in.
Regarding the wayType: yes, I forgot to include this in the client. But I would really like to have this separate so that the client can decide what is worth to being displayed. E.g. it could print just a summary saying: xy % of your tour is on sand etc. Also we will introduce more annotations like costs and warnings and attaching all this to the text will make too much.
Please have a look, all tests pass now (and should also in travis + your machine)
What I don't understand is why the test for neudrossenfeld and bike2 passes but in real world we see a strange detour ... hmmh even more strange it looks correct if the start is moved a bit upwards. Maybe that is the unpolished elevation data.
A highway "track" without grade should be assumed unpaved for racing bike i believe, because it is very frustating if you are guided via unpaved ways with a racingbike. I re-checked the tests, please guide me if you think something is wrong.
should be better separate (e.g. in the RacingBike class):
// for bike
if ("track".equals(highway) && trackType != null && !"grade1".equals(trackType)
// for racing bike
if ("track".equals(highway) && trackType == null )
I don't think that this separation would be good, because from what I see in the mapping praxis it is more likely that a highway track without grade and surface are unpaved. So any actions which might be triggered by detecting unpaved can also be safely taken for trekbiking. This espececially is true for the routing instruction. If I am told that it is unpaved I should look more carefully at a routing instruction in order not to miss a possiby hidden track behind some trees. Or do I miss something? As far as I know currently the bit is only used for routing instrctions, but even if some actions are determined by it, these also should be ok, even if it is only an assumption that this track is most probably unpaved.
You also need the first line IMHO. This line is for the case that the track has tracktype , but other than grade1. In the grade1 case, the marking as unpaved would be wrong.
Great that you found someething in bike2. I had a look on the code - it would be great if there would be more comments on what you are calculating there. I gave up to try to understand the formulas after 1 minute or so. I allso believe that bike2 should check if a way is paved or unpaved. It should decrease the upward speed for unpaved more rapidly compared to paved. 12% increase are always hard, but much harder on a bad track.
I gave up to try to understand the formulas after 1 minute or so.
I just decrease the speed for ele increase, and increase the speed for ele decrease. The only problem is that I want a stronger speed-decrease (compared to the speed-increase) for the same elevation difference to simulate loosing energy and avoiding hills.
(for the reverse speed this has to be the opposite but again keeping in mind that up+down difference)
12% increase are always hard, but much harder on a bad track.
Yes, sure, that improvement is for a next version ...
Activity
karussell commentedon Apr 29, 2014
We already have this and will be recognized in the "preferred" weighting
ratrun commentedon May 1, 2014
A question to the "introduce a preferred routing" feature:
Will it be somehow possible to specify dynamically in the search request if I want the fastest route, or the "safest"?
karussell commentedon May 1, 2014
All is possible without CH, but for our hosted solution we use CH.
towards #190, todo: use prefer weighting
karussell commentedon May 6, 2014
@ratrun I've pushed the branch https://github.com/graphhopper/graphhopper/tree/improve_bike would you mind to check your tracks?
Notes:
ratrun commentedon May 8, 2014
I'm going to push some tunings shortly. Could you please add files/neudrossenfeld.osm.pbf and file files/harsdorf.osm.pbf to git, these are not yet in.
ratrun commentedon May 8, 2014
Please check commit ratrun@9244185 , which improves the weighting function. Additionally the krems testcase is fixed.
ratrun commentedon May 8, 2014
Please check commits 884cce6
and 3620493, which re-activate waytype information for bicycle route instructions.
karussell commentedon May 8, 2014
Hmmh, we should really get this line ending thing solved. Normally you don't need to do anything manually as I've set the following in .gitattributes
Which means: on your machine all is fine and git stores only the correct line ends. Do you have a latest git version? I use 1.7.9.5
I'll try to integrate the changes manually for now.
karussell commentedon May 8, 2014
Regarding the wayType: yes, I forgot to include this in the client. But I would really like to have this separate so that the client can decide what is worth to being displayed. E.g. it could print just a summary saying: xy % of your tour is on sand etc. Also we will introduce more annotations like costs and warnings and attaching all this to the text will make too much.
What do you think of moving this to the client?
integrated @ratrun suggestions in #190
karussell commentedon May 8, 2014
Please have a look, all tests pass now (and should also in travis + your machine)
What I don't understand is why the test for neudrossenfeld and bike2 passes but in real world we see a strange detour ... hmmh even more strange it looks correct if the start is moved a bit upwards. Maybe that is the unpolished elevation data.
10 remaining items
ratrun commentedon May 8, 2014
A highway "track" without grade should be assumed unpaved for racing bike i believe, because it is very frustating if you are guided via unpaved ways with a racingbike. I re-checked the tests, please guide me if you think something is wrong.
karussell commentedon May 8, 2014
I agree for racing bike but not for normal bike. So this change:
should be better separate (e.g. in the RacingBike class):
?
ratrun commentedon May 8, 2014
I don't think that this separation would be good, because from what I see in the mapping praxis it is more likely that a highway track without grade and surface are unpaved. So any actions which might be triggered by detecting unpaved can also be safely taken for trekbiking. This espececially is true for the routing instruction. If I am told that it is unpaved I should look more carefully at a routing instruction in order not to miss a possiby hidden track behind some trees. Or do I miss something? As far as I know currently the bit is only used for routing instrctions, but even if some actions are determined by it, these also should be ok, even if it is only an assumption that this track is most probably unpaved.
karussell commentedon May 8, 2014
Ah, ok. But then we don't need the first line. I'll merge your changes soon.
ratrun commentedon May 8, 2014
You also need the first line IMHO. This line is for the case that the track has tracktype , but other than grade1. In the grade1 case, the marking as unpaved would be wrong.
karussell commentedon May 8, 2014
ah, yes, you're right. BTW: there are at least two ugly bugs for calculating the speed in bike2 ...
ratrun commentedon May 8, 2014
Great that you found someething in bike2. I had a look on the code - it would be great if there would be more comments on what you are calculating there. I gave up to try to understand the formulas after 1 minute or so. I allso believe that bike2 should check if a way is paved or unpaved. It should decrease the upward speed for unpaved more rapidly compared to paved. 12% increase are always hard, but much harder on a bad track.
karussell commentedon May 8, 2014
I just decrease the speed for ele increase, and increase the speed for ele decrease. The only problem is that I want a stronger speed-decrease (compared to the speed-increase) for the same elevation difference to simulate loosing energy and avoiding hills.
(for the reverse speed this has to be the opposite but again keeping in mind that up+down difference)
Yes, sure, that improvement is for a next version ...
other tunings + fixes from @ratrun for #190
ratrun commentedon May 8, 2014
Thanks for the bike2 fixes.
I would love to have the pavement dependent "bike2" routing already in the upcoming version. In mountain terrains, "bike2" is still unusable. Here is one example: http://127.0.0.1:8989/?point=48.019898%2C16.016006&point=47.992736%2C15.958586&vehicle=bike2
There are two problems here: serpentine shortcut from right at the beginning downwards. It is nice with a mountain bike, but with a trecking bike everyone roll down on the road �. The next upcoming 5��00 hm climb over unpaved tracks on 3.6km upwards will make every touring cyclist prevent using graphhopper ever again.
karussell commentedon May 8, 2014
I'll see how hard that is (or would love a pull request or similar :))
karussell commentedon May 8, 2014
Closed via #200, serpentine improvements will go into #201
merged bike improvements, #190