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

Can't get it towork #5

Open
Logic-gate opened this issue Apr 26, 2020 · 1 comment
Open

Can't get it towork #5

Logic-gate opened this issue Apr 26, 2020 · 1 comment
Assignees

Comments

@Logic-gate
Copy link

Logic-gate commented Apr 26, 2020

Paul,

Wonderful job.

But I can't get the example to work.

The initial issue I got was with gridspec in the demo file, a few tweaks and importing matplotlib.gridspec resolved it.

The second issue was with initialize_population in population.py, it kept complaining about Config.pop_size, again importing config in demo and passing Config as the first param seemed to resolve the issue.

Now it's complaining about destinations in infection.py.
if len(destinations) == 0: TypeError: object of type 'int' has no len()
After a bit of scooby dooing, I think I found a discrepancy between the infect function in demo and what it should be taking.

demo_COVID.py -- disregard the position of frame and the introduction of c

population = infect(population, c, frame, infection_range, infection_chance, healthcare_capacity, verbose)

infection.py
def infect(population, Config, frame, send_to_location=False, location_bounds=[], destinations=[], location_no=1, location_odds=1.0):
Am I right to assume that this discrepancy is the main cause of the issue?

Now obviously I am doing something extremely wrong here, I would very much appreciate any feedback.

Cheers,

@paulvangentcom
Copy link
Owner

this is correct, it seems I didn't include the COVID demo file in the refactor. I will work on this.

@paulvangentcom paulvangentcom self-assigned this Apr 28, 2020
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