Search in sources :

Example 1 with TurnRestrictionType

use of org.opentripplanner.common.TurnRestrictionType in project OpenTripPlanner by opentripplanner.

the class TurnRestrictionTest method DisallowTurn.

private void DisallowTurn(StreetEdge from, StreetEdge to) {
    TurnRestrictionType rType = TurnRestrictionType.NO_TURN;
    TraverseModeSet restrictedModes = new TraverseModeSet(TraverseMode.CAR);
    TurnRestriction restrict = new TurnRestriction(from, to, rType, restrictedModes);
    _graph.addTurnRestriction(from, restrict);
}
Also used : TurnRestrictionType(org.opentripplanner.common.TurnRestrictionType) TurnRestriction(org.opentripplanner.common.TurnRestriction) TraverseModeSet(org.opentripplanner.routing.core.TraverseModeSet)

Example 2 with TurnRestrictionType

use of org.opentripplanner.common.TurnRestrictionType in project OpenTripPlanner by opentripplanner.

the class TurnCostTest method DisallowTurn.

private void DisallowTurn(StreetEdge from, StreetEdge to) {
    TurnRestrictionType rType = TurnRestrictionType.NO_TURN;
    TraverseModeSet restrictedModes = new TraverseModeSet(TraverseMode.CAR);
    TurnRestriction restrict = new TurnRestriction(from, to, rType, restrictedModes);
    _graph.addTurnRestriction(from, restrict);
}
Also used : TurnRestrictionType(org.opentripplanner.common.TurnRestrictionType) TurnRestriction(org.opentripplanner.common.TurnRestriction) TraverseModeSet(org.opentripplanner.routing.core.TraverseModeSet)

Aggregations

TurnRestriction (org.opentripplanner.common.TurnRestriction)2 TurnRestrictionType (org.opentripplanner.common.TurnRestrictionType)2 TraverseModeSet (org.opentripplanner.routing.core.TraverseModeSet)2