In this paper, well-established concepts such as the Optimal Power Flow (OPF) and branch flow models were integrated to novelty ideas such as the Power Router Grid (PRG), an innovative electric grid design based on power routers (PRs).Moreover, the PRG-OPF can be further expanded in order to consider other constraints such as line loading, converter efficiency, and voltages at voltage control ports.Additionally, the proposed model demonstrates the PRG benefits, enabling the extension of radial-based models to encompass grids interconnected through PRs.This integration resulted in the definition of the PRG-OPF, a mathematical optimization that uses SOCP relaxation to find the global optimal operation for any PRG.The optimization model has been implemented using Python and the PYOMO modeling language, and three case studies were conducted to validate its effectiveness.Additionally, a sensitivity analysis was performed to measure the impact in terms of line losses of operating the PRG outside the optimal point.Moreover, the sensitivity analysis demonstrated the influence line impedances have when changing the setpoints of controllable lines.