Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SiloMucTest doesn't consistently pass #360

Open
jakobrehmann opened this issue Jun 28, 2023 · 1 comment
Open

SiloMucTest doesn't consistently pass #360

jakobrehmann opened this issue Jun 28, 2023 · 1 comment

Comments

@jakobrehmann
Copy link
Collaborator

I sometimes get assertion errors when I run SiloMucTest, e.g.:

junitx.framework.ComparisonFailure: dwellings are different. Line [3] expected:<...,834,...> but was:<...,831,...> ['1']

I seems like, at least on my local machine, that SILO is not quite deterministic: if run multiple times, the same test potentially produces different results. At first I thought this had to do with multi-threading. However, even when I added the option number.of.threads = 1 to ./test/muc/siloMucTest.properties, the test still failed occasionally.

@paulheinr
Copy link

Our analysis so far is:

The difference in the output data shows, that dwelling prices differ. Prices are updated in de.tum.bgu.msm.models.realEstate.pricing.PricingModelImpl#updateRealEstatePrices. The prices rely on the vacancy rate of the respective region. Whether a dwelling is vacant or not is determined by de.tum.bgu.msm.models.relocation.moves.MovesModelImpl#searchForNewDwelling in the move model.

Those two lines seem to be problematic:

double util = housingStrategy.calculateHousingUtility(household, dwelling);
double prob = housingStrategy.calculateSelectDwellingProbability(util);

If we set the probability to a constant (e.g. 0.1), tests didn't fail. So something at the calculation of housing utility seems to be non deterministic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants