2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
ConstructionFactory (before PhysicsFactory) retrieve the specific construction module for the given region
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2020 Project Author Atiya
|
|
|
|
"""
|
|
|
|
|
|
|
|
class Fuel:
|
|
|
|
def __init__(self, fuel_id, name, carbon_emission_factor, unit):
|
|
|
|
self._fuel_id = fuel_id
|
|
|
|
self._name = name
|
|
|
|
self._carbon_emission_factor = carbon_emission_factor
|
|
|
|
self._unit = unit
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def id(self) -> int:
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
Get fuel id
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: int
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
return self._fuel_id
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def name(self) -> str:
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
Get fuel name
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: str
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
return self._name
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def carbon_emission_factor(self) -> float:
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
Get fuel carbon emission factor
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: float
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
return self._carbon_emission_factor
|
|
|
|
|
|
|
|
@property
|
2021-11-15 10:35:31 -05:00
|
|
|
def unit(self) -> str:
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
Get fuel units
|
2021-11-15 10:43:35 -05:00
|
|
|
:return: str
|
2021-11-12 04:41:17 -05:00
|
|
|
"""
|
|
|
|
return self._unit
|
|
|
|
|