bug dividing by 0 in nrcan_usage_parameters.py solved
This commit is contained in:
parent
3bfb985c04
commit
d5196fc54f
|
@ -130,11 +130,16 @@ class NrcanUsageParameters:
|
||||||
def _assign_comnet_extra_values(usage, archetype, occupancy_density):
|
def _assign_comnet_extra_values(usage, archetype, occupancy_density):
|
||||||
_occupancy = usage.occupancy
|
_occupancy = usage.occupancy
|
||||||
archetype_density = archetype.occupancy.occupancy_density
|
archetype_density = archetype.occupancy.occupancy_density
|
||||||
_occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain \
|
if archetype_density == 0:
|
||||||
* occupancy_density / archetype_density
|
_occupancy.sensible_radiative_internal_gain = 0
|
||||||
_occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain * occupancy_density / archetype_density
|
_occupancy.latent_internal_gain = 0
|
||||||
_occupancy.sensible_convective_internal_gain = archetype.occupancy.sensible_convective_internal_gain \
|
_occupancy.sensible_convective_internal_gain = 0
|
||||||
* occupancy_density / archetype_density
|
else:
|
||||||
|
_occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain \
|
||||||
|
* occupancy_density / archetype_density
|
||||||
|
_occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain * occupancy_density / archetype_density
|
||||||
|
_occupancy.sensible_convective_internal_gain = archetype.occupancy.sensible_convective_internal_gain \
|
||||||
|
* occupancy_density / archetype_density
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _calculate_reduced_values_from_extended_library(usage, archetype):
|
def _calculate_reduced_values_from_extended_library(usage, archetype):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user