Class Metrics
java.lang.Object
real_time_traffic_simulation_with_java.alias.Metrics
Utility class: Stores all the metrics used in the simulation,
thus make the code easier to look and fix.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConnection speed (in milliseconds): How often does the simulation updatestatic final doubleControl panel width (in pixels)static final doubleDashboard panel width (in pixels)static final doubleDefault lane width of SUMO (in meters)static final doubleArc size for rendering vehicle cornersstatic final doubleLength of DEFAULT_VEHTYPE of SUMO (in meters)static final doubleWidth of DEFAULT_VEHTYPE of SUMO (in meters)static final doubleWeight of edge borderlinestatic final doubleFactor to zoom out the mapstatic final String[]Header for CSV file to writestatic final doubleHide delay for tooltips (in milliseconds)static final intThreshold for high halting duration (in simulation seconds) to determine congestionstatic final doubleThreshold for high halting rate (average halting vehicles/lane)static final doubleGap between dashes in lane dividerstatic final doubleLength of dash in lane dividerstatic final doubleWeight of lane divider linestatic final doubleMaximum zoom levelstatic final doubleMinimum zoom levelstatic final intPDF text fontstatic final intPDF heading font sizestatic final intPDF normal text font sizestatic final intPDF title font sizestatic final doubleFactor to zoom in the mapstatic final intPDF chart image height: preffered height per unit on Y-axisstatic final doubleWidth of traffic light boxstatic final doubleWindow pane height (in pixels)static final doubleWindow pane width (in pixels) -
Method Summary
-
Field Details
-
DEFAULT_VEHICLE_LENGTH
public static final double DEFAULT_VEHICLE_LENGTHLength of DEFAULT_VEHTYPE of SUMO (in meters)- See Also:
-
DEFAULT_VEHICLE_WIDTH
public static final double DEFAULT_VEHICLE_WIDTHWidth of DEFAULT_VEHTYPE of SUMO (in meters)- See Also:
-
DEFAULT_LANE_WIDTH
public static final double DEFAULT_LANE_WIDTHDefault lane width of SUMO (in meters)- See Also:
-
DEFAULT_VEHICLE_ARC
public static final double DEFAULT_VEHICLE_ARCArc size for rendering vehicle corners- See Also:
-
TLS_WIDTH
public static final double TLS_WIDTHWidth of traffic light box- See Also:
-
EDGE_DIVIDER_WEIGHT
public static final double EDGE_DIVIDER_WEIGHTWeight of edge borderline- See Also:
-
LANE_DIVIDER_WEIGHT
public static final double LANE_DIVIDER_WEIGHTWeight of lane divider line- See Also:
-
LANE_DASHED_LENGTH
public static final double LANE_DASHED_LENGTHLength of dash in lane divider- See Also:
-
LANE_DASHED_GAP
public static final double LANE_DASHED_GAPGap between dashes in lane divider- See Also:
-
HIGH_HALTING_DURATION_THRESHOLD
public static final int HIGH_HALTING_DURATION_THRESHOLDThreshold for high halting duration (in simulation seconds) to determine congestion- See Also:
-
HIGH_HALTING_RATE_THRESHOLD
public static final double HIGH_HALTING_RATE_THRESHOLDThreshold for high halting rate (average halting vehicles/lane)- See Also:
-
HIDE_DELAY
public static final double HIDE_DELAYHide delay for tooltips (in milliseconds)- See Also:
-
ENLARGE_FACTOR
public static final double ENLARGE_FACTORFactor to zoom out the map- See Also:
-
SHRINK_FACTOR
public static final double SHRINK_FACTORFactor to zoom in the map- See Also:
-
MAX_ZOOM_LEVEL
public static final double MAX_ZOOM_LEVELMaximum zoom level- See Also:
-
MIN_ZOOM_LEVEL
public static final double MIN_ZOOM_LEVELMinimum zoom level- See Also:
-
CONNECT_SPEED_MS
public static final int CONNECT_SPEED_MSConnection speed (in milliseconds): How often does the simulation update- See Also:
-
WINDOW_WIDTH
public static final double WINDOW_WIDTHWindow pane width (in pixels)- See Also:
-
WINDOW_HEIGHT
public static final double WINDOW_HEIGHTWindow pane height (in pixels)- See Also:
-
CONTROL_PANEL_WIDTH
public static final double CONTROL_PANEL_WIDTHControl panel width (in pixels)- See Also:
-
DASHBOARD_WIDTH
public static final double DASHBOARD_WIDTHDashboard panel width (in pixels)- See Also:
-
HEADERS
Header for CSV file to write -
PDF_FONT
public static final int PDF_FONTPDF text font- See Also:
-
PDF_TITLE_FONT_SIZE
public static final int PDF_TITLE_FONT_SIZEPDF title font size- See Also:
-
PDF_HEADING_FONT_SIZE
public static final int PDF_HEADING_FONT_SIZEPDF heading font size- See Also:
-
PDF_NORMAL_FONT_SIZE
public static final int PDF_NORMAL_FONT_SIZEPDF normal text font size- See Also:
-
SIZE_PER_Y_UNIT
public static final int SIZE_PER_Y_UNITPDF chart image height: preffered height per unit on Y-axis- See Also:
-