2021-10-22 13:13:12 -04:00
|
|
|
"""
|
|
|
|
Bus stop 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 Union
|
|
|
|
from city_model_structure.transport.bus_node import BusNode
|
|
|
|
from city_model_structure.transport.fast_charging_infrastructure import FastChargingInfrastructure
|
|
|
|
from city_model_structure.attributes.schedule import Schedule
|
|
|
|
|
|
|
|
|
|
|
|
class BusStop(BusNode):
|
|
|
|
"""
|
|
|
|
BusStop class
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, name, coordinates, edges=None):
|
|
|
|
super().__init__(name, coordinates, edges=edges, node_type='BusStop')
|
|
|
|
self._time_table = None
|
|
|
|
self._average_hourly_passengers_demand = None
|
|
|
|
self._fast_charging_infrastructure = None
|
|
|
|
self._waiting_time = None
|
|
|
|
|
|
|
|
@property
|
|
|
|
def time_table(self):
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: add type of variable here
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._time_table
|
|
|
|
|
|
|
|
@property
|
|
|
|
def average_hourly_passengers_demand(self) -> Schedule:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: Schedule
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._average_hourly_passengers_demand
|
|
|
|
|
|
|
|
@property
|
|
|
|
def fast_charging_infrastructure(self) -> Union[None, FastChargingInfrastructure]:
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: FastChargingInfrastructure
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._fast_charging_infrastructure
|
|
|
|
|
|
|
|
@property
|
|
|
|
def waiting_time(self):
|
2021-10-25 13:33:08 -04:00
|
|
|
"""
|
|
|
|
Add explanation here
|
|
|
|
:return: add type of variable here
|
|
|
|
"""
|
2021-10-22 13:13:12 -04:00
|
|
|
return self._waiting_time
|