Class ConflictBuilder

    • Field Detail

      • DEFAULT_WIDTH_GENERATOR

        public static final ConflictBuilder.WidthGenerator DEFAULT_WIDTH_GENERATOR
        Default width generator for conflicts which uses 80% of the lane width.
    • Method Detail

      • buildConflicts

        public static void buildConflicts​(OTSRoadNetwork network,
                                          GTUType gtuType,
                                          DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                          ConflictBuilder.WidthGenerator widthGenerator,
                                          LaneCombinationList ignoreList,
                                          LaneCombinationList permittedList)
        Build conflicts on network.
        Parameters:
        network - OTSRoadNetwork; network
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
        ignoreList - LaneCombinationList; lane combinations to ignore
        permittedList - LaneCombinationList; lane combinations that are permitted by traffic control
      • buildConflicts

        public static void buildConflicts​(List<Lane> lanes,
                                          GTUType gtuType,
                                          DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                          ConflictBuilder.WidthGenerator widthGenerator,
                                          LaneCombinationList ignoreList,
                                          LaneCombinationList permittedList,
                                          String conflictId)
        Build conflicts on list of lanes.
        Parameters:
        lanes - List<Lane>; list of Lanes
        gtuType - GTUType; the GTU type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator
        widthGenerator - WidthGenerator; the width generator
        ignoreList - LaneCombinationList; lane combinations to ignore
        permittedList - LaneCombinationList; lane combinations that are permitted by traffic control
        conflictId - String; identification of the conflict (null value permitted)
      • buildConflicts

        public static void buildConflicts​(Lane lane1,
                                          GTUDirectionality dir1,
                                          Lane lane2,
                                          GTUDirectionality dir2,
                                          GTUType gtuType,
                                          DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                          ConflictBuilder.WidthGenerator widthGenerator)
        Build conflict on single lane pair. Connecting lanes are determined.
        Parameters:
        lane1 - Lane; lane 1
        dir1 - GTUDirectionality; gtu direction 1
        lane2 - Lane; lane 2
        dir2 - GTUDirectionality; gtu direction 2
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
      • buildConflicts

        public static void buildConflicts​(Lane lane1,
                                          GTUDirectionality dir1,
                                          Lane lane2,
                                          GTUDirectionality dir2,
                                          GTUType gtuType,
                                          DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                          ConflictBuilder.WidthGenerator widthGenerator,
                                          boolean permitted)
        Build conflict on single lane pair. Connecting lanes are determined.
        Parameters:
        lane1 - Lane; lane 1
        dir1 - GTUDirectionality; gtu direction 1
        lane2 - Lane; lane 2
        dir2 - GTUDirectionality; gtu direction 2
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
        permitted - boolean; conflict permitted by traffic control
      • buildConflictsParallel

        public static void buildConflictsParallel​(OTSRoadNetwork network,
                                                  GTUType gtuType,
                                                  DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                                  ConflictBuilder.WidthGenerator widthGenerator)
        Build conflicts on network; parallel implementation.
        Parameters:
        network - OTSRoadNetwork; network
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
      • buildConflictsParallel

        public static void buildConflictsParallel​(OTSRoadNetwork network,
                                                  GTUType gtuType,
                                                  DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                                  ConflictBuilder.WidthGenerator widthGenerator,
                                                  LaneCombinationList ignoreList,
                                                  LaneCombinationList permittedList)
        Build conflicts on network; parallel implementation.
        Parameters:
        network - OTSRoadNetwork; network
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
        ignoreList - LaneCombinationList; lane combinations to ignore
        permittedList - LaneCombinationList; lane combinations that are permitted by traffic control
      • buildConflictsParallel

        public static void buildConflictsParallel​(List<Lane> lanes,
                                                  GTUType gtuType,
                                                  DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                                  ConflictBuilder.WidthGenerator widthGenerator)
        Build conflicts on list of lanes; parallel implementation.
        Parameters:
        lanes - List<Lane>; lanes
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator
      • buildConflictsParallelSmall

        public static void buildConflictsParallelSmall​(List<Lane> lanes,
                                                       GTUType gtuType,
                                                       DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                                       ConflictBuilder.WidthGenerator widthGenerator,
                                                       LaneCombinationList ignoreList,
                                                       LaneCombinationList permittedList)
        Build conflicts on list of lanes; parallel implementation. Small jobs.
        Parameters:
        lanes - List<Lane>; list of Lanes
        gtuType - GTUType; the GTU type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator
        widthGenerator - WidthGenerator; the width generator
        ignoreList - LaneCombinationList; lane combinations to ignore
        permittedList - LaneCombinationList; lane combinations that are permitted by traffic control
      • buildConflictsParallelBig

        public static void buildConflictsParallelBig​(List<Lane> lanes,
                                                     GTUType gtuType,
                                                     DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                                     ConflictBuilder.WidthGenerator widthGenerator,
                                                     LaneCombinationList ignoreList,
                                                     LaneCombinationList permittedList)
        Build conflicts on list of lanes; parallel implementation. Big jobs.
        Parameters:
        lanes - List<Lane>; list of Lanes
        gtuType - GTUType; the GTU type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator
        widthGenerator - WidthGenerator; the width generator
        ignoreList - LaneCombinationList; lane combinations to ignore
        permittedList - LaneCombinationList; lane combinations that are permitted by traffic control
      • buildConflictsParallel

        public static void buildConflictsParallel​(OTSRoadNetwork network,
                                                  Map<String,​Set<Link>> conflictCandidateMap,
                                                  GTUType gtuType,
                                                  DEVSSimulatorInterface.TimeDoubleUnit 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 - OTSRoadNetwork; network
        conflictCandidateMap - Map<String, Set<Link>>; the map of the conflicting links to implement
        gtuType - GTUType; gtu type
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; simulator
        widthGenerator - WidthGenerator; width generator