diff --git a/imports/life_cycle_assessment/lca_material.py b/imports/life_cycle_assessment/lca_material.py index bd2ea846..946a44a4 100644 --- a/imports/life_cycle_assessment/lca_material.py +++ b/imports/life_cycle_assessment/lca_material.py @@ -20,10 +20,6 @@ class LcaMaterial: with open(path) as xml: self._lca = xmltodict.parse(xml.read()) - # for vehicle in self._lca["library"]["vehicles"]['vehicle']: - # self._city.vehicles.append(Vehicle(vehicle['@id'], vehicle['@name'], vehicle['fuel_consumption_rate']['#text'], - # vehicle['fuel_consumption_rate']['@unit'], vehicle['carbon_emission_factor']['#text'], - # vehicle['carbon_emission_factor']['@unit'])) for material in self._lca["library"]["building_materials"]['material']: _material = Material() _material.type = material['@type'] @@ -41,47 +37,3 @@ class LcaMaterial: _material._cost_unit=material['cost']['@unit'] self._city.materials.append(_material) - # self._city.materials.append(Material(type=material['@type'], material_id=material['@id'], material_name=material['@name'], density=material['density']['#text'], - # density_unit=material['density']['@unit'], embodied_carbon=material['embodied_carbon']['#text'], embodied_carbon_unit=material['embodied_carbon']['@unit'], - # recycling_ratio=material['recycling_ratio'], material['onsite_recycling_ratio'], material['company_recycling_ratio'], - # material['landfilling_ratio'], material['cost']['#text'], material['cost']['@unit'])) - # for concrete in self._lca["library"]["building_materials"]['concretes']['concrete']: - # material_name = "concrete" - # self._city.materials.append(Material(material_name, concrete['@id'], material['@type'], concrete['density']['#text'], concrete['density']['@unit'], - # concrete['embodied_carbon']['#text'], concrete['embodied_carbon']['@unit'], concrete['recycling_ratio'], - # concrete['onsite_recycling_ratio'], concrete['company_recycling_ratio'], concrete['landfilling_ratio'], - # concrete['cost']['#text'], concrete['cost']['@unit'])) - # for glass in self._lca["library"]["building_materials"]['glasses']['glass']: - # material_name = "glass" - # self._city.materials.append(Material(material_name, glass['@id'], material['@type'], glass['density']['#text'], glass['density']['@unit'], - # glass['embodied_carbon']['#text'], glass['embodied_carbon']['@unit'], glass['recycling_ratio'], - # glass['onsite_recycling_ratio'], glass['company_recycling_ratio'], glass['landfilling_ratio'], - # glass['cost']['#text'], glass['cost']['@unit'])) - # - # for insulation in self._lca["library"]["building_materials"]['insulations']['insulation']: - # material_name = "insulation" - # self._city.materials.append(Material(material_name, insulation['@id'], material['@type'], insulation['density']['#text'], insulation['density']['@unit'], - # insulation['embodied_carbon']['#text'], insulation['embodied_carbon']['@unit'], insulation['recycling_ratio'], - # insulation['onsite_recycling_ratio'], insulation['company_recycling_ratio'], insulation['landfilling_ratio'], - # insulation['cost']['#text'], insulation['cost']['@unit'])) - # - # for wood in self._lca["library"]["building_materials"]['woods']['wood']: - # material_name = "wood" - # self._city.materials.append(Material(material_name, wood['@id'], material['@type'], wood['density']['#text'], wood['density']['@unit'], - # wood['embodied_carbon']['#text'], wood['embodied_carbon']['@unit'], wood['recycling_ratio'], - # wood['onsite_recycling_ratio'], wood['company_recycling_ratio'], wood['landfilling_ratio'], - # wood['cost']['#text'], wood['cost']['@unit'])) - # - # for covering in self._lca["library"]["building_materials"]['coverings']['covering']: - # material_name = "covering" - # self._city.materials.append(Material(material_name, covering['@id'], material['@type'], covering['density']['#text'], covering['density']['@unit'], - # covering['embodied_carbon']['#text'], covering['embodied_carbon']['@unit'], covering['recycling_ratio'], - # covering['onsite_recycling_ratio'], covering['company_recycling_ratio'], covering['landfilling_ratio'], - # covering['cost']['#text'], covering['cost']['@unit'])) - # - # for metal in self._lca["library"]["building_materials"]['metals']['metal']: - # material_name = "metal" - # self._city.materials.append(Material(material_name, metal['@id'], material['@type'], metal['density']['#text'], metal['density']['@unit'], - # metal['embodied_carbon']['#text'], metal['embodied_carbon']['@unit'], metal['recycling_ratio'], - # metal['onsite_recycling_ratio'], metal['company_recycling_ratio'], metal['landfilling_ratio'], - # metal['cost']['#text'], metal['cost']['@unit'])) \ No newline at end of file