Skip to content

Example 4.12 — Production of three drugs

Lecture notes (PDF) · Chapter slides (PDF) · App: Production of three drugs

Model: numerical · Techniques: 4.2 Production planning · All the worked models

The problem

Production of three drugs

A pharmaceutical company produces three drugs: drug 1, drug 2, and drug 3, which are sold at unit prices of 8 euros, 70 euros, and 100 euros, respectively. The production of 1 unit of drug 1 requires 1 hour of labor. The production of 1 unit of drug 2 requires 2 hours of labor and consumes 2 units of drug 1. The production of 1 unit of drug 3 requires 3 hours of labor and consumes 1 unit of drug 2. A total of 4000 labor hours are available. The goal of the company is to determine a production plan that maximizes the total revenue.

Questions

  1. Write a Linear Programming optimization model for the problem. Identify the decisions that must be made and define the corresponding decision variables. Describe the objective function of the model and its constraints. What algorithm can be used to find an optimal solution to the model?

Worked solution

We assume that the company can produce and sell any fractional quantities of each drug.

  1. We introduce the following three non-negative decision variables:

    \[ \left\{ \begin{aligned} y_1 &= \text{units of drug 1 sold}, \\ y_2 &= \text{units of drug 2 sold}, \\ y_3 &= \text{units of drug 3 sold}. \end{aligned} \right. \]

    Using these variables, a Linear Programming (LP) model for the problem reads as follows:

    \[ \begin{array}{rrcrcrcr} {\max} & {8\,y_{1}} & {+} & {70\,y_{2}} & {+} & {100\,y_{3}} \\[1ex] \text{subject to} & {y_{1}} & {+} & {4\,y_{2}} & {+} & {7\,y_{3}} & {\le} & {4000} \\[1ex] & {y_{1},} & & {y_{2},} & & {y_{3}} & {\ge} & {0} \end{array} \]

    Description of the objective function and constraints:

    • the linear objective function maximizes total revenue: drug 1 brings 8 euros/unit, drug 2 brings 70 euros/unit, and drug 3 brings 100 euros/unit.

    • the linear constraint limits total labor usage. Each unit of drug 1 sold requires 1 hour of labor; each unit of drug 2 requires 4 hours (2 units of drug 1 + 1 unit of drug 2); and each unit of drug 3 requires 7 hours (2 units of drug 1 + 1 unit of drug 2 + 1 unit of drug 3).

    • the final constraint defines the variables of the model.

  2. Another LP model.

    We introduce the following three non-negative decision variables:

    \[ \left\{ \begin{aligned} x_1 &= \text{units of drug 1 produced}, \\ x_2 &= \text{units of drug 2 produced}, \\ x_3 &= \text{units of drug 3 produced}. \end{aligned} \right. \]

    Using these variables, a Linear Programming (LP) model for the problem reads as follows:

    \[ \begin{array}{rrcrcrcr} {\max} & {8\,x_{1}} & {+} & {54\,x_{2}} & {+} & {30\,x_{3}} \\[1ex] \text{subject to} & {x_{1}} & {+} & {2\,x_{2}} & {+} & {3\,x_{3}} & {\le} & {4000} \\[1ex] & {-x_{1}} & {+} & {2\,x_{2}} & & & {\le} & {0} \\[1ex] & & {-} & {x_{2}} & {+} & {x_{3}} & {\le} & {0} \\[1ex] & {x_{1},} & & {x_{2},} & & {x_{3}} & {\ge} & {0} \end{array} \]

    Description of the objective function and constraints of the LP model:

    • the linear function maximizes the total revenue generated by the sale of the three drugs, after accounting for the internal consumption of intermediate drugs. The coefficients of each variable are computed by considering only the units that are actually sold on the market.

      • the quantity of drug 1 sold is equal to the quantity produced, \(x_1\), minus the quantity used to produce drug 2, which requires 2 units of drug 1 for each unit of drug 2 produced. Therefore, the effective contribution to revenue from drug 1 is:

        \[ 8(x_1 - 2x_2) \]
      • the quantity of drug 2 sold is equal to the quantity produced, \(x_2\), minus the quantity used to produce drug 3, which requires 1 unit of drug 2 for each unit of drug 3 produced. Therefore, the effective contribution to revenue from drug 2 is:

        \[ 70(x_2 - x_3) \]
      • all units of drug 3 are sold directly, so their contribution to revenue is simply:

        \[ 100x_3 \]

      Therefore, we have:

      \[ \max\; 8(x_1 - 2x_2) + 70(x_2 - x_3) + 100x_3 \quad \iff \quad \max\; 8x_1 + 54x_2 + 30x_3 \]
    • the first linear constraint limits total labor usage, ensuring that the total time required for all production activities does not exceed the available hours;

    • the second linear constraint ensures that drug 1 production is enough to support the production of drug 2:

      \[ x_1 - 2x_2 \ge 0 \iff 2x_2 \le x_1 \]
    • the third linear constraint ensures that drug 2 production is enough to support the production of drug 3:

      \[ x_2 - x_3 \ge 0 \iff x_3 \le x_2 \]
    • the final constraint defines the variables of the model.

Shadow prices of the instance

The shadow price of a constraint is the change of the optimal value for one more unit of its right-hand side, as long as the optimal basis does not change. For the instance of this page (optimal value \(70\,000\)) they are, computed with Gurobi:

Constraint Shadow price
working hours (\(k\)) \(\frac{35}{2}\) €/hour
drug 1 used by drug 2 \(\frac{19}{2}\) €/unit
drug 2 used by drug 3 \(0\) €/unit

Interactive lab

The app solves this model in the browser, with the data of the example: the sliders change the data and the simplex method recomputes the optimal solution. It also opens full page in the interactive lab: Production of three drugs.