Integrating the housing market into an agent-based economic model