Optimization of the use of confectionery raw materials by means of linear programming methods
Optimization is a process whose purpose is to find a specific configuration of inputs and actions that leads to the best possible results. This may mean maximizing profit from products sold, minimizing the costs of raw-material consumption, or minimizing the probability that expensive confectionery additives will pass their expiry date. Optimization is therefore a process that seeks extreme results. As a rule, the owner of a confectionery plant may define only one optimization objective.1
The result of optimization will be a clear indication of what actions should be taken in order to achieve the maximum level of the defined objective. Effective optimization can be carried out solely by means of linear programming. This method is based on mathematical equations and inequalities. Personally, I do not know anyone who likes mathematics. Nor do I know anyone who does not use calculations to earn money or to count something. Mathematics therefore evokes ambivalent feelings. On the one hand, we avoid it; on the other, we cannot live without it.
Planning is one of the most important elements of managing a confectionery plant. Its economic result depends on the quality of planning. Many unknowns arise, including the level of demand and future raw-material prices. We intuitively sense that skilful calculation can increase our earnings, shorten journey times or minimize risk. Sometimes we see that our actions have failed, discover our mistakes and calculate our losses. Very often we are forced to rely on blind chance. An additional tool in the form of a better calculator or planning program would certainly be useful.
W-MOSZCZYNSKI ppic 9-21Operations research
To plan better, we must rise above intuition and our own experience and enter deeply into mathematical analysis, differential operations, formulas and graphs. Who has time for that today? Does the owner of a confectionery plant also have to be a mathematician?
As ordinary people, we are reluctant to enter unfamiliar territory, especially territory filled with rules and equations and shrouded in a fog of abstract mathematical expressions. The truth, however, is different.
Mathematical methods of production planning are very simple and should not be feared. Optimization consists of two steps: formulating mathematical inequalities and entering them into an online calculator.
1 There are methods which combine several optimization objectives. This is done by defining a single objective as an index composed of many partial objectives. Defining one objective is the most effective method of optimization.
The first step appears difficult, and it may indeed be so, but if we have several good examples, we can simply rewrite the formulas, substituting our own values. It is also worth noting that once we have managed to optimize something, we will be able to apply the same formulas in other cases. Sometimes it is worth taking a step toward new technologies, especially when it involves no expenditure.
Thanks to this publication and simplex calculators available online, it will be possible to introduce a new production-planning technology relatively easily and painlessly. We will use algorithms, that is, linear programming—algorithms simple enough to be understood by anyone who has had even minimal contact with mathematics.
What is linear programming and when did it arise?
Linear programming was invented in 1939 by the Soviet economist Leonid Kantorovich. The method was widely used by the Allies during the Second World War. With limited resources, they had to allocate them optimally. Planning sought to reduce the risk of cargo being lost by convoys, maximize the effects of carpet bombing and mathematically minimize human losses. Optimization equations reduced the risk of delays in the delivery of supplies and indicated how the available resources could best be used.
The algorithms used at the time were very complicated. Immediately after the war, in 1947, George Dantzig, an analyst in the United States Air Force, simplified optimization methods while introducing a number of analytical innovations. As a result, linear programming became common in production planning and logistics in every industry throughout the world.
Planning the use of raw materials by means of linear programming
A confectionery plant has one tonne of N1 jelly and half a tonne of N2 additives in stock. The raw materials have a short shelf life and must be used as soon as possible.
The plant produces four kinds of shortbread biscuits. The two raw materials, N1 and N2, are required in their production. The recipes require both raw materials to be used simultaneously.
The confectioner must quickly use the raw materials held in stock by selecting the production of the biscuits that will bring the greatest profit. At the same time, this production should consume as much N1 jelly and N2 additives as possible, because otherwise they may have to be disposed of.
The table below shows four confectionery products and the quantities of N1 and N2 required to produce 1,000 kg of biscuits. Raw-material consumption is stated in kg per tonne of production.
| Product | N1 jelly | N2 additive | Profit per tonne |
|---|---|---|---|
| “Grandma Ani” biscuits | 24 kg | 19 kg | PLN 200/t |
| “Beatek” biscuits | 15 kg | 21 kg | PLN 180/t |
| “Rodeo shortbread” biscuits | 27 kg | 30 kg | PLN 400/t |
| “Dyzma” biscuits | 15 kg | 8 kg | PLN 150/t |
| Raw-material limits | ≤ 1,000 kg | ≤ 500 kg | — |
The final column gives the estimated profit from 1,000 kg of product. “Rodeo shortbread” biscuits are the most profitable (PLN 400/t), while “Dyzma” biscuits are the least profitable (PLN 150/t). The last row gives the raw-material consumption constraints. No more than 1,000 kg of N1 jelly and no more than 500 kg of the N2 additive may be consumed. Owing to the small scale of production, the owner must decide to make only one particular product.
Calculations without linear programming
The starting point for planning is to identify the decision variable. It is the planned quantity of biscuits in tonnes. The quantity of raw materials required is the constraint.
If we decide to produce 30 t of “Grandma Ani” biscuits, the table allows us to calculate the consumption:
24 kg/t × 30 t = 720 kg (N1 jelly)19 kg/t × 30 t = 570 kg (N2 additive)30 t × PLN 200/t = PLN 6,000 (total profit)
Because the production quantity has been set at x1 = 30 t, the expressions are:
24 kg/t × x1 t (N1 jelly)19 kg/t × x1 t (N2 additive)x1 t × PLN 200/t (total profit)
Unfortunately, the N2-additive limit has been exceeded. Only 500 kg of that raw material is in stock. In addition, 280 kg of N1 jelly remains, although it was intended to be consumed in this one-off production run. Reducing the quantity of “Grandma Ani” biscuits would reduce profit and increase the amount of unused N1 jelly.
Formulating the objective function
In life as in mathematics, if we want to optimize something, we must have a defined objective. Our objective is to maximize profit from biscuit production.
Let:
x1 = the required quantity in tonnes of “Grandma Ani” biscuits,
x2 = the required quantity in tonnes of “Beatek” biscuits,
x3 = the required quantity in tonnes of “Rodeo shortbread” biscuits,
x4 = the required quantity in tonnes of “Dyzma” biscuits.
The objective function can then be formulated as:
F(x1, x2, x3, x4) = 200x1 + 180x2 + 400x3 + 150x4 → max (1)
We have just formulated the objective function of the linear-programming model.
If we decided to produce 30 t of “Grandma Ani” biscuits, then x1 = 30 and x2 = x3 = x4 = 0, so:
F(x1, x2, x3, x4) = PLN 200 × 30 t = PLN 6,000
Formulating linear inequalities
Under the assumptions, we cannot use more N1 jelly or N2 additive than the plant has in stock. With the table showing raw-material consumption, the constraint formulas can readily be written:
24x1 + 15x2 + 27x3 + 15x4 ≤ 1,000 (2)
19x1 + 21x2 + 30x3 + 8x4 ≤ 500 (3)
If 30 t of “Grandma Ani” biscuits are produced, so that x1 = 30, the result is:
24 × 30 + 15 × 0 + 27 × 0 + 15 × 0 ≤ 1,000
19 × 30 + 21 × 0 + 30 × 0 + 8 × 0 ≤ 500
The second inequality is not satisfied, because 19 times 30 equals 570 while the constraint is 500.
For the model to calculate correctly, conditions must also be added specifying that the quantities of biscuits are greater than or equal to zero. The complete model therefore consists of inequalities (2) and (3), together with:
x1 ≥ 0 (4)
x2 ≥ 0 (5)
x3 ≥ 0 (6)
x4 ≥ 0 (7)
The objective function (1) is added to this set.
How can the model be calculated?
To calculate a linear-programming model formulated in this way, matrix calculus must be used. Doing the task with a calculator and pen would probably take a long time. It can be calculated much faster by the graphical method. Fortunately, many simplex calculators can be found online. One need only enter the inequalities to obtain the desired result. One of them is the Polish calculator at maslowski.pl.
First, we enter the number of variables and the number of constraints. We then enter our mathematical expressions. In the notation used by the calculator, the decimal separator is a full stop, not a comma. At the bottom of the page we find the result:
Optimal solution: x1 = 0, x2 = 0, x3 = 0, x4 = 62.5; objective-function value z = 9,375.
This calculator has a specific way of presenting results, which should be expressed as whole values. The confectionery owner therefore received the information that 62 t of “Dyzma” biscuits should be produced. As we recall, these biscuits had the lowest unit profit.
Is the result correct? Substituting x4 = 62 into the model gives:
| N1 jelly | N2 additive | |
|---|---|---|
| Raw-material consumption | 930 kg | 496 kg |
| Total profit | PLN 9,300 | |
| Raw-material consumption limit | ≤ 1,000 kg | ≤ 500 kg |
Producing 62 t of “Dyzma” biscuits generates the greatest profit while leaving the smallest quantity of N1 and N2 raw materials.
What would happen if other kinds of biscuits were produced? Would the total profit be lower?
If “Rodeo shortbread” biscuits were selected, no more than x3 = 16 t could be produced without exceeding the raw-material limits. The profit would then be PLN 2,900 lower than the profit from “Dyzma” biscuits, and more than half a tonne of N1 jelly would remain in stock.
| N1 jelly | N2 additive | |
|---|---|---|
| Raw-material consumption | 432 kg | 480 kg |
| Total profit | PLN 6,400 | |
| Raw-material consumption limit | ≤ 1,000 kg | ≤ 500 kg |
If “Beatek” biscuits were selected, production could be set at a maximum of x2 = 23 t without exceeding the limits. The total profit would be PLN 5,160 lower than the profit from “Dyzma” biscuits, and more than 600 kg of N1 jelly would remain and have to be discarded.
| N1 jelly | N2 additive | |
|---|---|---|
| Raw-material consumption | 345 kg | 483 kg |
| Total profit | PLN 4,140 | |
| Raw-material consumption limit | ≤ 1,000 kg | ≤ 500 kg |
If “Grandma Ani” biscuits were selected, the difference in the profit achieved would be PLN 4,100.
Summary
Today we have learned a very simple method of optimizing production planning. It should be understandable to everyone. In most cases, optimization is carried out in more complicated processes involving a dozen or even several dozen different constraints and variables. Optimization may be directed at maximizing profits or minimizing costs; it may minimize risk or the consumption of production resources.
Optimization has no limits. Within one model, the most diverse categories may occur side by side: monetary values and quantity categories or degrees of probability. It is worth remembering that linear-programming algorithms always lead to an extreme result while preserving the defined constraints. In practice, complex economic dilemmas are very difficult to calculate by conventional methods.
Wojciech Moszczyński — graduate of the Department of Econometrics and Statistics of Nicolaus Copernicus University in Toruń; specialist in econometrics, finance, data science, and management accounting. He specializes in the optimization of production and logistics processes. He conducts research in the area of the development and application of artificial intelligence. For years he has been engaged in the popularization of machine learning and data science in business environments.

Dodaj komentarz