Appliances test
This commit is contained in:
parent
9d51d4f8ba
commit
35f5544a32
166
hub/data/costs/montreal_costs_oriol.xml
Normal file
166
hub/data/costs/montreal_costs_oriol.xml
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
<archetypes>
|
||||||
|
<archetype function="residential" municipality="montreal" currency="CAD">
|
||||||
|
<capital_cost>
|
||||||
|
<ASubstructure>
|
||||||
|
<A10sub_structural cost_unit="currency/m2"> 15.89 </A10sub_structural>
|
||||||
|
<A20structural cost_unit="currency/m3"> 215.90 </A20structural>
|
||||||
|
</ASubstructure>
|
||||||
|
<BShell>
|
||||||
|
<B10superstructure>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B10superstructure>
|
||||||
|
<B20envelope>
|
||||||
|
<B2010opaquewalls>
|
||||||
|
<reposition cost_unit="currency/m2"> 304 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 304 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B2010opaquewalls>
|
||||||
|
<B2020transparent>
|
||||||
|
<reposition cost_unit="currency/m2"> 857.14 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 857.14 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</B2020transparent>
|
||||||
|
</B20envelope>
|
||||||
|
<B30roofing>
|
||||||
|
<B3010opaqueroof>
|
||||||
|
<reposition cost_unit="currency/m2"> 118 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 118 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B3010opaqueroof>
|
||||||
|
<B3020transparentroof>
|
||||||
|
<reposition cost_unit="currency/m2"> 857.14 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 857.14 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</B3020transparentroof>
|
||||||
|
</B30roofing>
|
||||||
|
</BShell>
|
||||||
|
<CInteriors>
|
||||||
|
<C10Interiorconstruction>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</C10Interiorconstruction>
|
||||||
|
<C20Stairs>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</C20Stairs>
|
||||||
|
<C30Interiorfinishes>
|
||||||
|
<C3010Walls>
|
||||||
|
<reposition cost_unit="currency/m2"> 50 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 50 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3010Walls>
|
||||||
|
<C3020Floors>
|
||||||
|
<reposition cost_unit="currency/m2"> 62 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 62 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3020Floors>
|
||||||
|
<C3030Ceilings>
|
||||||
|
<reposition cost_unit="currency/m2"> 70 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 70 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3030Ceilings>
|
||||||
|
</C30Interiorfinishes>
|
||||||
|
</CInteriors>
|
||||||
|
<DServices>
|
||||||
|
<D10Conveying cost_unit="currency/m2"> 0 </D10Conveying>
|
||||||
|
<D20Plumbing cost_unit="currency/m2"> 100 </D20Plumbing>
|
||||||
|
<D30HVAC>
|
||||||
|
<D3010EnergySupply>
|
||||||
|
<D301010photovoltaic_system>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 800 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 800 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D301010photovoltaic_system>
|
||||||
|
</D3010EnergySupply>
|
||||||
|
<D3020Heatgeneratingsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 622.86 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D3020Heatgeneratingsystems>
|
||||||
|
<D3030Coolinggenerationsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 622.86 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3030Coolinggenerationsystems>
|
||||||
|
<D3040Distributionsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3040Distributionsystems>
|
||||||
|
<D3060Controlsandinstrumentation>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3060Controlsandinstrumentation>
|
||||||
|
<D3080OtherHVAC_AHU>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 47.62 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 47.62 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3080OtherHVAC_AHU>
|
||||||
|
</D30HVAC>
|
||||||
|
<D50Electrical>
|
||||||
|
<D5010Electricalservicesanddistribution>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 171.43 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 171.43 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5010Electricalservicesanddistribution>
|
||||||
|
<D5020Lightingandbranchwiring>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 139 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 139 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5020Lightingandbranchwiring>
|
||||||
|
</D50Electrical>
|
||||||
|
</DServices>
|
||||||
|
<EEquimentsandfurnishing>
|
||||||
|
<E10Equipments>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</E10Equipments>
|
||||||
|
<E10Furnishing>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</E10Furnishing>
|
||||||
|
</EEquimentsandfurnishing>
|
||||||
|
<engineer cost_unit="%"> 2.5 </engineer>
|
||||||
|
</capital_cost>
|
||||||
|
<operational_cost>
|
||||||
|
<fuel fuel_type="electricity">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 0 </fixed_monthly>
|
||||||
|
<fixed_power cost_unit="currency/kW"> 0 </fixed_power>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/kWh"> 5.6 </variable>
|
||||||
|
</fuel>
|
||||||
|
<maintenance>
|
||||||
|
<heating_equipment cost_unit="currency/kW"> 40 </heating_equipment>
|
||||||
|
<cooling_equipment cost_unit="currency/kW"> 40 </cooling_equipment>
|
||||||
|
<general_hvac_equipment cost_unit="currency/(m3/h)"> 0.05 </general_hvac_equipment>
|
||||||
|
<photovoltaic_system cost_unit="currency/m2"> 1 </photovoltaic_system>
|
||||||
|
<other_systems cost_unit="currency/m2"> 4.6 </other_systems>
|
||||||
|
</maintenance>
|
||||||
|
<CO2_cost cost_unit="currency/kgCO2"> 30 </CO2_cost>
|
||||||
|
</operational_cost>
|
||||||
|
<end_of_life_cost cost_unit="currency/m2"> 6.3 </end_of_life_cost>
|
||||||
|
<incomes>
|
||||||
|
<subsidies>
|
||||||
|
<construction_subsidy cost_unit="%"> 2 </construction_subsidy>
|
||||||
|
<hvac_subsidy cost_unit="%"> 1.5 </hvac_subsidy>
|
||||||
|
<photovoltaic_subsidy cost_unit="%"> 3.6 </photovoltaic_subsidy>
|
||||||
|
</subsidies>
|
||||||
|
<energy_exports>
|
||||||
|
<electricity cost_unit="currency/kWh"> hourlydatatable </electricity>
|
||||||
|
<heat cost_unit="currency/kWh"> 0 </heat>
|
||||||
|
</energy_exports>
|
||||||
|
<tax_reductions>
|
||||||
|
<reductions_taxes cost_unit="%"> 2 </reductions_taxes>
|
||||||
|
</tax_reductions>
|
||||||
|
<CO2_income cost_unit="currency/kgCO2exported"> 0 </CO2_income>
|
||||||
|
</incomes>
|
||||||
|
</archetype>
|
||||||
|
</archetypes>
|
212
hub/data/costs/montreal_costs_oriol_LOD0.xml
Normal file
212
hub/data/costs/montreal_costs_oriol_LOD0.xml
Normal file
|
@ -0,0 +1,212 @@
|
||||||
|
<archetypes>
|
||||||
|
<archetype function="residential" municipality="montreal" currency="CAD">
|
||||||
|
<capital_cost>
|
||||||
|
<B_Shell>
|
||||||
|
<B10_superstructure>
|
||||||
|
<refurbishment_cost_basement cost_unit="currency/m2"> 0 </refurbishment_cost_basement>
|
||||||
|
</B10_superstructure>
|
||||||
|
<B20_envelope>
|
||||||
|
<B2010_opaquewalls>
|
||||||
|
<refurbishment_cost cost_unit="currency/m2"> 304 </refurbishment_cost>
|
||||||
|
</B2010_opaquewalls>
|
||||||
|
<B2020_transparent>
|
||||||
|
<refurbishment_cost cost_unit="currency/m2"> 857.14 </refurbishment_cost>
|
||||||
|
</B2020_transparent>
|
||||||
|
</B20_envelope>
|
||||||
|
<B30_roofing>
|
||||||
|
<B3010_opaqueroof>
|
||||||
|
<refurbishment_cost cost_unit="currency/m2"> 118 </refurbishment_cost>
|
||||||
|
</B3010_opaqueroof>
|
||||||
|
</B30_roofing>
|
||||||
|
</B_Shell>
|
||||||
|
<D_Services>
|
||||||
|
<D30_HVAC>
|
||||||
|
<D3010_EnergySupply>
|
||||||
|
<D301010_Photovoltaic_system>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 800 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 800 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D301010_Photovoltaic_system>
|
||||||
|
</D3010_EnergySupply>
|
||||||
|
<D3020_Heat_generating_systems>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 622.86 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D3020_Heat_generating_systems>
|
||||||
|
<D3030_Cooling_generation_systems>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 622.86 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3030_Cooling_generation_systems>
|
||||||
|
<D3040_Distributionsystems>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 0 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3040_Distributionsystems>
|
||||||
|
<D3080_OtherHVAC_AHU>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 47.62 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 47.62 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3080_OtherHVAC_AHU>
|
||||||
|
</D30_HVAC>
|
||||||
|
<D50_Electrical>
|
||||||
|
<D5020Lightingandbranchwiring>
|
||||||
|
<refurbishmentcost cost_unit="currency/kW"> 139 </refurbishmentcost>
|
||||||
|
<reposition cost_unit="currency/kW"> 139 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5020Lightingandbranchwiring>
|
||||||
|
</D50_Electrical>
|
||||||
|
</D_Services>
|
||||||
|
<Z_Allowances_overhead_profit>
|
||||||
|
<Z10_Design_allowance cost_unit="%"> 2.5 </Z10_Design_allowance>
|
||||||
|
<Z10_Overhead_and_profit cost_unit="%"> 14 </Z10_Overhead_and_profit>
|
||||||
|
</Z_Allowances_overhead_profit>
|
||||||
|
</capital_cost>
|
||||||
|
<operational_cost>
|
||||||
|
<fuel fuel_type="electricity">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 12.27 </fixed_monthly>
|
||||||
|
<fixed_power cost_unit="currency/month*kW"> 0 </fixed_power>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/kWh"> 0.075 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="gas">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 17.71 </fixed_monthly>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/kWh"> 0.640 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="diesel">
|
||||||
|
<variable cost_unit="currency/l"> 1.2 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="biomass">
|
||||||
|
<variable cost_unit="currency/kg"> 0.09 </variable>
|
||||||
|
</fuel>
|
||||||
|
<maintenance>
|
||||||
|
<heating_equipment cost_unit="currency/kW"> 40 </heating_equipment>
|
||||||
|
<cooling_equipment cost_unit="currency/kW"> 40 </cooling_equipment>
|
||||||
|
<photovoltaic_system cost_unit="currency/m2"> 1 </photovoltaic_system>
|
||||||
|
</maintenance>
|
||||||
|
<CO2_cost cost_unit="currency/kgCO2"> 30 </CO2_cost>
|
||||||
|
</operational_cost>
|
||||||
|
<end_of_life_cost cost_unit="currency/m2"> 6.3 </end_of_life_cost>
|
||||||
|
<incomes>
|
||||||
|
<subsidies>
|
||||||
|
<construction_subsidy cost_unit="%"> 2 </construction_subsidy>
|
||||||
|
<hvac_subsidy cost_unit="%"> 1.5 </hvac_subsidy>
|
||||||
|
<photovoltaic_subsidy cost_unit="%"> 3.6 </photovoltaic_subsidy>
|
||||||
|
</subsidies>
|
||||||
|
<energy_exports>
|
||||||
|
<electricity cost_unit="currency/kWh"> 0 </electricity>
|
||||||
|
</energy_exports>
|
||||||
|
<tax_reductions>
|
||||||
|
<reductions_taxes cost_unit="%"> 2 </reductions_taxes>
|
||||||
|
</tax_reductions>
|
||||||
|
</incomes>
|
||||||
|
</archetype>
|
||||||
|
<archetype function="non-residential" municipality="montreal" currency="CAD">
|
||||||
|
<capital_cost>
|
||||||
|
<B_Shell>
|
||||||
|
<B10_superstructure>
|
||||||
|
<refurbishmentcostbasement cost_unit="currency/m2"> 0 </refurbishmentcostbasement>
|
||||||
|
</B10_superstructure>
|
||||||
|
<B20_envelope>
|
||||||
|
<B2010_opaque_walls>
|
||||||
|
<refurbishmentcost cost_unit="currency/m2"> 304 </refurbishmentcost>
|
||||||
|
</B2010_opaque_walls>
|
||||||
|
<B2020_transparent>
|
||||||
|
<refurbishmentcost cost_unit="currency/m2"> 857.14 </refurbishmentcost>
|
||||||
|
</B2020_transparent>
|
||||||
|
</B20_envelope>
|
||||||
|
<B30_roofing>
|
||||||
|
<B3010_opaqueroof>
|
||||||
|
<refurbishmentcost cost_unit="currency/m2"> 118 </refurbishmentcost>
|
||||||
|
</B3010_opaqueroof>
|
||||||
|
</B30_roofing>
|
||||||
|
</B_Shell>
|
||||||
|
<D_Services>
|
||||||
|
<D30_HVAC>
|
||||||
|
<D3010EnergySupply>
|
||||||
|
<D301010photovoltaic_system>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 800 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 800 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D301010photovoltaic_system>
|
||||||
|
</D3010EnergySupply>
|
||||||
|
<D3020Heatgeneratingsystems>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 622.86 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D3020Heatgeneratingsystems>
|
||||||
|
<D3030_Cooling_generation_systems>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 622.86 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3030_Cooling_generation_systems>
|
||||||
|
<D3040_Distribution_systems>
|
||||||
|
<refurbishmentcost cost_unit="currency/m2"> 0 </refurbishmentcost>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3040_Distribution_systems>
|
||||||
|
<D3080_Other_HVAC_AHU>
|
||||||
|
<investment_cost cost_unit="currency/kW"> 47.62 </investment_cost>
|
||||||
|
<reposition cost_unit="currency/kW"> 47.62 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3080_Other_HVAC_AHU>
|
||||||
|
</D30_HVAC>
|
||||||
|
<D50_Electrical>
|
||||||
|
<D5020_Lighting_and_branch_wiring>
|
||||||
|
<refurbishmentcost cost_unit="currency/kW"> 139 </refurbishmentcost>
|
||||||
|
<reposition cost_unit="currency/kW"> 139 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5020_Lighting_and_branch_wiring>
|
||||||
|
</D50_Electrical>
|
||||||
|
</D_Services>
|
||||||
|
<Z_Allowances_overhead_profit>
|
||||||
|
<Z10_Design_allowance cost_unit="%"> 6 </Z10_Design_allowance>
|
||||||
|
<Z20_Overhead_profit cost_unit="%"> 14 </Z20_Overhead_profit>
|
||||||
|
</Z_Allowances_overhead_profit>
|
||||||
|
</capital_cost>
|
||||||
|
<operational_cost>
|
||||||
|
<fuel fuel_type="electricity">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 12.27 </fixed_monthly>
|
||||||
|
<fixed_power cost_unit="currency/(month*kW)"> 0 </fixed_power>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/kWh"> 0.075 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="gas">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 17.71 </fixed_monthly>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/m3"> 0.640 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="diesel">
|
||||||
|
<variable cost_unit="currency/l"> 1.2 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="biomass">
|
||||||
|
<variable cost_unit="currency/kg"> 0.09 </variable>
|
||||||
|
</fuel>
|
||||||
|
<maintenance>
|
||||||
|
<heating_equipment cost_unit="currency/kW"> 40 </heating_equipment>
|
||||||
|
<cooling_equipment cost_unit="currency/kW"> 40 </cooling_equipment>
|
||||||
|
<photovoltaic_system cost_unit="currency/m2"> 1 </photovoltaic_system>
|
||||||
|
</maintenance>
|
||||||
|
<CO2_cost cost_unit="currency/kgCO2"> 30 </CO2_cost>
|
||||||
|
</operational_cost>
|
||||||
|
<end_of_life_cost cost_unit="currency/m2"> 6.3 </end_of_life_cost>
|
||||||
|
<incomes>
|
||||||
|
<subsidies>
|
||||||
|
<construction_subsidy cost_unit="%"> 2 </construction_subsidy>
|
||||||
|
<hvac_subsidy cost_unit="%"> 1.5 </hvac_subsidy>
|
||||||
|
<photovoltaic_subsidy cost_unit="%"> 3.6 </photovoltaic_subsidy>
|
||||||
|
</subsidies>
|
||||||
|
<energy_exports>
|
||||||
|
<electricity cost_unit="currency/kWh"> 0 </electricity>
|
||||||
|
</energy_exports>
|
||||||
|
<tax_reductions>
|
||||||
|
<reductions_taxes cost_unit="%"> 2 </reductions_taxes>
|
||||||
|
</tax_reductions>
|
||||||
|
</incomes>
|
||||||
|
</archetype>
|
||||||
|
</archetypes>
|
178
hub/data/costs/montreal_costs_oriol_LOD1.xml
Normal file
178
hub/data/costs/montreal_costs_oriol_LOD1.xml
Normal file
|
@ -0,0 +1,178 @@
|
||||||
|
<archetypes>
|
||||||
|
<archetype function="residential" municipality="montreal" currency="CAD">
|
||||||
|
<capital_cost>
|
||||||
|
<ASubstructure>
|
||||||
|
<A10sub_structural cost_unit="currency/m2"> 15.89 </A10sub_structural>
|
||||||
|
<A20structural cost_unit="currency/m3"> 215.90 </A20structural>
|
||||||
|
</ASubstructure>
|
||||||
|
<BShell>
|
||||||
|
<B10superstructure>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B10superstructure>
|
||||||
|
<B20envelope>
|
||||||
|
<B2010opaquewalls>
|
||||||
|
<reposition cost_unit="currency/m2"> 304 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 304 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B2010opaquewalls>
|
||||||
|
<B2020transparent>
|
||||||
|
<reposition cost_unit="currency/m2"> 857.14 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 857.14 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</B2020transparent>
|
||||||
|
</B20envelope>
|
||||||
|
<B30roofing>
|
||||||
|
<B3010opaqueroof>
|
||||||
|
<reposition cost_unit="currency/m2"> 118 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 118 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</B3010opaqueroof>
|
||||||
|
<B3020transparentroof>
|
||||||
|
<reposition cost_unit="currency/m2"> 857.14 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 857.14 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</B3020transparentroof>
|
||||||
|
</B30roofing>
|
||||||
|
</BShell>
|
||||||
|
<CInteriors>
|
||||||
|
<C10Interiorconstruction>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</C10Interiorconstruction>
|
||||||
|
<C20Stairs>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 50 </lifetime_equipment>
|
||||||
|
</C20Stairs>
|
||||||
|
<C30Interiorfinishes>
|
||||||
|
<C3010Walls>
|
||||||
|
<reposition cost_unit="currency/m2"> 50 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 50 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3010Walls>
|
||||||
|
<C3020Floors>
|
||||||
|
<reposition cost_unit="currency/m2"> 62 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 62 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3020Floors>
|
||||||
|
<C3030Ceilings>
|
||||||
|
<reposition cost_unit="currency/m2"> 70 </reposition>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 70 </initial_investment>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</C3030Ceilings>
|
||||||
|
</C30Interiorfinishes>
|
||||||
|
</CInteriors>
|
||||||
|
<DServices>
|
||||||
|
<D10Conveying cost_unit="currency/m2"> 0 </D10Conveying>
|
||||||
|
<D20Plumbing cost_unit="currency/m2"> 100 </D20Plumbing>
|
||||||
|
<D30HVAC>
|
||||||
|
<D3010EnergySupply>
|
||||||
|
<D301010photovoltaic_system>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 800 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 800 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D301010photovoltaic_system>
|
||||||
|
</D3010EnergySupply>
|
||||||
|
<D3020Heatgeneratingsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 622.86 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 25 </lifetime_equipment>
|
||||||
|
</D3020Heatgeneratingsystems>
|
||||||
|
<D3030Coolinggenerationsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 622.86 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 622.86 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3030Coolinggenerationsystems>
|
||||||
|
<D3040Distributionsystems>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3040Distributionsystems>
|
||||||
|
<D3060Controlsandinstrumentation>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3060Controlsandinstrumentation>
|
||||||
|
<D3080OtherHVAC_AHU>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 47.62 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 47.62 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</D3080OtherHVAC_AHU>
|
||||||
|
</D30HVAC>
|
||||||
|
<D50Electrical>
|
||||||
|
<D5010Electricalservicesanddistribution>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 171.43 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 171.43 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5010Electricalservicesanddistribution>
|
||||||
|
<D5020Lightingandbranchwiring>
|
||||||
|
<initial_investment cost_unit="currency/kW"> 139 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/kW"> 139 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 20 </lifetime_equipment>
|
||||||
|
</D5020Lightingandbranchwiring>
|
||||||
|
</D50Electrical>
|
||||||
|
</DServices>
|
||||||
|
<EEquimentsandfurnishing>
|
||||||
|
<E10Equipments>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</E10Equipments>
|
||||||
|
<E10Furnishing>
|
||||||
|
<initial_investment cost_unit="currency/m2"> 0 </initial_investment>
|
||||||
|
<reposition cost_unit="currency/m2"> 0 </reposition>
|
||||||
|
<lifetime_equipment lifetime="years"> 15 </lifetime_equipment>
|
||||||
|
</E10Furnishing>
|
||||||
|
</EEquimentsandfurnishing>
|
||||||
|
<engineer cost_unit="%"> 2.5 </engineer>
|
||||||
|
</capital_cost>
|
||||||
|
<operational_cost>
|
||||||
|
<fuel fuel_type="electricity">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 12.27 </fixed_monthly>
|
||||||
|
</fixed>
|
||||||
|
<variable_base cost_unit="currency/kWh"> hourlydatatable1 </variable_base>
|
||||||
|
<variable_peak cost_unit="currency/kWh"> hourlydatatable2 </variable_peak>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="gaz">
|
||||||
|
<fixed>
|
||||||
|
<fixed_monthly cost_unit="currency/month"> 17.71 </fixed_monthly>
|
||||||
|
</fixed>
|
||||||
|
<variable cost_unit="currency/m3"> 0.640 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="diesel">
|
||||||
|
<variable cost_unit="currency/l"> 1.2 </variable>
|
||||||
|
</fuel>
|
||||||
|
<fuel fuel_type="biomass">
|
||||||
|
<variable cost_unit="currency/kg"> 0.09 </variable>
|
||||||
|
</fuel>
|
||||||
|
<maintenance>
|
||||||
|
<heating_equipment cost_unit="currency/kW"> 40 </heating_equipment>
|
||||||
|
<cooling_equipment cost_unit="currency/kW"> 40 </cooling_equipment>
|
||||||
|
<general_hvac_equipment cost_unit="currency/(m3/h)"> 0.05 </general_hvac_equipment>
|
||||||
|
<photovoltaic_system cost_unit="currency/m2"> 1 </photovoltaic_system>
|
||||||
|
<other_systems cost_unit="currency/m2"> 4.6 </other_systems>
|
||||||
|
</maintenance>
|
||||||
|
<CO2_cost cost_unit="currency/kgCO2"> 30 </CO2_cost>
|
||||||
|
</operational_cost>
|
||||||
|
<end_of_life_cost cost_unit="currency/m2"> 6.3 </end_of_life_cost>
|
||||||
|
<incomes>
|
||||||
|
<subsidies>
|
||||||
|
<construction_subsidy cost_unit="%"> 2 </construction_subsidy>
|
||||||
|
<hvac_subsidy cost_unit="%"> 1.5 </hvac_subsidy>
|
||||||
|
<photovoltaic_subsidy cost_unit="%"> 3.6 </photovoltaic_subsidy>
|
||||||
|
</subsidies>
|
||||||
|
<energy_exports>
|
||||||
|
<electricity cost_unit="currency/kWh"> hourlydatatable </electricity>
|
||||||
|
<heat cost_unit="currency/kWh"> 0 </heat>
|
||||||
|
</energy_exports>
|
||||||
|
<tax_reductions>
|
||||||
|
<reductions_taxes cost_unit="%"> 2 </reductions_taxes>
|
||||||
|
</tax_reductions>
|
||||||
|
<CO2_income cost_unit="currency/kgCO2exported"> 0 </CO2_income>
|
||||||
|
</incomes>
|
||||||
|
</archetype>
|
||||||
|
</archetypes>
|
|
@ -20,6 +20,7 @@ class Idf:
|
||||||
_BUILDING = 'BUILDING'
|
_BUILDING = 'BUILDING'
|
||||||
_ZONE = 'ZONE'
|
_ZONE = 'ZONE'
|
||||||
_LIGHTS = 'LIGHTS'
|
_LIGHTS = 'LIGHTS'
|
||||||
|
_APPLIANCES = 'OtherEquipment'
|
||||||
_PEOPLE = 'PEOPLE'
|
_PEOPLE = 'PEOPLE'
|
||||||
_THERMOSTAT = 'HVACTEMPLATE:THERMOSTAT'
|
_THERMOSTAT = 'HVACTEMPLATE:THERMOSTAT'
|
||||||
_IDEAL_LOAD_AIR_SYSTEM = 'HVACTEMPLATE:ZONE:IDEALLOADSAIRSYSTEM'
|
_IDEAL_LOAD_AIR_SYSTEM = 'HVACTEMPLATE:ZONE:IDEALLOADSAIRSYSTEM'
|
||||||
|
@ -338,7 +339,7 @@ class Idf:
|
||||||
|
|
||||||
def _add_lighting(self, thermal_zone, zone_name):
|
def _add_lighting(self, thermal_zone, zone_name):
|
||||||
fraction_radiant = thermal_zone.lighting.radiative_fraction
|
fraction_radiant = thermal_zone.lighting.radiative_fraction
|
||||||
fraction_visible = 1
|
fraction_visible = 0.3
|
||||||
method = 'Watts/Area'
|
method = 'Watts/Area'
|
||||||
watts_per_zone_floor_area = thermal_zone.lighting.density
|
watts_per_zone_floor_area = thermal_zone.lighting.density
|
||||||
fraction_replaceable = 1
|
fraction_replaceable = 1
|
||||||
|
@ -356,6 +357,27 @@ class Idf:
|
||||||
EndUse_Subcategory=subcategory
|
EndUse_Subcategory=subcategory
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _add_appliances(self, thermal_zone, zone_name):
|
||||||
|
fueltype='Electricity'
|
||||||
|
fraction_radiant = thermal_zone.appliances.radiative_fraction
|
||||||
|
fraction_convective= thermal_zone.appliances.convective_fraction
|
||||||
|
fraction_latent = 0
|
||||||
|
method = 'Watts/Area'
|
||||||
|
watts_per_zone_floor_area = thermal_zone.appliances.density
|
||||||
|
subcategory = f'ELECTRIC EQUIPMENT#{zone_name}#InteriorEquipment'
|
||||||
|
|
||||||
|
self._idf.newidfobject(self._APPLIANCES,
|
||||||
|
Fuel_type=fueltype,
|
||||||
|
Name=f'{zone_name}_appliances',
|
||||||
|
Zone_or_ZoneList_Name=zone_name,
|
||||||
|
Schedule_Name=f'Appliance schedules {thermal_zone.usage_name}',
|
||||||
|
Design_Level_Calculation_Method=method,
|
||||||
|
Watts_per_Zone_Floor_Area=watts_per_zone_floor_area,
|
||||||
|
Fraction_Latent=fraction_latent,
|
||||||
|
Fraction_Convective=fraction_convective,
|
||||||
|
Fraction_Radiant=fraction_radiant,
|
||||||
|
EndUse_Subcategory=subcategory
|
||||||
|
)
|
||||||
def _add_infiltration(self, thermal_zone, zone_name):
|
def _add_infiltration(self, thermal_zone, zone_name):
|
||||||
for zone in self._idf.idfobjects["ZONE"]:
|
for zone in self._idf.idfobjects["ZONE"]:
|
||||||
if zone.Name == f'{zone_name}_infiltration':
|
if zone.Name == f'{zone_name}_infiltration':
|
||||||
|
@ -422,6 +444,8 @@ class Idf:
|
||||||
self._add_infiltration(thermal_zone, building.name)
|
self._add_infiltration(thermal_zone, building.name)
|
||||||
self._add_occupancy(thermal_zone, building.name)
|
self._add_occupancy(thermal_zone, building.name)
|
||||||
self._add_lighting(thermal_zone, building.name)
|
self._add_lighting(thermal_zone, building.name)
|
||||||
|
self._add_appliances(thermal_zone, building.name)
|
||||||
|
|
||||||
if self._export_type == "Surfaces":
|
if self._export_type == "Surfaces":
|
||||||
if building.name in self._target_buildings or building.name in self._adjacent_buildings:
|
if building.name in self._target_buildings or building.name in self._adjacent_buildings:
|
||||||
self._add_surfaces(building, building.name)
|
self._add_surfaces(building, building.name)
|
||||||
|
|
|
@ -104,7 +104,7 @@ class InselMonthlyEnergyBalance(Insel):
|
||||||
f'zone {i + 1} (degree Celsius)')
|
f'zone {i + 1} (degree Celsius)')
|
||||||
parameters.append(f'{usage.thermal_control.heating_set_back} % BP(14) #4 Heating setback temperature '
|
parameters.append(f'{usage.thermal_control.heating_set_back} % BP(14) #4 Heating setback temperature '
|
||||||
f'zone {i + 1} (degree Celsius)')
|
f'zone {i + 1} (degree Celsius)')
|
||||||
parameters.append(f'{usage.thermal_control.mean_cooling_set_point} % BP(15) #5 Cooling setpoint temperature '
|
parameters.append(f'{usage.thermal_control.mean_cooling_set_point + 3} % BP(15) #5 Cooling setpoint temperature '
|
||||||
f'zone {i + 1} (degree Celsius)')
|
f'zone {i + 1} (degree Celsius)')
|
||||||
parameters.append(f'{usage.hours_day} % BP(16) #6 Usage hours per day zone {i + 1}')
|
parameters.append(f'{usage.hours_day} % BP(16) #6 Usage hours per day zone {i + 1}')
|
||||||
parameters.append(f'{usage.days_year} % BP(17) #7 Usage days per year zone {i + 1}')
|
parameters.append(f'{usage.days_year} % BP(17) #7 Usage days per year zone {i + 1}')
|
||||||
|
|
|
@ -54,7 +54,9 @@ class EnergyBuildingsExportsFactory:
|
||||||
"""
|
"""
|
||||||
idf_data_path = (Path(__file__).parent / './building_energy/idf_files/').resolve()
|
idf_data_path = (Path(__file__).parent / './building_energy/idf_files/').resolve()
|
||||||
# todo: create a get epw file function based on the city
|
# todo: create a get epw file function based on the city
|
||||||
|
print('path', idf_data_path)
|
||||||
weather_path = (Path(__file__).parent / '../data/weather/epw/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw').resolve()
|
weather_path = (Path(__file__).parent / '../data/weather/epw/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw').resolve()
|
||||||
|
print(weather_path)
|
||||||
return Idf(self._city, self._path, (idf_data_path / 'Minimal.idf'), (idf_data_path / 'Energy+.idd'), weather_path,
|
return Idf(self._city, self._path, (idf_data_path / 'Minimal.idf'), (idf_data_path / 'Energy+.idd'), weather_path,
|
||||||
target_buildings=self._target_buildings, adjacent_buildings=self._adjacent_buildings)
|
target_buildings=self._target_buildings, adjacent_buildings=self._adjacent_buildings)
|
||||||
|
|
||||||
|
@ -71,6 +73,7 @@ class EnergyBuildingsExportsFactory:
|
||||||
Export the city given to the class using the given export type handler
|
Export the city given to the class using the given export type handler
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
print(self)
|
||||||
return getattr(self, self._export_type, lambda: None)
|
return getattr(self, self._export_type, lambda: None)
|
||||||
|
|
||||||
def export_debug(self):
|
def export_debug(self):
|
||||||
|
|
|
@ -9,7 +9,6 @@ import math
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import requests
|
import requests
|
||||||
from PIL import Image
|
|
||||||
from trimesh import Trimesh
|
from trimesh import Trimesh
|
||||||
from trimesh import intersections
|
from trimesh import intersections
|
||||||
|
|
||||||
|
@ -18,6 +17,7 @@ from hub.city_model_structure.attributes.polyhedron import Polyhedron
|
||||||
from hub.helpers.location import Location
|
from hub.helpers.location import Location
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MapPoint:
|
class MapPoint:
|
||||||
def __init__(self, x, y):
|
def __init__(self, x, y):
|
||||||
self._x = int(x)
|
self._x = int(x)
|
||||||
|
@ -79,15 +79,14 @@ class GeometryHelper:
|
||||||
y = int((city.upper_corner[1] - city.lower_corner[1]) * 0.5) + 1
|
y = int((city.upper_corner[1] - city.lower_corner[1]) * 0.5) + 1
|
||||||
city_map = [['' for _ in range(y + 1)] for _ in range(x + 1)]
|
city_map = [['' for _ in range(y + 1)] for _ in range(x + 1)]
|
||||||
map_info = [[{} for _ in range(y + 1)] for _ in range(x + 1)]
|
map_info = [[{} for _ in range(y + 1)] for _ in range(x + 1)]
|
||||||
img = Image.new('RGB', (x + 1, y + 1), "black") # create a new black image
|
# img = Image.new('RGB', (x + 1, y + 1), "black") # create a new black image
|
||||||
city_image = img.load() # create the pixel map
|
# city_image = img.load() # create the pixel map
|
||||||
for building_name in building_names:
|
for building_name in building_names:
|
||||||
building = city.city_object(building_name)
|
building = city.city_object(building_name)
|
||||||
line = 0
|
line = 0
|
||||||
for ground in building.grounds:
|
for ground in building.grounds:
|
||||||
length = len(ground.perimeter_polygon.coordinates) - 1
|
length = len(ground.perimeter_polygon.coordinates) - 1
|
||||||
for i, coordinate in enumerate(ground.perimeter_polygon.coordinates):
|
for i, coordinate in enumerate(ground.perimeter_polygon.coordinates):
|
||||||
|
|
||||||
j = i + 1
|
j = i + 1
|
||||||
if i == length:
|
if i == length:
|
||||||
j = 0
|
j = 0
|
||||||
|
@ -107,7 +106,7 @@ class GeometryHelper:
|
||||||
'line_start': (coordinate[0], coordinate[1]),
|
'line_start': (coordinate[0], coordinate[1]),
|
||||||
'line_end': (next_coordinate[0], next_coordinate[1]),
|
'line_end': (next_coordinate[0], next_coordinate[1]),
|
||||||
}
|
}
|
||||||
city_image[x, y] = (100, 0, 0)
|
# city_image[x, y] = (100, 0, 0)
|
||||||
elif city_map[x][y] != building.name:
|
elif city_map[x][y] != building.name:
|
||||||
neighbour = city.city_object(city_map[x][y])
|
neighbour = city.city_object(city_map[x][y])
|
||||||
neighbour_info = map_info[x][y]
|
neighbour_info = map_info[x][y]
|
||||||
|
@ -167,51 +166,8 @@ class GeometryHelper:
|
||||||
elif building not in neighbour.neighbours:
|
elif building not in neighbour.neighbours:
|
||||||
neighbour.neighbours.append(building)
|
neighbour.neighbours.append(building)
|
||||||
line += 1
|
line += 1
|
||||||
|
# if plot:
|
||||||
if plot:
|
# img.show()
|
||||||
img.show()
|
|
||||||
return lines_information
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def fast_city_mapping(city, building_names=None):
|
|
||||||
lines_information = {}
|
|
||||||
if building_names is None:
|
|
||||||
building_names = [b.name for b in city.buildings]
|
|
||||||
x = int((city.upper_corner[0] - city.lower_corner[0]) * 0.5) + 1
|
|
||||||
y = int((city.upper_corner[1] - city.lower_corner[1]) * 0.5) + 1
|
|
||||||
city_map = [['' for _ in range(y + 1)] for _ in range(x + 1)]
|
|
||||||
for building_name in building_names:
|
|
||||||
building = city.city_object(building_name)
|
|
||||||
line = 0
|
|
||||||
for ground in building.grounds:
|
|
||||||
length = len(ground.perimeter_polygon.coordinates) - 1
|
|
||||||
for i, coordinate in enumerate(ground.perimeter_polygon.coordinates):
|
|
||||||
j = i + 1
|
|
||||||
if i == length:
|
|
||||||
j = 0
|
|
||||||
next_coordinate = ground.perimeter_polygon.coordinates[j]
|
|
||||||
point = GeometryHelper.coordinate_to_map_point(coordinate, city)
|
|
||||||
distance = int(GeometryHelper.distance_between_points(coordinate, next_coordinate))
|
|
||||||
if distance == 0:
|
|
||||||
continue
|
|
||||||
delta_x = (coordinate[0] - next_coordinate[0]) / (distance / 0.5)
|
|
||||||
delta_y = (coordinate[1] - next_coordinate[1]) / (distance / 0.5)
|
|
||||||
for k in range(0, distance):
|
|
||||||
x = MapPoint(point.x + (delta_x * k), point.y + (delta_y * k)).x
|
|
||||||
y = MapPoint(point.x + (delta_x * k), point.y + (delta_y * k)).y
|
|
||||||
if city_map[x][y] == '':
|
|
||||||
city_map[x][y] = building.name
|
|
||||||
elif city_map[x][y] != building.name:
|
|
||||||
neighbour = city.city_object(city_map[x][y])
|
|
||||||
if building.neighbours is None:
|
|
||||||
building.neighbours = [neighbour]
|
|
||||||
elif neighbour not in building.neighbours:
|
|
||||||
building.neighbours.append(neighbour)
|
|
||||||
if neighbour.neighbours is None:
|
|
||||||
neighbour.neighbours = [building]
|
|
||||||
elif building not in neighbour.neighbours:
|
|
||||||
neighbour.neighbours.append(building)
|
|
||||||
line += 1
|
|
||||||
return lines_information
|
return lines_information
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -61,7 +61,7 @@ class CityLayerTest(TestCase):
|
||||||
def _genidf(self, bldgs_group):
|
def _genidf(self, bldgs_group):
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
buildings_df, target_buildings, adjacent_buildings = self._prepare_buildings(bldgs_group)
|
buildings_df, target_buildings, adjacent_buildings = self._prepare_buildings(bldgs_group)
|
||||||
output_path = (Path(__file__).parent / 'tests_outputs').resolve()
|
#output_path = (Path(__file__).parent / 'tests_outputs').resolve()
|
||||||
city = GeometryFactory('gpandas', data_frame=buildings_df).city
|
city = GeometryFactory('gpandas', data_frame=buildings_df).city
|
||||||
ConstructionFactory('nrel', city).enrich()
|
ConstructionFactory('nrel', city).enrich()
|
||||||
UsageFactory('comnet', city).enrich()
|
UsageFactory('comnet', city).enrich()
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user