This paper presents a formulation of the Optimal Power Flow problem with an explicit modeling of Static Var Compensator (SVC) and Unified Power Flow Controller (UPFC) devices. The optimization problem is solved by using Sequential Quadratic Programming, where two convergence criteria and four different methods are studied to solve the quadratic subproblems. The proposed model is integrated in an object-oriented based decision support platform for competitive power markets. Validation of the method and practical applications to real longitudinal systems are discussed, where FACTS location and a UPFC-based interconnection are described. Results show the impact of SVC and UPFC FACTS technologies in the physical and economic behavior of a real system.