public abstract class GtfsFlexGraphModifier extends Object
Modifier | Constructor and Description |
---|---|
protected |
GtfsFlexGraphModifier(Graph graph) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkHopAllowsBoardAlight(State state,
FlexPatternHop hop,
boolean boarding)
Returns true if the given hop can be boarded/alighted.
|
void |
createBackwardHops(RoutingRequest request)
Create temporary edges and vertices from the transit network to the destination.
|
void |
createDirectHop(RoutingRequest rr,
FlexPatternHop originalPatternHop,
TransitStop fromStop,
TransitStop toStop,
GraphPath path) |
void |
createForwardHops(RoutingRequest request)
Create temporary edges and vertices from the origin into the transit network.
|
abstract StreetVertex |
getLocationForTemporaryStop(State s,
FlexPatternHop hop)
Subclasses can specify where the new temporary stop should be created, given a nearby
PatternHop.
|
abstract TraverseMode |
getMode()
Return the mode that the graph search should be in.
|
abstract SearchTerminationStrategy |
getSearchTerminationStrategy()
Return the termination strategy which should be used during the graph search.
|
protected TemporaryTransitStop |
getTemporaryStop(StreetVertex streetVertex,
State s,
RoutingContext rctx,
RoutingRequest options) |
protected TemporaryTransitStop |
getTemporaryStop(StreetVertex streetVertex,
State s,
RoutingContext rctx,
RoutingRequest options,
boolean forwards) |
abstract TemporaryPartialPatternHop |
makeHopNewFrom(RoutingRequest opt,
State state,
FlexPatternHop hop,
PatternDepartVertex from,
Stop fromStop)
Create a new
FlexPatternHop with a new "from" location (from a new destination to the route). |
abstract TemporaryPartialPatternHop |
makeHopNewTo(RoutingRequest opt,
State state,
FlexPatternHop hop,
PatternArriveVertex to,
Stop toStop)
Create a new
FlexPatternHop with a new "to" location (from the route to a new destination). |
abstract TemporaryPartialPatternHop |
shortenEnd(RoutingRequest opt,
State state,
TemporaryPartialPatternHop hop,
PatternStopVertex to,
Stop toStop)
From an existing TemporaryPartialPatternHop which has a new "from" location, create a new
TemporaryPartialPatternHop with the same "from" location and a new "to" location.
|
protected void |
streetSearch(RoutingRequest rr) |
void |
vertexVisitor(State state) |
protected Graph graph
protected GtfsFlexGraphModifier(Graph graph)
public abstract TraverseMode getMode()
public abstract SearchTerminationStrategy getSearchTerminationStrategy()
public abstract TemporaryPartialPatternHop makeHopNewTo(RoutingRequest opt, State state, FlexPatternHop hop, PatternArriveVertex to, Stop toStop)
FlexPatternHop
with a new "to" location (from the route to a new destination).opt
- Options for the graph searchstate
- State at which the original FlexPatternHop was found during the graph searchhop
- Original pattern hop to modifyto
- New "to" locationtoStop
- Stop for new "to" locationpublic abstract TemporaryPartialPatternHop makeHopNewFrom(RoutingRequest opt, State state, FlexPatternHop hop, PatternDepartVertex from, Stop fromStop)
FlexPatternHop
with a new "from" location (from a new destination to the route).opt
- Options for the graph searchstate
- Options for the graph searchhop
- Original pattern hop to modifyfrom
- New "from" locationfromStop
- Stop for new "from" locationpublic abstract TemporaryPartialPatternHop shortenEnd(RoutingRequest opt, State state, TemporaryPartialPatternHop hop, PatternStopVertex to, Stop toStop)
opt
- Options for the graph searchstate
- ptions for the graph searchhop
- Temporary pattern hop to modifyto
- New "to" locationtoStop
- Stop for new "to" locationpublic abstract boolean checkHopAllowsBoardAlight(State state, FlexPatternHop hop, boolean boarding)
public abstract StreetVertex getLocationForTemporaryStop(State s, FlexPatternHop hop)
s
- State at which PatternHop was foundhop
- PatternHop found during graph searchpublic void vertexVisitor(State state)
public void createForwardHops(RoutingRequest request)
request
- request for graph searchpublic void createBackwardHops(RoutingRequest request)
request
- request for graph searchprotected void streetSearch(RoutingRequest rr)
protected TemporaryTransitStop getTemporaryStop(StreetVertex streetVertex, State s, RoutingContext rctx, RoutingRequest options)
protected TemporaryTransitStop getTemporaryStop(StreetVertex streetVertex, State s, RoutingContext rctx, RoutingRequest options, boolean forwards)
public void createDirectHop(RoutingRequest rr, FlexPatternHop originalPatternHop, TransitStop fromStop, TransitStop toStop, GraphPath path)
Copyright © 2019. All rights reserved.