Master Thesis OPF Problem