Mathematical model for imitation of management of the enterprise’s logistical system

. The study is devoted to solving the scientiﬁc problem of optimizing the retail trade in the production and sale of two types of products, taking into account the change in potential demand for products. The economic and mathematical model of the production activity of the enterprise was developed taking into account logistics and market demand. The logistics scheme takes into account all the main links of the logistics system, as well as the connections between them. The considered scheme makes it possible to take into account the di-versiﬁcation of products manufactured by the enterprise. The mathematical model is designed for discrete time. A numerical optimization method has been developed for this mathematical model. The optimal solutions for several cases are found and investigated. The dynamics of the main characteristics of drugs was calculated for all considered cases. A comparative analysis of economic e ﬃ ciency for the studied cases has been performed. The economic e ﬃ ciency of retail network optimization is proved.


Introduction
Today in the scientific literature, much attention is paid to the modeling of logistics processes and production. The main purpose of article was to present the possibilities and examples of the use of Tecnomatix (Siemens) plant simulation to simulate logistics and manufacturing processes. This tool allows you to simulate discrete events and create digital models of logistics systems (for example, manufacturing), optimize the operation of factories, production lines, as well as individual logistics processes. A review of the execution of a Tecnomatix plant simulation for simulating processes in manufacturing engineering and logistics was conducted and several selected simulations were presented.
Further research should elaborate on the few initial attempts to combine different modeling techniques with optimization [1]. Simulation is an appropriate technique to tackle unresolved issues where analytical computations fail [2].
Article [3] highlights the problems of mathematical modeling for a certain element of the logistics supply system, that is, the production system. The system of the production complex, consisting of a determining number of parallel subsystems, is modeled.
If a company is unable to adapt to changing market conditions, it cannot survive in today's market environment.
To survive in a highly competitive global economy, production systems must be able to adapt to new circumstances [4]. As it is clear from the above and other contexts, many different indicators must be taken into account * e-mail: romanivanov1926@gmail.com for assessing the complexity of selected general process structures when designing a structure or optimizing production objectives [5].
The structure of production processes also depends on the production needs of certain products, which can show high variability. The organization of production processes is closely related to the process mappings and procedures responsible for production processes from individual components [6]. A key prerequisite for the effectiveness of the above and other production systems is the precise definition of the interaction between the links of the logistics system (LS) [6].
In addition, the requirements are growing in order to control possible destruction of production systems [7]. Rapid recovery of production in case of errors and other risks associated with the general I/O model, which is the production system, should be considered [8].
Production generally occurs as a series of individual actions that are performed manually, mechanically, or a combination of these. Optimization requires continuously processed orders in relation to individual projects. It can also be the sequential production of one type of product, in which we can easily identify a number of key performance indicators and manage and automate production [9,10]. Today, the standard starting point for calculating and optimizing manufacturing systems is simulation. Computer simulations allow us to test various types of production quickly. Computer simulation makes it possible to check many consequences of changes in production, processes and selects the most efficient way to streamline logistics in the near future [11]. Simulation can be used both before calculating the design of the production system and in order to optimize the production system and in the design of Figure 1. Scheme of the enterprise's logistics production processes, respectively. In both cases, it is necessary to consider the simulation results as input and information for the design or redesign of a thoughtful system. In addition to defining the structure of production systems (in manufacturing and logistics systems, of a particularly cautious nature, see, for example, [12][13][14]), simulations are useful for planning production and its sustainability and continuity [15,16]. Specifically, simulations can help coordinate the needs of different departments and open management bottlenecks and improve resource allocation, allocation of production between production lines or factories, testing strategies, performance dimension, and so on [17,18]. The analysis of the articles makes it possible to draw the following conclusions. Simulation modeling is an urgent problem in planning and optimizing an enterprise's LS. Most of the research is devoted to a detailed study of certain links of LS. Studies of the entire logistics system from the purchase of raw materials to the delivery of finished products to the final consumer have been insufficiently completed. The article aims to fill in part the existing research gap.
The aim of the study is to develop an economic and mathematical model of the LS of an enterprise producing two types of products; using this model to develop a methodology for optimizing the work of such an important link in the LS as retail trade in the production and sale of two types of products.
To achieve the goal, the following tasks were set: draw up a system of equations for the proposed scheme of the enterprise's LS; on the basis of the obtained system of equations, develop a mathematical program for optimizing various modes of the LS operation; to compare the economic efficiency for different operating modes of the enterprise.

Results
We will consider the work of an enterprise that produces two types of products. Let the logistics system of an enterprise be represented by the diagram shown in figure 1. Figure 1 shows that after the production link, each type of product is delivered to the end consumer via indepen-dent supply chains. In fact, wholesale warehouses for each type of product can be only certain areas, in some warehouse reserved for the first and second types of products. The same applies to retail chains. In part, these can be different outlets, to which either product 1 or product 2 is imported. It can also be supermarkets in which products 1 and 2 are sold in different (or even the same) departments. But in a mathematical description, it is convenient to represent these chains as independent. This presentation does not diminish the generality of the description.
In previous works [19][20][21] the production link was considered as an unstructured black box. Figure 1 represents the production process in two stages. Workshop 3 will carry out preliminary processing of raw materials and those operations that are common in the production of both types of products. Workshops 1 and 2 perform the final operations that are typical only for products of the first and second types, respectively. The presented scheme can also describe the joint work of a group of enterprises, some of them can be producers of products, while others can act as distributors of products.
Let us formulate a system of equations that describe the LS of the enterprise shown in figure 1. We use this notation. Each variable a j i contains two indices. The j line index numbers the types of products ( j = 1, 2); subscript i numbers time intervals (days) (i = 1, 730). We will consider a project with a planning horizon of two years.

A change in demand Q j i for products on the market
is an input effect for an enterprise whose task is to bring its output into line with demand.
where r j i is the rate of sales of the j product (pieces / unit of time) in the i-th; R j i -quantity j of goods in the retail trade network in the i-th period; V j i is the quantity j of the consumer's product (not yet consumed).
2. The quantity of goods in the retail network R j i is determined by the recurrent formula: where s j i is the rate of deliveries (units per period) from a wholesale warehouse in a retail network.
3. The value R j i must be in the range 0 ≤ R j i ≤ Rm j, where Rm j is the maximum possible quantity of the product in the retail system. The following formula for the rate of deliveries from the wholesale warehouse to the retail system corresponds to this requirement: where S j i is the stock of goods (quantity) in the j-th wholesale warehouse. 4. The rate of production y j i is determined by the following formula: where Y j i -the value of work in progress in the i-th period; tY j is a production parameter.
5. The value of work in progress is determined by the formula: 6. The value (quantity) of stock of goods in the wholesale warehouse S j i is calculated by the formula: where y j i is the rate of flow that enters the warehouse from production.
7. The amount of raw materials purchased daily is determined by the following formula: Formula (7) allows you to describe the process of changing the volume of daily purchases of raw materials. Such a change may be necessary as a result of the project implementation during the initial period of time [0; T q].
8. The stock of raw materials in the raw material warehouse is calculated by the formula: 9. The rate of supply of raw materials to the third workshop is calculated by the formula: 10. The amount of goods among consumers (not yet consumed): 11. Such a formula has been adopted to determine the daily net profit of the enterprise, expressed in the corresponding monetary units (MU): where p j is the unit price (MU per unit of production); c j -the share of the cost in the cost of production; z, ks -payment for storage of a unit of goods for one period in a retail network and in a wholesale warehouse, respectively (MU per unit of production); kp is the income tax rate; kad is the rate of value added tax; Pq -raw material unit cost (MU per unit of raw materials).
The system of equations (1) -(11) is a mathematical model of the logistic system of an enterprise that manufactures two types of products and operates in accordance with the scheme shown in figure 1. The system of equations (1) -(11) contains quantities of two types: variables with a subscript and constants. All calculations by model (1) -(11) will be performed with the following values of constants, which units of measure are described above Initial values: The initial values (13) correspond to the case when a new project starts, so to speak, from scratch. Although the model allows you to describe an ongoing project.

Case 1.
We are considering an enterprise operating in accordance with the diagram in figure 1. We consider the demand for products unchanged throughout the entire life cycle T of the project. We are considering a project lasting two years (T = 730 days). The final products of the enterprise are produced only by the first and second shops. Parts of the production of the first and second shops make up 30% and 70% in the total amount of the final product, respectively. This means that in equation (5), the values of the parameters should be chosen as a31 = 0,3, a32 = 0,7. Figure 2 shows the ratio of work-in-process parameters for this case.    Figure 3 illustrates the dynamics of production capacities of each of the three shops, calculated in accordance with the system of equations (1)- (11).
Calculations have established that y3 i = y1 i + y2 i , as it should be. Figure 4 shows that in the interval [0; 200] the rate of deliveries of the first product at retail s1 i exceeds the rate of sales of the first product r1 i and as a result the quantity of the first product in retail R1 i in this time interval increases from 0 to Rv1 i , as can be seen from figure 5.
Then, by the 200th period, the rate of retail supply s1 i becomes equal to the rate of sales of the first product r1 i as a result of which the quantity of the first product R1 i in retail stabilizes at the level Rv1 i (figure 5). Figure 4 shows that for all periods the rate of production y1 i exceeds the rate of retail deliveries s1 i and, as a consequence, the stock of goods in the wholesale warehouse S 1 i monotonically grows to a value of 51,3, which can be seen from figure 5. Figure 6 shows the dynamics of the main indicators for the second product. The analogy between the behavior of the main indicators, which is visible from the comparison of figure 5 and figure 6 allows us to conclude that the dynamics of the main rates of both types of goods is similar.
This does not mean that you can arbitrarily set the rate of production of goods of each type. The rate of sales is the factor that determines the work of all parts of the LS.    Figure 7, it can be seen that after reaching the maximum value in the 200th period, the daily profit begins to decrease monotonically. This decline means that the project life cycle will be limited in time.
The total profit over the lifetime of the project will be T i=1 M i =1712 (MU).

Case 2.
Above, we considered the case of constant demand for both types of products. Now let us consider the case when, in the 300th period, the demand for products of the first type decreases abruptly by 20%, and for products of the second type remains unchanged. Figure 8 shows the dynamics of the main rates for the first type of goods for this case. The sales rate r1 i and the retail supply rate s1 i decrease by 19,6% in the 300th period.
The main rates for the second product remain unchanged. Figure 9 shows the dynamics of the quantity of  goods in the wholesale warehouse S 1 i and in retail R1 i . The dynamics of the quantity of goods in retail R1 i has not changed ( figure 5). The dynamics of the quantity of goods in the wholesale warehouse S 1 i changes sharply after the 300th period. This abrupt change is explained in figure 8: there is a constant rate of deliveries y i to the wholesale warehouse, while the rate of removal of goods s1 i from the wholesale warehouse at the 300th period sharply decreases.
As seen from figure 10 the dynamics of the main indicators for the second product of goods remains unchanged (see figure 6). Figure 11 illustrates the dynamics of daily profit throughout the entire life cycle of the project for the case under consideration. Figure 11 shows that with the 300th period, the daily profit decreases sharply. This decrease is due to a decrease in the rate of sales at a constant rate of production.
In this case, the total profit over the lifetime of the project will be T i=1 M i = 723, 1 (MU). This value is significantly less than case 1.

