So let us now formulate this product mix problem with the non-linear profit functions, and we're going to define the decision variables, the constraints, and the objective function for this problem. So the first thing to note is that there is no linearity in the profit margins of the product D and E and the 1st 20 units of product D and E would sell for $4 per unit. Therefore, we're going to define the decision variables of how many units of D and E to produce. We're going to put upper bound of 20 on the volumes of D and E. And then, define an additional set of variables D2 and E2 which will be selling for 3$ per unit for any number of units that is above 20. So D has to be below the values of D, and E have to be below at less than, equal to 20 units. And D2 and E2 will be some positive value which will only be positive if you have already produced 20 units of D and E. So we're going to also ensure that the profit contribution or the contribution margin for product D and E are $4 per unit for the first 20 units with that upper bound of 20 units on D and E. And then, $3 per unit for D2, and E2. these are like the virtual products that you're creating to account for the fact that after you pass the 20 unit mark, you are accounting them differently in the model. So here are my decision variables. The first one is number of units of A produced. Then for B and C, similarly we have the number of units of B and C produced denoted by E, D, and C respectively for the first three products. Then for product, D we're going to split it up into two variables, D and D2. So D will stand for the number of units of T, not in excess of 20 units produced per week, so we will have to have a constraint on the value of D being less than equal to 20. And D2 is a positive number greater than equal to 0, which will capture the number of units of D produced in excess of 20 units per week. Similarly, for the product E, we're going to define two variables, E and E2, where the variable is going to capture the number of units of E produced not in excess of 20 units per week. And E2 will be the number of units of E produced in excess of 20 units per week. So once again, we're going to add constraints of D less than equal to 20 and E less than equal to 20 in order to ensure that are variable definitions are consistent with what we want them to achieve. Then, we have three additional variables, M1, M2 and M3. These are the number of hours that machine 1, 2, and 3 will be used for week. And one thing to note is that the actual number of units of D and E that have been produced by week is going to be D plus D2 for product D and E plus E2 for product E. We have just created two variables instead of one, just to account for that non-linearity. That since the per unit profit margin is changing for these two product, we have to create two variables for these two product. So D and D2, where these less than 20 and D2 is going to be, if it is positive, it means we are producing more than 20 units of product D. And similarly, we have created two variables E and E2. So with these decision variables defined, let us now look at what the objective function in the other constraints would be for this problem. So the list over here or the tables over here are reporting the profit contribution margins for the product A through E with product D and E being reported with two variables. D and E2 and E and E2 as defined previously. And here, you have the sale price in dollar per unit which is going to be $5 for A, $4 for B, $5 for C, $4 for each unit of D where it's less than 20. And then, for every unit above 20, it sell-price is $3, so D at D2 sells at a price of $3. And similarly for product E, since the variable E is defined as the number. Units less than equal to 20. There you have a sale margin of $4 per unit, and for any amount greater than that, any amount greater than 20 of product E produced, that is E 2. The profit contribution margin, the sale price is $3 per unit. Now, in terms of the material cost, we have the cost listed here for a through E where it is $2 cost for A, N, C and for the other items is $1 each per unit. Therefore, the contribution margin is going to be the difference of these two columns. The second and the third column, sale price minus marginal cost that's going to be the profit contribution margin for each of these products. So for product A it is going to be $5 minus $2 dollars that's $3 margin. For product B it is going to be $4 minus $1 which is $3 contribution margin. Similarly, for product C $3 contribution margin. For product D, for the 1st 20 units that is the variable D. We have a sale price of $4 and material cost of $1. Therefore, the contribution margin for the 1st 20 units, that is D is going to be $3. And then for any units produced in excess of 20 which is captured by this variable D2 is going to be $3 minus $1 equal to $2 contribution margin. And similarly, for E and E2 the contribution margins are going to be $3 and $2 respectively for number of units below 20 and above it. So those are the profit contribution margins for the different products. Now, recall that keeping the machine running for a certain number of hours involves labor cost. So these machines require labor to operate them. So therefore, if you have kept machine 1 running for M1 hours, then the cost of running it is $4. So the contribution margin that you need to consider is minus $4. And similarly, for machine 2 it's minus $4 contribution towards the objective function, because this is the cost of keeping the machine running for M2 hours. For machine 3, it cost $3 in labor cost to keep it running. So therefore, the contribution margin to the objective function for machine 3 is $3. So those values are written in negative and in red. Now we can put these together to find the objective function Z, which is going to be the product of the contribution margins for these different decision variables for the products that we discussed. So 3 times A + 3 times B + 3 times C + 3 times D + 2 times D2 + 3 times E + 2 times E2. These are the total profit contribution margins from the selling the products. And then you have a cost of running these machines in order to produce these products, which is going to be -4 M1, -4 M2, and -3 M3. That's your objective function based on the definition of the various decision variables, and the sale price, and the material cost, and the labor cost that were reported for this problem. So once we have the objective function, we now need to look at what are the different constraints. So we already talked about some of the constraints like D and E have to be less than equal to 20 by definition of these decision variables. And from the problem you would see that the machines can be run for 128 hours. Therefore, M1, M2, and M3 will have to be less than equal to 128. Now there is also some other constraints coming from the fact that each product requires some amount of time on these machines. For machine 1 it needs 12 minutes for each unit of product A. 7 minutes for each unit of product B produced 8 minutes for each unit of product. C produced 10 minutes for each unit of product. D produced whether it is less than 20 units or anything above that, so 10 times D + 10 times D2. And similarly, for E its there is going to be 7 times E + 7 times E2. So these are going to be the total amount of time spent on manufacturing these products. And when you divide that by 60 you convert that into hour, and that number should be equal to M1. That is the amount of time in hours that you want to keep machine 1 running. So 12A + 7B + 8C + 10D + 10 D2 + 7 E + 7 E2- 60 M1 will have to be equal to 0, so that's the all constraint from machine. You want. Similarly, for a machine two, you can compute the total amount of time it spends on manufacturing these different products. So product d, doesn't appear in the second constraint because product d is does not require machine two at all, so its value 0. So you won't have those terms, but it requires eight minutes for each unit of product a, nine minutes for each unit of product b, four minutes for each unit of product c. And then 11 Minutes for each unit of product e and two, based on whether you are manufacturing less than 20 or more than 20 units. And when you divide that by 60, that's going to be giving you the number of hours that machine two has to be active. And that's equal to M2, and so we can rearrange the terms to write it as a single equality, and similarly for machine three. So our full problem formulation is given here, you have the objective function as we defined earlier. You have constraints d and e been less than equal to 20 by definition, for this decision variable. And M1, M2, M3 have to be less than 128, and then you have these equality constraints that we saw earlier for the values of M1, M2, M3. Given the unit of given the minutes required on each machine, for manufacturing these different products. So this is your full formulation. Now we need to enter this into Excel in some convenient manner and then solve it using solver. So let's look at that next.