hub/city_model_structure/vehicle.py

62 lines
1.4 KiB
Python
Raw Normal View History

"""
LifeCycleAssessment retrieve the specific Life Cycle Assessment module for the given region
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Atiya
"""
class Vehicle:
"""
Vehicle class
"""
def __init__(self, vehicle_id, name, fuel_consumption_rate, fuel_consumption_unit, carbon_emission_factor, carbon_emission_factor_unit):
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
def id(self):
"""
Get vehicle id
"""
return self._vehicle_id
@property
def name(self):
"""
Get vehicle name
"""
return self._name
@property
def fuel_consumption_rate(self):
"""
Get vehicle fuel consumption rate
"""
return self._fuel_consumption_rate
@property
def fuel_consumption_unit(self):
"""
Get fuel consumption unit
"""
return self._fuel_consumption_unit
@property
def carbon_emission_factor(self):
"""
Get vehicle carbon emission factor
"""
return self._carbon_emission_factor
@property
def carbon_emission_unit(self):
"""
Get carbon emission units
"""
return self._carbon_emission_unit