Class EdgeManager
java.lang.Object
real_time_traffic_simulation_with_java.wrapper.EdgeManager
Wrapper class for TraaS to manage edges in the simulation
-
Constructor Summary
ConstructorsConstructorDescriptionEdgeManager(it.polito.appeal.traci.SumoTraciConnection connection) Wrapper class for TraaS to manage edges in the simulation -
Method Summary
Modifier and TypeMethodDescriptiondoublegetAverageSpeed(String edgeID) Get average speed of vehicles on the edge in the last step (km/h)Get list of congested edges IDsbooleangetCongestedStatus(String edgeID) Get congested status of the edgeintgetCount()Get number of edges, excluding junction edgesdoublegetDensity(String edgeID) Get density of vehicles on the edge in the last step (vehicle/km)Create and get a List of EdgeData for all edgesintgetHaltingNumber(String edgeID) Get number of halting vehicles on the edge in the last stepGet list of edge IDs, excluding junction edgesintgetLaneCount(String edgeID) Get number of lanes on the edgegetLaneIDList(String edgeID) Get lane IDs on the edgeList<de.tudresden.sumo.objects.SumoGeometry> getLanesCoordinate(String edgeID) Get coordinations of lanes the edgedoubleGet length of the edge (m)doublegetMaxSpeed(String edgeID) Get max speed allowed on the edge (km/h)doublegetTravelTime(String edgeID) Get estimate travel time on the edge in the last step (s)intgetVehicleCount(String edgeID) Get number of vehicles on the edge in the last stepvoidUpdate congestion status for all edges based on TTI and set edge colors
-
Constructor Details
-
EdgeManager
public EdgeManager(it.polito.appeal.traci.SumoTraciConnection connection) Wrapper class for TraaS to manage edges in the simulation- Parameters:
connection- connection to Sumo
-
-
Method Details
-
getIDList
-
getCongestedEdgeIDList
-
getCongestedStatus
Get congested status of the edge- Parameters:
edgeID- the ID of the edge- Returns:
- boolean congested status of the edge
-
getCount
public int getCount()Get number of edges, excluding junction edges- Returns:
- an int number of edges, excluding junction edges
-
getLaneCount
-
getLaneIDList
-
getLanesCoordinate
-
getMaxSpeed
Get max speed allowed on the edge (km/h)- Parameters:
edgeID- the ID of the edge- Returns:
- a double max speed allowed on the edge (km/h)
-
getLength
Get length of the edge (m)- Parameters:
edgeID- the ID of the edge- Returns:
- a double length of the edge (m)
-
getVehicleCount
Get number of vehicles on the edge in the last step- Parameters:
edgeID- the ID of the edge- Returns:
- an int number of vehicles on the edge in the last step
-
getAverageSpeed
Get average speed of vehicles on the edge in the last step (km/h)- Parameters:
edgeID- the ID of the edge- Returns:
- a double average speed of vehicles on the edge in the last step (km/h)
-
getDensity
Get density of vehicles on the edge in the last step (vehicle/km)- Parameters:
edgeID- the ID of the edge- Returns:
- a double density of vehicles on the edge in the last step (vehicle/km)
-
getTravelTime
Get estimate travel time on the edge in the last step (s)- Parameters:
edgeID- the ID of the edge- Returns:
- a double estimate travel time on the edge in the last step (s)
-
getHaltingNumber
-
getEdgeDataList
-
updateEdgeDataList
-