Resource and buffer allocation problems are well-known topics in manufacturing system research. A proper allocation of resource and space can significantly improve the system performance and reduce the investment cost. However, few works consider the joint problem because of its complexity. Recent research has shown that Discrete Event Optimization (DEO) framework, an integrated simulation-optimization approach based on mathematical programming, can be used to optimize buffer allocation of production lines, such as open and closed flow lines and pull controlled manufacturing systems. This paper proposes mathematical programming models for solving the joint workstation and buffer allocation problem in manufacturing flow lines constrained to a given target throughput. The problem is formulated in two different ways: An exact model using mixed integer linear programming formulation and approximate models using linear programming formulation. Numerical analysis shows that efficiency and accuracy can be both achieved by using approximate formulations in a math-heuristic procedure.