Formulation of Machine allocation as an optimization problem

A manufacturing company from Eastern Finland will have to decide on the machines to use in order to produce 2800 units of a given item. Each machine has some given characteristics: a setup cost if it is used, a cost per produced unit and a maximum number of units which can be produced.

$$\begin{array}{cccc} \hline \text{Machine} & \text{Setup cost} & \text{Cost per unit} & \text{Maximum production (in pieces)}\\ \hline 1 & 500 & 2.00 & 1500 \\ 2 & 800 & 0.50 & 1200 \\ 3 & 200 & 3.00 & 800 \\ 4 & 50 & 5.00 & \text{unbounded}\\\hline \end{array}$$

Moreover, given the lack of operators, at most three machines can be chosen. Now how can I formulate an optimization problem to determine how many units each machine should produce to minimize the total cost?

Thanks!

Your $$\ge$$ constraint should just be $$x_1+x_2+x_3+x_4 \ge 2800$$. The maximum production values are upper bounds, like $$x_1 \le 1500$$. You have also not accounted for the setup costs, and for that purpose (and to enforce the "at most three machines" rule) you might find it useful to introduce binary variable $$y_j$$ to indicate whether $$x_j > 0$$. For example, $$x_1 \le 1500 y_1$$ enforces the implication $$x_1>0 \implies y_1=1$$.