A hat manufacturing company produces two types of hats. The time required to produce the first type of hat is twice the time required to produce the second type. If all the hats are only of the second type, the company can produce a total of $500$ hats per day. The maximum daily sales of the first and second hats are $150$ and $250$, respectively.
Suppose the profit from the sale of the first and second type of hats is $8$ and $5$ dollars, respectively. It is desirable to determine the number of hats that should be produced from the first and second types to optimize the total profit.
The answer is given by:
Define $ x_i $ as the number of hats produced of the $i$th type,$ y_i $ as the number of daily sales of hats of the $i$th type, and $c_i$ as the time required to produce a hat of the $i$th type, then we want to maximize $$z=8y_1+5y_2$$ subject to :
$$x_1c_1 +x_2c_2 \le 500c_2$$ $$y_1 \le 150 \;\;,\;\; y_2 \le 250$$ $$y_1 \le x_1 \;\;,\;\; y_2 \le x_2$$ $$x_1,x_2,y_1,y_2 \in \mathbb Z_{ \ge 0}$$
However I doubt if the inequality $x_1c_1 +x_2c_2 \le 500$ is enough, I think the question should indicate the maximum number of hats that can be produced on a daily basis and that how many of these hats can be of the first type (at most).
Assuming the maximum number of hats that can be produced on a daily basis is $z_0$ and $z_1$ is the maximum number of produced hats of the first type, then $x_1c_1 +x_2c_2 \le 500$ should be $$x_1c_1 +x_2c_2 \le z_1c_1+(z_0-z_1)c_2$$
lets say the number of hat one produced is $x_1$ and hat two $x_2$. We have a time limit per day of $T$. Firstly, we know: $$T=2a_1x_1+a_1x_2$$ $$T_{max}=500a_1$$ so it follows that: $$2x_1+x_2\le 500\tag{1}$$ now lets say we want to sell everything we produce, production is limited by sales and so: $$0\le x_1\le 150\tag{2.1}$$ $$0\le x_2\le 250\tag{2.2}$$ now we know how much money we make from each of the hats is given by: $$P=8x_1+5x_2\tag{3}$$
What we now want to do is maximise $(1)$ whilst prioritising $x_1$.
To maximise $P$ we want $x_1$ as high as possible, so look at $x_1=150$ now we have: $$2(150)+x_2\le 500\Rightarrow x_2\le200$$ now plug this into our equation for $P$ to get: $$P_{max_1}=8(150)+5(200)=$2200$$
Now do the same but optimising $x_2$ to get: $$x_2=250\Rightarrow 2x_1=250$$ but this doesn't work, the closest we can get is $2x_1=248\Rightarrow x_1=124\Rightarrow x_2=376$ now plug this in: $$P_{max_2}=8(124)+5(376)=$2872$$
Now which of these is better?