Y branch optimization using particle swarm algorithm