paulvangentcom / python_corona_simulation

An agent-based simulation of corona and other viruses in python
GNU General Public License v3.0
292 stars 76 forks source link

motion.py and path_planning.py aggregation design #25

Closed mamushi641 closed 3 years ago

mamushi641 commented 3 years ago

For the first changes, We take the movement of each person (point in the program) as our aggregate boundary, I created a new file called Speed_path, which is the aggregate root class for the motion.py and path_planing.py. Generally speaking, they all control how they act, so they can all be regarded as controllers of population movement trajectories. Path and motion generally control people (points in the program), and the units they change are all people (points in the program). Generally speaking, these two methods are simply to control the movement and speed of people in the air, so I wrote them into a Python file of Speed_path. When our main program needs to change the speed, we can directly access the speed in Speed_path. The speed method and the path are also changed according to this principle. motion.py and path_planning.py are entities from Speed_path.py.