Energy and flexibility markets clearing mechanism for electrical distribution system through a flexibility imbalance modification strategy | Synapse