python_corona_simulation
python_corona_simulation copied to clipboard
An agent-based simulation of corona and other viruses in python
Implement the suggested pattern in Python.
Apply singleton design pattern to avoid creating configuration's instance more than once and save memory
Creating a class named environment and make xmin, xmax, ymin, ymax, plt and addcross as variables of the class. What's more, put the method of build_hospital() into the class and...
This time the pull request again rectifies the whole code base, I put all the behavior such as setting people's destination, infection, etc, into the motion file and instantiate the...
In this version, I have converted the environment into a class and the hospital, the school can be instantiated as an object within the environment. The creation of regions would...
The purpose of this class is to provide a consistent interface for a group of interfaces in the subsystem. The appearance pattern defines a high-level interface, which makes the subsystem...
I choose the singleton model as the innovative model and apply it to the config file to reduce memory consumption. Hope you adopt!
Apply Adapter design pattern to respond to possible scaling requirements that may arise later.
Use singleton design pattern to save memory and manage that instance away from the programmer.
I noticed _read_from_file(path)_ was on your TODO list so I went ahead and implemented it. We can now easily create custom configurations for more unique simulations. _read_from_file_ reads through the...