Modified electromagnetism-like algorithm and its application to slope stability analysis