Surrogate constraint method for optimal power flow