hub/city_model_structure/transport/traffic_network.py

46 lines
1.1 KiB
Python
Raw Normal View History

"""
2021-08-17 12:52:48 -04:00
Traffic network module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2021 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
"""
from typing import List
2021-08-17 12:52:48 -04:00
from city_model_structure.network import Network
from city_model_structure.transport.traffic_edge import TrafficEdge
from city_model_structure.transport.traffic_node import TrafficNode
2021-08-17 12:52:48 -04:00
class TrafficNetwork(Network):
"""
2021-10-18 16:07:18 -04:00
TrafficNetwork(Network) class
"""
2021-08-17 12:52:48 -04:00
def __init__(self, name, edges=None, nodes=None):
super().__init__(name, edges, nodes)
self._type = "TrafficNetwork"
@property
def type(self):
"""
Get network type
:return: str
"""
return self._type
@property
def edges(self) -> List[TrafficEdge]:
"""
Get network edges
:return: [TrafficEdge]
"""
return self._edges
@property
def nodes(self) -> List[TrafficNode]:
"""
Get network nodes
:return: [TrafficNode]
"""
return self._nodes