1
0
mirror of https://github.com/Ahp06/SUMO_Emissions.git synced 2024-11-21 19:16:30 +00:00

Changed configuration file

This commit is contained in:
Ahp06 2018-12-03 21:17:19 +01:00
parent 07155c639f
commit e249fbe30c
2 changed files with 6 additions and 3 deletions

View File

@ -17,10 +17,13 @@ CELLS_NUMBER = 10
EMISSIONS_THRESHOLD = 500000
n_steps = 200
#Limit the speed into areas when the threshold is exceeded
limit_speed_mode = True
#Vehicles are routed according to the less polluted route
weight_routing_mode = False
#Limit the speed into areas when the threshold is exceeded
limited_speed = 30
limit_speed_mode = True
#Decrease all traffic lights duration into the area when the threshold is exceeded
rf_trafficLights_duration = 0.2
adjust_traffic_light_mode = True

View File

@ -60,7 +60,7 @@ def get_emissions(grid: List[Area], vehicles: List[Vehicle]):
if vehicle.pos in area:
area.emissions += vehicle.emissions
if config.limit_speed_mode and area.emissions > config.EMISSIONS_THRESHOLD and not area.locked:
actions.limit_speed_into_area(area, vehicles, 30)
actions.limit_speed_into_area(area, vehicles, config.limited_speed)
traci.polygon.setColor(area.name, (255, 0, 0))
traci.polygon.setFilled(area.name, True)
if config.adjust_traffic_light_mode: