I have been developing a simulation tool in grasshopper + python to simulate the spread of a disease in a city, for my architecture masters thesis project.
The model is made up of:
HOME points (where people live, leave and return to each day)
PLACE points (where people go to and come back from each day)
PATH network (curves/polylines connecting them together, representing pavements/sidewalks and paths).
The model works by generating “people” (points) on the HOME points, calculating their closest PLACE (closest point component) and figuring out the route to get there (shortest walk component), the route (curve) is then divided 200 times, and a python script counts from 0 to 2400 (24hrs), moving the point along the curve in 200 “steps” to the PLACE and back at specific times (E.g. 700=>900, 1500=>1700).
The problem I have is that the “person” is a new point instance at each step, instead of being the SAME point moving along the curve and back, so if the point gets INFECTED (python script evaluating proximity to an infected point), it doesn’t stay infected, as the next instance is a new point (i.e. noninfected).
Essentially I need a way of the points acting as agents with a state/characteristic which changes over time like:
NONINFECTED => INFECTED => IMMUNE.
So Problem is: I need Points as Agents that move, not copied as new instances
Sorry if this sounds really confusing, but I really hope someone can help me out!
Thanks in advance guys,
Resim T1.gh (78.7 KB)