check type checks
Created by: PRemmen
I'm not sure, but I think our current type checks are based on a very old layout of TEASER e.g.
if type(wall_count).__name__ == "OuterWall" :
we should check if it is possible to replace all of them, by using either
from teaser.logic.buildingobjects.buildingphysics.outerwall import OuterWall
if isinstance(wall_count, OuterWall):
#This will return true for all OuterWall instances as well as for inherited instances from OuterWall (Rooftop, GroundFloor)
or
from teaser.logic.buildingobjects.buildingphysics.outerwall import OuterWall
if type(wall_count) == OuterWall:
#This will return true only for OuterWall instances
What kinf we are using depends on the usage, sometimes we just want to pass specific objects (in this case we should use type) sometimes all inherited objects can be passed (in this case we should use isinstance)