added the belonging specific edges and nodes to origind-destination and traffic networks

This commit is contained in:
Pilar 2021-10-22 11:28:22 -04:00
parent bb5351da27
commit c34e64eb56
2 changed files with 38 additions and 0 deletions

View File

@ -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

View File

@ -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