Text this: Assessment and optimization of power networks based on a dual-loop model