2021-08-06 12:28:20 -04:00
|
|
|
"""
|
2021-08-17 12:52:48 -04:00
|
|
|
Traffic network module
|
2021-08-06 12:28:20 -04:00
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
|
|
|
Contributor Milad milad.aghamohamadnia@concordia.ca
|
2021-08-17 12:52:48 -04:00
|
|
|
Contributor Guille guille.gutierrezmorote@concordia.ca
|
2021-08-06 12:28:20 -04:00
|
|
|
"""
|
|
|
|
|
2021-08-17 12:52:48 -04:00
|
|
|
from typing import List
|
|
|
|
from city_model_structure.attributes.node import Node
|
|
|
|
from city_model_structure.network import Network
|
2021-08-06 12:28:20 -04:00
|
|
|
|
|
|
|
|
2021-08-17 12:52:48 -04:00
|
|
|
class TrafficNetwork(Network):
|
2021-08-06 12:28:20 -04:00
|
|
|
"""
|
2021-08-17 12:52:48 -04:00
|
|
|
TrafficNetwork(CityObject) class
|
2021-08-06 12:28:20 -04:00
|
|
|
"""
|
2021-08-17 12:52:48 -04:00
|
|
|
def __init__(self, name, edges=None, nodes=None):
|
|
|
|
super().__init__(name, edges, nodes)
|
2021-08-06 12:28:20 -04:00
|
|
|
|
|
|
|
@property
|
|
|
|
def nodes(self) -> List[Node]:
|
|
|
|
return self._nodes
|
|
|
|
|
|
|
|
@nodes.setter
|
|
|
|
def nodes(self, value):
|
|
|
|
"""
|
|
|
|
:param value: [Node]
|
|
|
|
"""
|
|
|
|
self._nodes = value
|