A two-dimensional model for the lateral p—n—p transistor