Text this: A real–time distributed optimization control for power sharing and voltage restoration in inverter–based microgrids