Code Monkey home page Code Monkey logo

python_corona_simulation's People

Contributors

andrewfisher97 avatar andrewhuffman avatar chorsnell avatar paulvangentcom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python_corona_simulation's Issues

Can't get it towork

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,

Still Crash :(

Hello,

I'm still facing bugs.
After solving the Config issue with the pop_size (still exist in the code) I crashed on the if len(destinations) == 0 at infection.py which fail. and than when passing population and destinations the program failed on tuple indices.

The simulation code is important for me and I think you have done a very good work.
I'm suggesting that the code will be deployed on clean environment and probably you will be able to solve everything in less than an hour.

Thanks and best Regards,
Elad

bugs when running simulation.py and simple_simulation.py

When running simulation.py:

Traceback (most recent call last):
File "simulation.py", line 11, in
from population import initialize_population, initialize_destination_matrix,
ImportError: cannot import name 'population_trackers' from 'population' (/Users/ismirkamili/pyprojects/python_corona_simulation/population.py)

When running simple_simulation.py

...
File "/Users/ismirkamili/pyprojects/python_corona_simulation/env/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 418, in open_file_cm
fh, opened = to_filehandle(path_or_file, mode, True, encoding)
File "/Users/ismirkamili/pyprojects/python_corona_simulation/env/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 403, in to_filehandle
fh = open(fname, flag, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'render/0.png'

Any missing resource or module? I use python 3.7 with venv

Thank you

some question about the project

Hi
I think your project is very well developed, so I am curious about what kind of Software Development Lifecycle Model you have adopted. The code my friend and I created was very messy, which made it very difficult for us to check each other's code

After recover, is there way to get sick again?

Hi, I tried to figure out have you coded the possibility to get infection again. This model seems to rely that once you get infected and recovered, you wont get infected any more. I found self.reinfect

Animation effect is not working

When I ran the Simulation.py, everything works fine except for the Axis 1 animation; only the colors change, but the person is not moving.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.