city_retrofit/city_model_structure/machine.py

87 lines
2.0 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 Machine:
"""
Machine class
"""
def __init__(self, machine_id, name, work_efficiency, work_efficiency_unit, energy_consumption_rate, energy_consumption_unit,
carbon_emission_factor, carbon_emission_unit):
self._machine_id = machine_id
self._name = name
self._work_efficiency = work_efficiency
self._work_efficiency_unit = work_efficiency_unit
self._energy_consumption_rate = energy_consumption_rate
self._energy_consumption_unit = energy_consumption_unit
self._carbon_emission_factor = carbon_emission_factor
self._carbon_emission_unit = carbon_emission_unit
@property
2021-11-15 10:35:31 -05:00
def id(self) -> int:
"""
Get machine id
2021-11-15 10:43:35 -05:00
:return: int
"""
return self._machine_id
@property
2021-11-15 10:35:31 -05:00
def name(self) -> str:
"""
Get machine name
2021-11-15 10:43:35 -05:00
:return: str
"""
return self._name
@property
2021-11-15 10:35:31 -05:00
def work_efficiency(self) -> float:
"""
Get machine work efficiency
2021-11-15 10:43:35 -05:00
:return: float
"""
return self._work_efficiency
@property
2021-11-15 10:35:31 -05:00
def work_efficiency_unit(self) -> str:
"""
Get machine work efficiency unit
2021-11-15 10:43:35 -05:00
:return: str
"""
return self._work_efficiency_unit
@property
2021-11-15 10:35:31 -05:00
def energy_consumption_rate(self) -> float:
"""
Get energy consumption rate
2021-11-15 10:43:35 -05:00
:return: float
"""
return self._energy_consumption_rate
@property
2021-11-15 10:35:31 -05:00
def energy_consumption_unit(self) -> str:
"""
Get energy consumption unit
2021-11-15 10:43:35 -05:00
:return: str
"""
return self._energy_consumption_unit
@property
2021-11-15 10:35:31 -05:00
def carbon_emission_factor(self) -> float:
"""
Get carbon emission factor
2021-11-15 10:43:35 -05:00
:return: float
"""
return self._carbon_emission_factor
@property
2021-11-15 10:35:31 -05:00
def carbon_emission_unit(self) -> str:
"""
Get carbon emission unit
2021-11-15 10:43:35 -05:00
:return: str
"""
return self._carbon_emission_unit