hub/city_model_structure/material.py

132 lines
2.8 KiB
Python
Raw Normal View History

2021-11-15 08:24:03 -05:00
"""
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 Material:
"""
LCA Material class
"""
2021-11-18 16:55:49 -05:00
def __init__(self, type, material_id, material_name, density, density_unit, embodied_carbon, embodied_carbon_unit, recycling_ratio,
2021-11-15 08:24:03 -05:00
onsite_recycling_ratio, company_recycling_ratio, landfilling_ratio, cost, cost_unit):
self._type = type
2021-11-18 16:55:49 -05:00
self._material_id = material_id
self._material_name = material_name
2021-11-15 08:24:03 -05:00
self._density = density
self._density_unit = density_unit
self._embodied_carbon = embodied_carbon
self._embodied_carbon_unit = embodied_carbon_unit
self._recycling_ratio = recycling_ratio
self._onsite_recycling_ratio = onsite_recycling_ratio
self._company_recycling_ratio = company_recycling_ratio
self._landfilling_ratio = landfilling_ratio
self._cost = cost
self._cost_unit = cost_unit
@property
2021-11-15 10:35:31 -05:00
def material_name(self) -> str:
2021-11-15 08:24:03 -05:00
"""
Get material name
2021-11-15 10:43:35 -05:00
:return: str
2021-11-15 08:24:03 -05:00
"""
return self._material_name
@property
2021-11-15 10:35:31 -05:00
def id(self) -> int:
2021-11-15 08:24:03 -05:00
"""
Get material id
2021-11-15 10:43:35 -05:00
:return: int
2021-11-15 08:24:03 -05:00
"""
return self._material_id
@property
2021-11-15 10:35:31 -05:00
def type(self) -> str:
2021-11-15 08:24:03 -05:00
"""
Get material type
2021-11-15 10:43:35 -05:00
:return: str
2021-11-15 08:24:03 -05:00
"""
return self._type
@property
2021-11-15 10:35:31 -05:00
def density(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material density
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._density
@property
2021-11-15 10:35:31 -05:00
def density_unit(self) -> str:
2021-11-15 08:24:03 -05:00
"""
Get material density unit
2021-11-15 10:43:35 -05:00
:return: str
2021-11-15 08:24:03 -05:00
"""
return self._density_unit
@property
2021-11-15 10:35:31 -05:00
def embodied_carbon(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material embodied carbon
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._embodied_carbon
@property
2021-11-15 10:35:31 -05:00
def embodied_carbon_unit(self) -> str:
2021-11-15 08:24:03 -05:00
"""
Get material embodied carbon unit
2021-11-15 10:43:35 -05:00
:return: str
2021-11-15 08:24:03 -05:00
"""
return self._embodied_carbon_unit
@property
2021-11-15 10:35:31 -05:00
def recycling_ratio(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material recycling ratio
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._recycling_ratio
@property
2021-11-15 10:35:31 -05:00
def onsite_recycling_ratio(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material onsite recycling ratio
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._onsite_recycling_ratio
@property
2021-11-15 10:35:31 -05:00
def company_recycling_ratio(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material company recycling ratio
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._company_recycling_ratio
@property
2021-11-15 10:35:31 -05:00
def landfilling_ratio(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material landfilling ratio
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._landfilling_ratio
@property
2021-11-15 10:35:31 -05:00
def cost(self) -> float:
2021-11-15 08:24:03 -05:00
"""
Get material cost
2021-11-15 10:43:35 -05:00
:return: float
2021-11-15 08:24:03 -05:00
"""
return self._cost
@property
2021-11-15 10:35:31 -05:00
def cost_unit(self) -> str:
2021-11-15 08:24:03 -05:00
"""
Get material cost unit
2021-11-15 10:43:35 -05:00
:return: str
2021-11-15 08:24:03 -05:00
"""
return self._cost_unit