Modelling Buildings and their Use as Systems of Agents