aim4.map
Class GridMapUtil

java.lang.Object
  extended by aim4.map.GridMapUtil

public class GridMapUtil
extends Object

The utility class for GridMap.


Nested Class Summary
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.
 
Field Summary
static SpawnPoint.SpawnSpecGenerator nullSpawnSpecGenerator
          The null spawn spec generator that generates nothing.
 
Constructor Summary
GridMapUtil()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nullSpawnSpecGenerator

public static SpawnPoint.SpawnSpecGenerator nullSpawnSpecGenerator
The null spawn spec generator that generates nothing.

Constructor Detail

GridMapUtil

public GridMapUtil()
Method Detail

setFCFSManagers

public static void setFCFSManagers(GridMap layout,
                                   double currentTime,
                                   ReservationGridManager.Config config)
Set the FCFS managers at all intersections.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration

setBatchManagers

public static void setBatchManagers(GridMap layout,
                                    double currentTime,
                                    ReservationGridManager.Config config,
                                    double processingInterval)
Set the bath managers at all intersections.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration
processingInterval - the processing interval

setApproxSimpleTrafficLightManagers

public static void setApproxSimpleTrafficLightManagers(GridMap layout,
                                                       double currentTime,
                                                       ReservationGridManager.Config config,
                                                       double greenLightDuration,
                                                       double yellowLightDuration)
Set the approximate simple traffic light managers at all intersections.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration
greenLightDuration - the green light duration
yellowLightDuration - the yellow light duration

setApprox4PhasesTrafficLightManagers

public 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.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration
greenLightDuration - the green light duration
yellowLightDuration - the yellow light duration

setApproxNPhasesTrafficLightManagers

public static void setApproxNPhasesTrafficLightManagers(GridMap layout,
                                                        double currentTime,
                                                        ReservationGridManager.Config config,
                                                        String trafficSignalPhaseFileName)
Set the approximate N phases traffic light managers at all intersections.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration
trafficSignalPhaseFileName - the name of the file contains the traffic signals duration information

setApproxStopSignManagers

public static void setApproxStopSignManagers(GridMap layout,
                                             double currentTime,
                                             ReservationGridManager.Config config)
Set the approximate N phases traffic light managers at all intersections.

Parameters:
layout - the map
currentTime - the current time
config - the reservation grid manager configuration

setUniformRandomSpawnPoints

public static void setUniformRandomSpawnPoints(GridMap map,
                                               double trafficLevel)
Set the uniform random spawn points.

Parameters:
map - the map
trafficLevel - the traffic level

setUniformTurnBasedSpawnPoints

public static void setUniformTurnBasedSpawnPoints(GridMap map,
                                                  double trafficLevel)
Set the uniform turn based spawn points.

Parameters:
map - the map
trafficLevel - the traffic level

setUniformRatioSpawnPoints

public static void setUniformRatioSpawnPoints(GridMap map,
                                              String trafficVolumeFileName)
Set the uniform ratio spawn points with various traffic volume.

Parameters:
map - the map
trafficVolumeFileName - the traffic volume filename

setDirectionalSpawnPoints

public static void setDirectionalSpawnPoints(GridMap layout,
                                             double hTrafficLevel,
                                             double vTrafficLevel)
Set the directional spawn points which has different traffic volumes in different directions.

Parameters:
layout - the map
hTrafficLevel - the traffic level in the horizontal direction
vTrafficLevel - the traffic level in the vertical direction

setBaselineSpawnPoints

public static void setBaselineSpawnPoints(GridMap layout,
                                          double traversalTime)
Set the baseline spawn points.

Parameters:
layout - the map
traversalTime - the traversal time


Copyright © 2011. All Rights Reserved.