2021-10-22 13:13:12 -04:00
|
|
|
"""
|
|
|
|
Bus system module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
2022-04-08 09:35:33 -04:00
|
|
|
Copyright © 2022 Concordia CERC group
|
|
|
|
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
2021-10-22 13:13:12 -04:00
|
|
|
"""
|
|
|
|
|
|
|
|
from typing import List
|
|
|
|
from city_model_structure.city_object import CityObject
|
|
|
|
from city_model_structure.attributes.polygon import Polygon
|
|
|
|
from city_model_structure.transport.bus_network import BusNetwork
|
|
|
|
from city_model_structure.transport.bus_node import BusNode
|
|
|
|
from city_model_structure.transport.bus import Bus
|
|
|
|
|
|
|
|
|
|
|
|
class BusSystem(CityObject):
|
|
|
|
"""
|
|
|
|
BusSystem(CityObject) class
|
|
|
|
"""
|
|
|
|
def __init__(self, name, lod, surfaces, city_lower_corner):
|
|
|
|
super().__init__(name, lod, surfaces, city_lower_corner)
|
|
|
|
self._bus_routes = None
|
|
|
|
self._bus_network = None
|
|
|
|
self._buses = None
|
|
|
|
self._restricted_polygons = None
|
|
|
|
|
|
|
|
@property
|
|
|
|
def bus_routes(self) -> List[BusNode]:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: [BusNode]
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._bus_routes
|
|
|
|
|
|
|
|
@property
|
|
|
|
def bus_network(self) -> BusNetwork:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: BusNetwork
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._bus_network
|
|
|
|
|
|
|
|
@property
|
|
|
|
def buses(self) -> List[Bus]:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: [Bus]
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._buses
|
|
|
|
|
|
|
|
@property
|
|
|
|
def restricted_polygons(self) -> List[Polygon]:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: [Polygon]
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._restricted_polygons
|