public class GridMapUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GridMapUtil.EnumerateSpawnSpecGenerator
The spawn spec generator that enumerates spawn spec.
|
static class |
GridMapUtil.OneSpawnSpecGenerator
The spawn spec generator that generates only one spec.
|
static class |
GridMapUtil.OnlyOneSpawnSpecGenerator
The spec generator that generates just one vehicle in the entire
simulation.
|
static class |
GridMapUtil.UniformSpawnSpecGenerator
The uniform distributed spawn spec generator.
|
Modifier and Type | Field and Description |
---|---|
static SpawnPoint.SpawnSpecGenerator |
nullSpawnSpecGenerator
The null spawn spec generator that generates nothing.
|
Constructor and Description |
---|
GridMapUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
setApprox4PhasesTrafficLightManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config,
double greenLightDuration,
double yellowLightDuration)
Set the approximate 4 phases traffic light managers at all intersections.
|
static void |
setApproxNPhasesTrafficLightManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config,
String trafficSignalPhaseFileName)
Set the approximate N phases traffic light managers at all intersections.
|
static void |
setApproxSimpleTrafficLightManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config,
double greenLightDuration,
double yellowLightDuration)
Set the approximate simple traffic light managers at all intersections.
|
static void |
setApproxStopSignManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config)
Set the approximate N phases traffic light managers at all intersections.
|
static void |
setBaselineSpawnPoints(GridMap layout,
double traversalTime)
Set the baseline spawn points.
|
static void |
setBatchManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config,
double processingInterval)
Set the bath managers at all intersections.
|
static void |
setDirectionalSpawnPoints(GridMap layout,
double hTrafficLevel,
double vTrafficLevel)
Set the directional spawn points which has different traffic volumes
in different directions.
|
static void |
setFCFSManagers(GridMap layout,
double currentTime,
ReservationGridManager.Config config)
Set the FCFS managers at all intersections.
|
static void |
setUniformRandomSpawnPoints(GridMap map,
double trafficLevel)
Set the uniform random spawn points.
|
static void |
setUniformRatioSpawnPoints(GridMap map,
String trafficVolumeFileName)
Set the uniform ratio spawn points with various traffic volume.
|
static void |
setUniformTurnBasedSpawnPoints(GridMap map,
double trafficLevel)
Set the uniform turn based spawn points.
|
public static SpawnPoint.SpawnSpecGenerator nullSpawnSpecGenerator
public static void setFCFSManagers(GridMap layout, double currentTime, ReservationGridManager.Config config)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager configurationpublic static void setBatchManagers(GridMap layout, double currentTime, ReservationGridManager.Config config, double processingInterval)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager configurationprocessingInterval
- the processing intervalpublic static void setApproxSimpleTrafficLightManagers(GridMap layout, double currentTime, ReservationGridManager.Config config, double greenLightDuration, double yellowLightDuration)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager configurationgreenLightDuration
- the green light durationyellowLightDuration
- the yellow light durationpublic static void setApprox4PhasesTrafficLightManagers(GridMap layout, double currentTime, ReservationGridManager.Config config, double greenLightDuration, double yellowLightDuration)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager configurationgreenLightDuration
- the green light durationyellowLightDuration
- the yellow light durationpublic static void setApproxNPhasesTrafficLightManagers(GridMap layout, double currentTime, ReservationGridManager.Config config, String trafficSignalPhaseFileName)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager
configurationtrafficSignalPhaseFileName
- the name of the file contains the
traffic signals duration informationpublic static void setApproxStopSignManagers(GridMap layout, double currentTime, ReservationGridManager.Config config)
layout
- the mapcurrentTime
- the current timeconfig
- the reservation grid manager configurationpublic static void setUniformRandomSpawnPoints(GridMap map, double trafficLevel)
map
- the maptrafficLevel
- the traffic levelpublic static void setUniformTurnBasedSpawnPoints(GridMap map, double trafficLevel)
map
- the maptrafficLevel
- the traffic levelpublic static void setUniformRatioSpawnPoints(GridMap map, String trafficVolumeFileName)
map
- the maptrafficVolumeFileName
- the traffic volume filenamepublic static void setDirectionalSpawnPoints(GridMap layout, double hTrafficLevel, double vTrafficLevel)
layout
- the maphTrafficLevel
- the traffic level in the horizontal directionvTrafficLevel
- the traffic level in the vertical directionpublic static void setBaselineSpawnPoints(GridMap layout, double traversalTime)
layout
- the maptraversalTime
- the traversal timeCopyright © 2013. All rights reserved.