Class ConflictBuilder
java.lang.Object
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder
Conflict builder allows automatic generation of conflicts. This happens based on the geometry of lanes. Parallel execution
allows this algorithm to run faster. There are two parallel implementations:
- Small; between two lanes.
- Big; between one particular lane, and all lanes further in a list (i.e. similar to a triangular matrix procedure).
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGenerator with fixed width.static classGenerator with width factor on actual lane width.static interfaceGenerator for width. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConflictBuilder.WidthGeneratorDefault width generator for conflicts which uses 80% of the lane width. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildConflicts(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on list of lanes.static voidbuildConflicts(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList, String conflictId) Build conflicts on list of lanes.static voidbuildConflicts(Lane lane1, Lane lane2, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflict on single lane pair.static voidbuildConflicts(Lane lane1, Lane lane2, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, boolean permitted) Build conflict on single lane pair.static voidbuildConflicts(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network.static voidbuildConflicts(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on network.static voidbuildConflictsParallel(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on list of lanes; parallel implementation.static voidbuildConflictsParallel(RoadNetwork network, Map<String, Set<Link>> conflictCandidateMap, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network using only the groups of links that have been identified as candidates with conflicts; parallel implementation.static voidbuildConflictsParallel(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network; parallel implementation.static voidbuildConflictsParallel(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on network; parallel implementation.static voidbuildConflictsParallelBig(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on list of lanes; parallel implementation.static voidbuildConflictsParallelSmall(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on list of lanes; parallel implementation.
-
Field Details
-
DEFAULT_WIDTH_GENERATOR
Default width generator for conflicts which uses 80% of the lane width.
-
-
Method Details
-
buildConflicts
public static void buildConflicts(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network.- Parameters:
network- networksimulator- simulatorwidthGenerator- width generator
-
buildConflicts
public static void buildConflicts(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on network.- Parameters:
network- networksimulator- simulatorwidthGenerator- width generatorignoreList- lane combinations to ignorepermittedList- lane combinations that are permitted by traffic control
-
buildConflicts
public static void buildConflicts(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on list of lanes.- Parameters:
lanes- lanessimulator- simulatorwidthGenerator- width generator
-
buildConflicts
public static void buildConflicts(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList, String conflictId) Build conflicts on list of lanes.- Parameters:
lanes- list of Lanessimulator- the simulatorwidthGenerator- the width generatorignoreList- lane combinations to ignorepermittedList- lane combinations that are permitted by traffic controlconflictId- identification of the conflict (null value permitted)
-
buildConflicts
public static void buildConflicts(Lane lane1, Lane lane2, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflict on single lane pair. Connecting lanes are determined.- Parameters:
lane1- lane 1lane2- lane 2simulator- simulatorwidthGenerator- width generator
-
buildConflicts
public static void buildConflicts(Lane lane1, Lane lane2, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, boolean permitted) Build conflict on single lane pair. Connecting lanes are determined.- Parameters:
lane1- lane 1lane2- lane 2simulator- simulatorwidthGenerator- width generatorpermitted- conflict permitted by traffic control
-
buildConflictsParallel
public static void buildConflictsParallel(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network; parallel implementation.- Parameters:
network- networksimulator- simulatorwidthGenerator- width generator
-
buildConflictsParallel
public static void buildConflictsParallel(RoadNetwork network, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on network; parallel implementation.- Parameters:
network- networksimulator- simulatorwidthGenerator- width generatorignoreList- lane combinations to ignorepermittedList- lane combinations that are permitted by traffic control
-
buildConflictsParallel
public static void buildConflictsParallel(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on list of lanes; parallel implementation.- Parameters:
lanes- lanessimulator- simulatorwidthGenerator- width generator
-
buildConflictsParallelSmall
public static void buildConflictsParallelSmall(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on list of lanes; parallel implementation. Small jobs.- Parameters:
lanes- list of Lanessimulator- the simulatorwidthGenerator- the width generatorignoreList- lane combinations to ignorepermittedList- lane combinations that are permitted by traffic control
-
buildConflictsParallelBig
public static void buildConflictsParallelBig(List<Lane> lanes, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator, LaneCombinationList ignoreList, LaneCombinationList permittedList) Build conflicts on list of lanes; parallel implementation. Big jobs.- Parameters:
lanes- list of Lanessimulator- the simulatorwidthGenerator- the width generatorignoreList- lane combinations to ignorepermittedList- lane combinations that are permitted by traffic control
-
buildConflictsParallel
public static void buildConflictsParallel(RoadNetwork network, Map<String, Set<Link>> conflictCandidateMap, OtsSimulatorInterface simulator, ConflictBuilder.WidthGenerator widthGenerator) Build conflicts on network using only the groups of links that have been identified as candidates with conflicts; parallel implementation.- Parameters:
network- networkconflictCandidateMap- the map of the conflicting links to implementsimulator- simulatorwidthGenerator- width generator
-