Change to realistic scaling and switching times
This commit is contained in:
parent
d0e84dae5d
commit
597feaead8
@ -11,9 +11,9 @@ from dse_shared_libs.message_broker_wrapper import MBWrapper
|
||||
from dse_shared_libs.traffic_light_state import TrafficLightState
|
||||
from pika.exceptions import AMQPConnectionError
|
||||
|
||||
SWITCHING_TIME = 500
|
||||
SWITCHING_TIME = 10
|
||||
# Scale speed of switching by factor x
|
||||
SCALING = 100
|
||||
SCALING = 1
|
||||
|
||||
|
||||
class TrafficLight:
|
||||
|
||||
@ -21,15 +21,15 @@ STARTING_VELOCITY = 130
|
||||
# Driving direction in degrees: 0=N, 90=E, 180=S, 270=W
|
||||
BEARING = 0
|
||||
# Scale speed of vehicles by factor x
|
||||
SCALING = 100
|
||||
SCALING = 2
|
||||
# Interval between status updates in seconds (is not scaled)
|
||||
UPDATE_INTERVAL = 2
|
||||
UPDATE_INTERVAL = 1
|
||||
# At x km the NCE shall happen
|
||||
NCE_KM = 30
|
||||
NCE_KM = 2.4
|
||||
# Time in seconds to recover from NCE (will be scaled)
|
||||
TIME_TO_RECOVER = 500
|
||||
TIME_TO_RECOVER = 10
|
||||
# Resets vehicle at km x
|
||||
RESET_KM = 50
|
||||
RESET_KM = 4
|
||||
|
||||
|
||||
class Vehicle:
|
||||
|
||||
@ -38,4 +38,4 @@ if __name__ == '__main__':
|
||||
for car in cars['cursor']:
|
||||
print(car)
|
||||
Vehicle(vin=car['vin']).start_driving()
|
||||
time.sleep(0.5)
|
||||
time.sleep(10)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user