A discrete particle swarm optimisation algorithm to operate distributed energy generation networks efficiently