2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
LifeCycleAssessment retrieve the specific Life Cycle Assessment module for the given region
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
2022-04-08 09:35:33 -04:00
|
|
|
Copyright © 2022 Concordia CERC group
|
|
|
|
Project Coder Atiya atiya.atiya@mail.concordia.ca
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
|
|
|
|
class Vehicle:
|
|
|
|
"""
|
|
|
|
Vehicle class
|
|
|
|
"""
|
|
|
|
|
2023-01-26 07:41:56 -05:00
|
|
|
def __init__(self, vehicle_id, name, fuel_consumption_rate, fuel_consumption_unit, carbon_emission_factor,
|
|
|
|
carbon_emission_factor_unit):
|
2021-11-13 00:55:04 -05:00
|
|
|
self._vehicle_id = vehicle_id
|
|
|
|
self._name = name
|
|
|
|
self._fuel_consumption_rate = fuel_consumption_rate
|
|
|
|
self._fuel_consumption_unit = fuel_consumption_unit
|
|
|
|
self._carbon_emission_factor = carbon_emission_factor
|
|
|
|
self._carbon_emission_factor_unit = carbon_emission_factor_unit
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def id(self) -> int:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get vehicle id
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: int
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
return self._vehicle_id
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def name(self) -> str:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get vehicle name
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: str
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
return self._name
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def fuel_consumption_rate(self) -> float:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get vehicle fuel consumption rate
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: float
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
return self._fuel_consumption_rate
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def fuel_consumption_unit(self) -> str:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get fuel consumption unit
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: str
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
return self._fuel_consumption_unit
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def carbon_emission_factor(self) -> float:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get vehicle carbon emission factor
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: float
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
return self._carbon_emission_factor
|
|
|
|
|
|
|
|
@property
|
2023-01-26 07:41:56 -05:00
|
|
|
def carbon_emission_factor_unit(self) -> str:
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
|
|
|
Get carbon emission units
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: str
|
2021-11-13 00:55:04 -05:00
|
|
|
"""
|
2023-01-26 07:41:56 -05:00
|
|
|
return self._carbon_emission_factor_unit
|