In this letter we propose a generalized branch model to be used in DC optimal power flow (DCOPF) applications. Besides AC lines and transformers, the formulation allows for representing variable susceptance branches, phase shifting transformers, HVDC lines, zero impedance lines and open branches. The possibility to model branches with concurrently variable susceptance and controllable phase shift angles is also provided. The model is suited for use in DCOPF formulations aimed at the optimization of remedial actions so as to exploit power system flexibility; applications to small-, medium- and large-scale systems are presented to this purpose.