Modern power systems are dynamic and complex. Likewise, smart grids bring opportunities for the development of protection relays, such as the ability to communicate remotely. Based on these opportunities, this paper proposes a method of coordinating directional overcurrent relays capable of quickly obtaining the optimal adjustment of the relays with each topological change in the network. The proposed methodology is applied in different cases to a test system, demonstrating its effectiveness and potential. https://doi.org/10.53316/sepoc2021.045