Minimizing Flour Purchase Costs Using an Operations Research Algorithm

Minimizing the cost of purchasing flour by means of an operations-research algorithm

The methodology of operations research makes it possible to find a configuration of production resources and raw materials that achieves the maximum possible effect. Every production process has a number of conditions, such as limited production capacity and constraints on human or warehouse resources. An operations-research algorithm indicates the process configuration that maximizes or minimizes the objective while taking account of all the model’s boundary constraints. The objective of this study will be an attempt to minimize the cost of purchasing a raw material.

Operations-research algorithms can solve very complex processes involving dozens of products and constraints. To make the methodology easier to understand, however, we shall use a very simple example.

Imagine a bakery that produces three homogeneous products: bread, rolls and shortbread biscuits. The bakery owner has to choose a type of flour. Three flours are available, differing slightly in price and yield.

Tests were conducted and produced the information in Table 1. The figures show how many kilograms of the respective products can be obtained from one tonne of each of the three flours.

W-MOSZCZYNSKI ppic 10-21

Table 1. Baked-product weight for flours R1, R2 and R3

Product One tonne of R1 flour One tonne of R2 flour One tonne of R3 flour
Bread 1,350 kg/t 1,250 kg/t 1,400 kg/t
Rolls 1,450 kg/t 1,350 kg/t 1,650 kg/t
Shortbread biscuits 1,050 kg/t 1,015 kg/t 950 kg/t

The bakery has a defined production structure. By weight, it customarily produces during one nine-hour shift: 55% bread, 25% rolls and 20% shortbread biscuits. Table 2 shows the average quantity of products obtained from one tonne of flour.

Table 2. Total production obtained from one tonne of R1, R2 and R3 flour

Product R1 flour R2 flour R3 flour
Quantity of bread 742.5 kg 687.5 kg 770.0 kg
Quantity of rolls 362.5 kg 337.5 kg 412.5 kg
Quantity of biscuits 210.0 kg 203.0 kg 190.0 kg

As is known, a bakery must produce a quantity of products that meets market expectations. Limited production volume is the first limit in our optimization algorithm. Production capacity is another constraint. Production lasts nine hours. The bakery is capable of processing more than two tonnes of flour per hour.

Each type of flour has a different price. The price and yield of the flour have a direct effect on the production cost of one kilogram of products.

The purpose of the analysis is to determine which of the three flours should be used so that its daily purchasing cost is as low as possible. The entire situation is described in Table 3.

Table 3. Production volume from one tonne of flour, including constraints and purchasing costs

R1 flour R2 flour R3 flour Constraints
kg of bread 742.5 687.5 770.0 ≥ 16,000 kg and ≤ 18,000 kg
kg of rolls 362.5 337.5 412.5 ≥ 9,000 kg
kg of biscuits 210.0 203.0 190.0 ≥ 2,000 kg
Process duration 0.40 h/t 0.43 h/t 0.39 h/t ≤ 9 h
Price of one tonne of flour PLN 1,373 PLN 1,361 PLN 1,352

Let x1 denote the number of tonnes of R1 flour required for one day’s production. Let the required quantities of R2 and R3 flour be denoted by x2 and x3, respectively.

Formulating the algorithm

Our objective is the minimum daily flour-purchasing cost. We can define this function as the sum of the products of the quantities of the respective flours and their prices. The objective function is described by equation (1):

F(x1, x2, x3) = 1,373x1 + 1,361x2 + 1,352x3 → min   (1)

Production-volume constraints can be described by inequalities (2)–(6).

The bakery can sell a minimum of 16,000 kg but no more than 18,000 kg of bread per day. At least 9 tonnes of rolls are sold each day, as described by formula (4). Warehouse capacity and current sales allow at least the stated quantity of shortbread biscuits to be produced daily, as described by formula (5). Production capacity, expressed as production time, is described by inequality (6).

742.5x1 + 687.5x2 + 770x3 ≥ 16,000   (2)
742.5x1 + 687.5x2 + 770x3 ≤ 18,000   (3)
362.5x1 + 337.5x2 + 412.5x3 ≥ 9,000   (4)
210x1 + 203x2 + 190x3 ≥ 2,000   (5)
0.4x1 + 0.43x2 + 0.39x3 ≤ 9   (6)

These inequalities and the objective function are entered into a simplex calculator. Such calculators are widely available online. It is enough to copy the formulas into the form fields and start processing.

The result obtained

To minimize daily costs, 22 tonnes of R3 flour should be purchased. The cost of flour will then reach the lowest possible level.

Let us check whether this finding meets the boundary conditions. The result is x1 = 0, x2 = 0 and x3 = 22. We substitute these values into formulas (2)–(6):

742.5 × 0 + 687.5 × 0 + 770 × 22 ≥ 16,000   (2)
742.5 × 0 + 687.5 × 0 + 770 × 22 ≤ 18,000   (3)
362.5 × 0 + 337.5 × 0 + 412.5 × 22 ≥ 9,000   (4)
210 × 0 + 203 × 0 + 190 × 22 ≥ 2,000   (5)
0.4 × 0 + 0.43 × 0 + 0.39 × 22 ≤ 9   (6)

The resulting values are shown in Table 4.

Table 4. Verification of boundary conditions

Obtained value Constraint
Quantity of bread 16,940.0 kg ≥ 16,000 and ≤ 18,000
Quantity of rolls 9,075.0 kg ≥ 9,000
Quantity of biscuits 4,180 kg ≥ 3,000
Production time in hours 8.58 ≤ 9
Flour-purchasing cost PLN 29,744

As can be seen, the value obtained satisfies all the constraints. This means that the minimum cost that should be incurred in purchasing flour for one day is PLN 29,744.

This simple example shows how the level of costs can be minimized. The scale of production presented in the example fully justifies this type of optimization.

In cooperation with Ewa Moszczyńska.

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.

Bądź pierwszy, który skomentuje ten wpis!

Dodaj komentarz

Twój adres email nie zostanie opublikowany.


*