Port of MATPOWER to Python