INET-Complexity / housing-model

Agent-based model of the UK housing market.
MIT License
39 stars 26 forks source link

Bug leading to "got endOfLettingAgreement on house on rental market" and "tenant moving into an occupied house" warnings #61

Closed adrian-carro closed 6 years ago

adrian-carro commented 6 years ago

For system size 40000, command line output looks like:

Simulation: 1, time: 2100
Strange: got endOfLettingAgreement on house on rental market
Simulation: 1, time: 2200
Strange: tenant moving into an occupied house
Strange: got endOfLettingAgreement on house on rental market
Simulation: 1, time: 2300
Strange: tenant moving into an occupied house
...It's a homeowner!
Simulation: 1, time: 2400
Simulation: 1, time: 2500
Strange: tenant moving into an occupied house
Strange: tenant moving into an occupied house
Strange: tenant moving into an occupied house
adrian-carro commented 6 years ago

Bug related with households selling houses at a price that does not cover all the mortgage payments they still need to make and being unable to make those payments from their savings. In that case, the house stays in the housePayments object so that the household keeps on making monthly payments. However, in places like the inheritance methods, there is an iteration over all properties at the housePayments object... so households with debts on previous houses are probably trying to give those houses (which they do not own) as inheritance to their heirs...

adrian-carro commented 6 years ago

Solved by commit f25c9af50436104013c7a2f54cdc7bb33f7a75f2.