diff --git a/city_model_structure/transport/origin_destination_network.py b/city_model_structure/transport/origin_destination_network.py index b23bb01c..973317c6 100644 --- a/city_model_structure/transport/origin_destination_network.py +++ b/city_model_structure/transport/origin_destination_network.py @@ -4,7 +4,10 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ +from typing import List from city_model_structure.network import Network +from city_model_structure.transport.origin_destination_edge import OriginDestinationEdge +from city_model_structure.transport.origin_destination_node import OriginDestinationNode class OriginDestinationNetwork(Network): @@ -22,3 +25,19 @@ class OriginDestinationNetwork(Network): :return: str """ return self._type + + @property + def edges(self) -> List[OriginDestinationEdge]: + """ + Get network edges + :return: [OriginDestinationEdge] + """ + return self._edges + + @property + def nodes(self) -> List[OriginDestinationNode]: + """ + Get network nodes + :return: [OriginDestinationNode] + """ + return self._nodes diff --git a/city_model_structure/transport/traffic_network.py b/city_model_structure/transport/traffic_network.py index 27e30096..e473f6da 100644 --- a/city_model_structure/transport/traffic_network.py +++ b/city_model_structure/transport/traffic_network.py @@ -6,7 +6,10 @@ Contributor Milad milad.aghamohamadnia@concordia.ca Contributor Guille guille.gutierrezmorote@concordia.ca """ +from typing import List 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 class TrafficNetwork(Network): @@ -24,3 +27,19 @@ class TrafficNetwork(Network): :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