An agent-based model and computational framework for counter-terrorism and public safety based on swarm intelligence