-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReverseSearch field is now on StreetRouter #296
base: dev
Are you sure you want to change the base?
Conversation
Instead of ProfileRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisiting this in October 2020, we're no longer using point to point routing much and I'm trying to understand what exactly this change does. It seems like this is making forward and backward searches a property of an individual street search, rather than something that is set across an entire request. This would facilitate doing several searches in different directions within a single request.
StreetRouter.State state = streetRouter.getStateAtVertex(startVertexStopIndex); | ||
if (state != null) { | ||
StreetPath streetPath; | ||
if ((accessMode == LegMode.CAR_PARK || accessMode == LegMode.BICYCLE_RENT) && streetRouter.previousRouter != null) { | ||
streetPath = new StreetPath(state, streetRouter, accessMode, | ||
transportNetwork); | ||
} else { | ||
streetPath = new StreetPath(state, transportNetwork, false); | ||
streetPath = new StreetPath(state, transportNetwork, streetRouter.reverseSearch); //reverse search is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and on new L125 it's not clear to me why we're replacing hard-coded booleans with variables, accompanied with comments that state the values of those variables are constants.
for (Map.Entry<Integer, List<Transfer>> entry: transfersWithSameStart.entrySet()) { | ||
StreetRouter streetRouter = new StreetRouter(transportNetwork.streetLayer); | ||
//reverse search is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again here upon first reading I don't understand the comments asserting that certain values are true or false.
Accidentally closed when cleaning up branches. I would like to revisit these old pull requests and determine whether they're still relevant. |
Instead of ProfileRequest
Since I wasn't able to make tests for change. I tested with comparing two saved requests.
Times, distances and paths are the same also for Bike rental and P+R.