Case 3.
Now consider the following situation. The demand for products of the first type decreases sharply as in the previous case, and for products of the second type remains unchanged. However, the company, foreseeing significant loss of profit, decides to increase the retail network for goods of the first type by 20% in the 300th period: Figure 12 shows the result of calculating the main rates for the first product according to the model (1) -(11) taking into account (14). Figure 12 it can be seen that at the 300th period the sales rate r1 i of the first product decreases sharply, but, unlike the previous case (see figure 8), after the 300th period it begins to gradually increase and at the 500th period it reaches the rate of deliveries in retail s1 i . Figure 13 shows the dynamics of the levels of stocks of goods in the sweat warehouse S 1 i and in the retail trade R1 i .
The balance of goods in the wholesale warehouse at the end of the project in this case is 67,6, which is significantly less than the balance in the previous case -128,5 (see figure 9). This decrease is due to the increase in sales rates and is a favorable factor for increasing the total net profit, which in this case is T i=1 M i = 1442 (MU), which is significantly more than case 2 (723,1 (MU)).
Comparison of economic results in the second and third cases shows the need to optimize drug parameters.
We will optimize the parameters of the retail trade, since it is the retail trade that directly affects the profit of the enterprise. We will assume that only the following retail transformation is available for both types of goods: where tR1 = tR2 = 300. Relations (15) and (16) mean that the company has the opportunity to choose the initial values of the retail capacity for each type of product and to perform the transformation of retail chains with a period of 300. Let us formulate an optimization problem for these conditions. Find the parameters Rm1, kR1, Rm2, kR2 at which the total net profit The system of equations (1) -(11) serves as constraints for function (17). The solution to the optimization problem (17) system calculated Mathcad: 6 1, 014 59, 43 1, 043 Figure 14 shows the dynamics of rates calculated for the optimal solution (18) for the goods of the first type. An analogy can be noted between figure 14 and figure 8. Figure 14. Dynamics of the main rates in LS for the optimal solution (18) The total amount of products produced during the lifetime of the project in both cases is the same But the number of products sold for the optimal solution is r1 i = 587, 5, which exceeds the number of products sold for the case corresponding to figure 8: r1 i = 536, 4. The fact that the amount of products sold is exactly in this ratio is directly visible from the comparison of figure 8 and figure 14.
Such a ratio of the quantities of produced and sold products leads to the fact that unsold products remain in the wholesale warehouse by the end of the project. Its number is S 1 730 = 128 for the case corresponding to figure 8 (see figure 9) and S 1 730 = 64 for the optimal solution (18), which is shown in figure 15. Comparing figure 10 and figure 16 it can be seen that in the first case, by the end of the project, unsold products of the second type remain in the wholesale warehouse in the amount of S 2 730 = 74, 7, while for the optimal solution (figure 16) this quantity is practically zero. Figure 17 shows the dynamics of daily net income. Calculation of net profit for the period under review gives the result T i=1 M i = 2852 (MU). This value is significantly higher than the previous ones, which justifies the need to develop mathematical models for the functioning of LS. Since the mathematical models containing the main parameters of the LS allow you to formulate and solve the optimization problem with a minimum cost of funds and time.
Comparison of figure 7 and figure 17 shows that for the optimal solution (figure 17), the decrease in daily profit over time is much slower, which means that it is possible to create longer-term projects using the optimal parameters of LS.

Case 4.
We considered above the case when the transformation of retail chains for both types of goods occurred simultaneously at a fixed point in time -at the 300th period (see formulas (15), (16)).  Figure 17. Dynamics of the daily profit of the enterprise for the optimal solution (18) Now, suppose that the company can choose the moments of transformation (tR1, tR2) of retail chains for each type of product independently.
The optimization problem in this case can be formulated as follows: find the parameters Rm1, kR1, tR1, Rm2, kR2, tR2 in formulas (15), (16) at which the total net profit reaches a maximum: The system of equations (1) -(11) serves as constraints for function (19). The solution to the optimization problem (19) system calculated Mathcad: Comparison of solutions (20) with (18) shows that the possibility of independent changes in retail chains for each type of product leads to an increase in economic efficiency by 14,6%.
For a more complete comparison of solutions (20) and (18), the dynamics of the main levels of the drug is presented in figure 18 and figure 19 (compare with figure 15  and figure 16, respectively). Figure 18. Dynamics of the main indicators in LS for the optimal solution (20) Figure 19. Dynamics of the main indicators for the optimal solution (20) Figures 18 and 19 show that with the optimal solution (20), the capacities of wholesale storage facilities can be very small. They may not even exceed the retail capacity for both types of goods.

Conclusions
1. The work considers a universal scheme of the enterprise's LS, which contains all the main production stages, starting from the procurement of raw materials and components and uploading the supply of finished products to the retail network. A feature of the author's approach is a mutually consistent description of the work of all links of the enterprise's LS, taking into account the demand for products throughout the entire planning horizon. The proposed LS scheme allows describing the diversification of production.
2. The system of mathematical equations for the proposed scheme of the enterprise logistics system is compiled. The system of equations is written in the form of finite differences. Time is considered as a discrete variable. Such a description is more consistent with the real situation at the enterprise, since management decisions at the enterprise are made at discrete moments in time. The system of equations contains the main characteristics of LS as well as the number of potential buyers, which makes it possible to take into account the market demand for products.
3. The proposed model was used to analyze four situations affecting retail chain management. The formulated optimization problems were solved numerically in the Mathcad system. It has been proven that managing a retail network in accordance with the optimal solution can give a significant economic effect.
4. The fact that the proposed system of mathematical equations contains such market parameters as the number of potential buyers and the number of goods in the hands of buyers allows us to include in the description the influence of an advertising campaign on the efficiency of selling goods. It also allows you to assess the impact of advertising on production diversification. These questions can be topics for further research.