public abstract class AbstractIntersectionTraversalCostModel extends Object implements IntersectionTraversalCostModel
Modifier and Type | Field and Description |
---|---|
protected Integer |
maxLeftTurnAngle |
protected Integer |
maxRightTurnAngle |
protected Integer |
minLeftTurnAngle |
protected Integer |
minRightTurnAngle |
protected Double |
nonDrivingTurnCostFactor
Factor by which absolute turn angles are divided to get turn costs for non-driving scenarios.
|
Constructor and Description |
---|
AbstractIntersectionTraversalCostModel() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateTurnAngle(StreetEdge from,
StreetEdge to,
RoutingRequest options)
Calculates the turn angle from the incoming/outgoing edges and routing request.
|
protected double |
computeNonDrivingTraversalCost(IntersectionVertex v,
StreetEdge from,
StreetEdge to,
float fromSpeed,
float toSpeed)
Computes the turn cost in seconds for non-driving traversal modes.
|
abstract double |
computeTraversalCost(IntersectionVertex v,
StreetEdge from,
StreetEdge to,
TraverseMode mode,
RoutingRequest options,
float fromSpeed,
float toSpeed)
Compute the cost of turning onto "to" from "from".
|
protected boolean |
isLeftTurn(int turnAngle)
Returns true if this angle represents a left turn.
|
protected boolean |
isRightTurn(int turnAngle)
Returns true if this angle represents a right turn.
|
protected Double nonDrivingTurnCostFactor
protected Integer minRightTurnAngle
protected Integer maxRightTurnAngle
protected Integer minLeftTurnAngle
protected Integer maxLeftTurnAngle
public AbstractIntersectionTraversalCostModel()
protected boolean isRightTurn(int turnAngle)
protected boolean isLeftTurn(int turnAngle)
protected double computeNonDrivingTraversalCost(IntersectionVertex v, StreetEdge from, StreetEdge to, float fromSpeed, float toSpeed)
protected int calculateTurnAngle(StreetEdge from, StreetEdge to, RoutingRequest options)
public abstract double computeTraversalCost(IntersectionVertex v, StreetEdge from, StreetEdge to, TraverseMode mode, RoutingRequest options, float fromSpeed, float toSpeed)
IntersectionTraversalCostModel
computeTraversalCost
in interface IntersectionTraversalCostModel
Copyright © 2018. All rights reserved.