A Mathematical Model, Implementation and Study of a Swarm System — arXiv2