polaris.network.traffic.intersection_control.signal.Signal#
- class polaris.network.traffic.intersection_control.signal.Signal(intersection, conn: Connection)#
Bases:
object
- __init__(intersection, conn: Connection)#
Methods
__init__
(intersection, conn)add_period
(value_start, value_end, conn)Adds a period record to this signal
delete
(conn)Removes signal from database
re_compute
(conn)save
(conn)Saves traffic signal to the network file
Attributes
- default_periods = [[0, 86400]]#
- __init__(intersection, conn: Connection)#
- delete(conn: Connection)#
Removes signal from database
- re_compute(conn: Connection)#
- add_period(value_start: int, value_end: int, conn: Connection)#
Adds a period record to this signal
- Args:
value_start (
int
): The second this period goes from (0 to 86400). Must be a whole minutevalue_end (
int
): The second this period goes from (0 to 86400). Must be a whole minute and larger than value_start
- save(conn: Connection)#
Saves traffic signal to the network file
- property data: dict#