Design and implementation of bio-inspired heterogeneous particle swarm optimisation algorithms for unconstrained and constrained problems