Skip to content

Commit

Permalink
Change dominance logic to not dominate away states that have differen…
Browse files Browse the repository at this point in the history
…t non-transit modes, allowing generic mode switching edges. Remove old bike-rental dominance logic. #865.
  • Loading branch information
mattwigway committed Dec 19, 2012
1 parent ac9f314 commit 90707db
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -260,8 +260,11 @@ public boolean dominates(State other) {
if (other.weight == 0) {
return false;
}
// Multi-state (bike rental) - no domination for different states
if (isBikeRenting() != other.isBikeRenting())

// Bike rental, bike parking, &c. If we have a different non-transit mode (for instance,
// we've picked up a rented bike, or have parked an owned bike in a bike parking lot),
// don't dominate away the states at the same vertices.
if (!getNonTransitMode().equals(other.getNonTransitMode()))
return false;

if (backEdge != other.getBackEdge() && ((backEdge instanceof PlainStreetEdge)
Expand Down

0 comments on commit 90707db

Please sign in to comment.