Simulating herd behavior with sets of vectors
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
My goal is to be able to simulate the movements of herds of "animals" through sets of vector functions, so as to save myself time calculating by hand.
At its most basic, the herd has a set of n individuals, with attractive forces proportional to the sum of distances to other individuals in the herd, and some constant. There should also be a repulsive force, inversely proportional to the sum of distances from individual A to all other individuals nearby. Individuals have position, velocity, acceleration and force vectors associated with them, in both x and y coordinates, s.t. P(A)= px,py, making the end result a swarm of vectors moving about in the plane, constrained by some simple forces.
My crude description is to give a sense of what I am hoping for, not to outsource work. I simply would like to know how you, more experienced matlab users, would conceptualize this within the framework of matlab. What would your approach to this be like? I would like to avoid using higher level functions if possible, so that I can build my simulation from the ground up.
in the past I have wasted a lot of time, which could have been saved by simply asking for some simple advice from more experienced people.
Thank you in advance.
1 comentario
Litalo
el 23 de Nov. de 2020
Hi Erik :-) did you found general solution to such problems? if so i would like to hear,
Best, Lital
Respuestas (0)
Ver también
Categorías
Más información sobre Particle Swarm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!