1. Introduction
The paper and pulp industry has contributed to air and water pollution by utilizing resource-intensive processes, such as water, energy, and chemicals, which have had a substantial impact on the environment. Furthermore, the ecosystem is severely impacted by the deforestation this industry causes, which results in soil erosion, a decline in biodiversity, and an increase in greenhouse gas emissions. Decomposition of substantial waste can be protracted and can result in additional environmental damage. Another issue is that the paper industry is confronted with substantial operational challenges, such as fluctuations in demand that are influenced by environmental awareness, uncertainties in raw material availability, and regulatory and resource constraints [
1]. That is why an efficient prediction tool is required to obtain trustworthy forecasts regarding profits and costs as well energy production details, if required.
Computer simulation is currently a tool used in a wide range of optimization problems. It has developed in parallel with the progress of computers and software. Its principles have been presented many times in various scientific studies, taking into account the wide spectrum of analyses it offers together with the rapid development of information technology and computational capabilities [
2,
3,
4]. It was first used on a large scale during World War II to model the process of nuclear detonation [
4]. Many studies have also addressed the problem from an epistemological perspective [
5,
6,
7]. After 1990, computer simulation developed in a leap-like manner [
8,
9,
10] and now has wide applications in various fields. Its usefulness in solving different optimization problems has been demonstrated in numerous works, including those presenting its general capabilities [
11,
12]. The use of MATLAB Simulink and Simscape Multibody software for this purpose is a popular solution [
13]. Comparisons between computer simulation and different computational techniques are discussed in [
14]. Typical applications of computer simulation include, for example, the aerospace industry, where it is used, among others, to determine the aerodynamic characteristics of aircraft structures (airplanes, rockets) [
15]. Another application is the support of command and control processes in air defense [
16].
Computer simulation is also used in medicine, for instance in the treatment of various types of cancer, including for planning chemotherapy and radiotherapy [
17,
18,
19,
20]. Applications in economics can be found in studies [
21,
22,
23], which present so-called experimental economics. Another example is the economic optimization of zeolite production using the Monte Carlo simulation method [
24]. Furthermore, it is also possible to use computer simulations in the training of social work professionals [
25]. Optimization of complex production processes and issues related to production management are discussed in [
26,
27,
28]. The issue of CO
2 emissions optimization and related production considerations was discussed in the paper by Pawlak and Satarnus [
29]. This approach was also presented from the perspective of a decision-maker responsible for managing the production process [
30], as well as for determining the values of selected process parameters that ensure the achievement of a specific objective [
31]. The issue of production time optimization using computer simulation can be considered from various perspectives, but the most common criterion is profit maximization [
32,
33]. Issues related to production logistics (regarding time, but also other aspects) are also common criteria. A logistics criterion can be multifaceted, taking into account many factors simultaneously [
34]. The same applies to the issues of production planning and the selection of appropriate tools for it [
35].
Additionally, computer simulation can be effectively used for the optimization of a combined heat and power plant’s production schedule when fired with natural gas, with the aim of maximizing the total gross margin in the day-ahead horizon of CHP plant operation [
36,
37,
38]. The use of the Minimax rule in this context is presented in [
39]. Multidimensional optimization problems related to energy consumption have also been discussed in other works [
40,
41,
42], including studies that take energy storage into account [
43,
44]. Reviews of research in this area can be found in numerous scientific publications [
45,
46].
In connection with growing cybercrime and competition between states in cyberspace, many studies have been devoted to describing the life cycle of a cyberattack [
47,
48], including approaches using Markov chains to model this cycle [
49,
50]. Computer simulation is also used in the optimization of general storage processes, estimated on the basis of current or predicted data [
26,
43,
51].
The business activity of one of the largest paper mills in Poland consists, in addition to paper production, in generating heat and electricity for internal consumers within the mill itself, as well as for neighboring customers. The priority of the company is to supply the MP1 and MP2 paper machines, which require a sufficient amount of energy at all times.
In order to enable the sale of surplus generated energy on the power exchange, accurate forecasting of heat and electricity production is required. However, the system is unstable due, among other factors, to so-called “web breaks” of the produced paper reel, which hinder such forecasting by reducing the amount of heat and electricity available in the system. Minimizing interruptions in the operation of the paper machine improves the continuity of paper production and, as a consequence, positively affects the quality of forecasts of the amount of generated heat and electricity.
On the basis of historical data from the considered plant for the years 2015–2020, an optimization of paper production was carried out as a function of paper grade, basis weight, and the main operating parameters of the paper machine, i.e., wire speed V
s and reel speed V
n for individual years. In [
52], optimization based on numerical taxonomy was presented. The aim was to identify such ranges of V
s and V
n that the probability of paper production (P
1) would be maximized, while the probabilities of downtime (P
2), grade change (P
3) and web break (P
4) would be minimized. This was achieved by maximizing the distance of the normalized probability vector (after converting the stimulant P
1 into the destimulant Q, i.e., its reciprocal) from the pattern vector.
The primary objective of the research was to optimally select the operating parameters of the paper machine (Vs and Vn) in order to minimize the number of so-called “breaks” in the paper roll, which has a direct impact on the stability of the system and the accuracy of predictions regarding the amount of heat and electricity produced by the system. The optimization criteria were profit maximization and the corresponding optimal production time (for individual ranges of Vs and Vn). The optimal values of the Vs and Vn ranges were obtained by comparing the optimal production times (for all ranges studied). The studies were carried out for each year, a specific type of paper produced (including its thickness) and each of the two paper machines (MP1 and MP2).
2. Methodology
In the production plant under consideration, heat and electricity are generated in a gas–steam cogeneration (combined heat and power, CHP) system. The main advantage of cogeneration is that surplus heat is used for useful purposes instead of being released into the environment. This brings a number of benefits [
36], such as reduced emissions of harmful greenhouse gases, which in turn lowers the costs of purchasing emission allowances. Other advantages include increased efficiency of energy generation and reduced production costs.
The primary task of this CHP plant, located in western part of Poland is to ensure the continuous operation of the MP1 and MP2 paper machines installed in the mill which can work independently or in a shift mode. Surplus generated energy is directed to the plant’s own needs and to external consumers.
As the company plans to sell surplus energy on the market, there is a need to forecast the amount of heat and electricity generated by the system. However, the production process is influenced by random phenomena, the probability of which has become one of the key criteria in forecasting the declared amount of electricity generated at any given time.
The problem is the instability of the system caused by “breaks” of the produced paper reel, which force the paper machine to stop and vent steam. In order to keep the steam turbines running (or to reduce their power), the steam vented by the machine is redirected to specially designed blow-off lines, which reduces the amount of heat and electricity available for sale. As a result, prediction of the amount of heat and electricity generated by the system is significantly hindered. To improve system stability and the accuracy of forecasts, the number of web breaks and the resulting downtime of the paper machine must be minimized.
2.1. Computer Simulation
Computer simulation is a process of experimentation on a virtual mathematical model representing a real object or phenomenon [
2,
3,
4]. In such a process, three essential stages can be distinguished: preparation of the model (pre-processing), execution of calculations, and analysis of results (post-processing).
A computer program was developed specifically for this purpose to carry out the calculations. It was written in C++, and no specialist simulation libraries were used. The method used to perform the calculations is described in the following section.
2.2. Basis for the Calculation
The first stage of the calculations involves computing the cumulative distribution function of the probability distribution. To this end, the probability density function for time to web break was calculated based on the actual data available. The calculated density function represents the relationship between production time and the probability of a breakdown occurring. The first step in calculating the probability density function of breakdown time is to initialize the array in which the values of the discrete probability density function will be stored. The array consists of a specific number of elements, which must be specified. In this case, it has been assumed that this will be the maximum production time until a break occurs, denoted in the algorithm as MAX_PRODUCTION_TIME. Next, in a loop for each sample relating to the given paper and falling within the assumed speed ranges, a check is made to see if a break has occurred. The program records the number of minutes after which it occurred, and for that time (the corresponding position on the x-axis), the value on the y-axis is incremented by one. The function calculated in this way does not satisfy the properties of a probability density function, as its integral, calculated over the entire accepted space of elementary events, is not equal to 1. As indicated in the previous description, the assumed space is a discrete space and constitutes a set of integers in the range from zero to MAX_PRODUCTION_TIME.
The cumulative distribution function was calculated on the basis of the unscaled probability density function obtained in this way. According to the definition, the cumulative distribution function is given by Equation (1).
where f(x) is the probability density function.
In the discrete case, the value of the cumulative distribution function at a given point in the table is the sum of the values in the table describing the probability density function from its start to that point. Finally, the result obtained must be rescaled so that the property of the cumulative distribution function is satisfied, i.e.,
In the discrete case it is sufficient to divide each value in the array describing the distributive function by the last element of that array.
2.3. Simulation Algorithm
The simulation was carried out based on the distribution function described earlier. The simulation was conducted separately for each type of paper and for the selected range of speeds Vs and Vn. Within a loop, the profit obtained from the simulation was calculated for every possible, specified production time. To this end, the profit was first calculated for a production time of 0, then for production times of 1, 2, 3, 4, up to the assumed MAX_PRODUCTION_TIME. This yielded a graph showing the relationship (function) between profit and production time. Based on the obtained function, it is possible to determine the production time at which the greatest profit is achieved for the given parameters. This is the value at which the function reaches its maximum (extremum).
The basis for the simulation calculations is a random value for the time to failure. In many systems, a typical probability distribution is assumed, such as a uniform or normal distribution. To obtain a model closer to reality, a probability distribution derived directly from actual data was adopted. This approach was used in the program described. Therefore, pseudo-random values for the time to failure were obtained in accordance with the probability distribution calculated in
Section 2.2 using the method of inverting the cumulative distribution function. These values were obtained by first generating a pseudo-random value y in the range from 0 to 1, in accordance with the uniform probability distribution. Next, based on the obtained cumulative distribution function, the value x was determined for which the cumulative distribution function takes the value y. In this way, pseudo-random values of the TIME_TO_SPURT (time to web break) variable were obtained, consistent with the probability distribution resulting from the previously obtained cumulative distribution function.
The simulation ran in two loops: an outer loop and an inner loop. The detailed algorithm is shown in
Figure 1. In the outer loop, the production time was iterated; that is, the variable PRODUCTION_TIME took values ranging from 1 to MAX_PRODUCTION_TIME. The inner loop is used to repeatedly count the number of bursts resulting from the value of the PRODUCTION_TIME variable adopted in the outer loop. The inner loop is executed as many times as the value of NUMBER_OF_SIMULATION_ATTEMPTS. The number of bursts is calculated by generating a random value for TIME_TO_SPURT until the sum of these times is greater than or equal to the PRODUCTION_TIME variable. When this occurs, the number of spurts is directly determined by how many times the function generating the random value TIME_TO_SPURT had to be called. The number of bursts is stored in the variable NUMBER_OF_SPURTS. Once the number of breaks has been calculated for a given production time, based on the previously calculated distribution function, the profit obtained for the given parameters and random values is calculated. For the simulation calculations, Equation (3) was used:
where z—production profit; x
p—production time; k
mp—profit from one minute of production; l
zr—number of web breaks; s
p—cost of downtime caused by a web break.
The formula above assumes that profit is directly proportional to production time multiplied by the benefit derived from each minute of production, and decreases in proportion to the square of the number of production stoppages multiplied by the cost of downtime. This formula was derived based on expert knowledge obtained from those responsible for production planning at the company under study.
A schematic diagram of the algorithm is shown in
Figure 1.
3. Experiment
The study was based on historical data from the plant under investigation for the years 2015–2020. For each paper basis weight, the maximum ranges of variation in V
s and V
n were determined, and then each of these ranges was divided into six equal parts (subranges). For example, for paper grade A-80 in 2020 it was assumed that the considered ranges of wire speed V
s and reel speed V
n could only be those subranges for which specified types of events occurred. The considered ranges are shown in
Table 1 (shaded part).
3.1. Empirical Distribution Function
The sample space of elementary events is the set of possible production times until a web break occurs; these are integer values from zero to xmax, where xmax is the maximum production time until a web break.
In the implemented program, the empirical distribution function was determined in a loop for each sample corresponding to a given paper grade (for fixed ranges of speeds Vs and Vn), checking whether a web break occurred. The program recorded after how many minutes it occurred, and for that time, i.e., the corresponding value on the OX axis, the value on the OY axis was increased by 1. For each sample, time (in minutes) was counted from zero until the occurrence of a web break.
As a result, a function g(x) was obtained, representing the number of web breaks as a function of production time, and then a function G(X) was constructed as the cumulative number of web breaks as a function of production time:
Furthermore, the following value was calculated:
Next, a function f(x) was determined, representing the frequency of web breaks as a function of production time:
Finally, the desired empirical distribution function was obtained:
3.2. Simulation
The simulation was carried out on the basis of the empirical distribution function described in
Section 3.1 (separately for each paper grade and basis weight, for the given ranges of speeds V
s and V
n). The basis of the simulation calculations is the pseudorandom value x
zr of the time to a web break, generated in accordance with the probability distribution presented in
Section 3.1.
In the computer simulation-based study, the number of simulation trials was set to 1500. The large number of trials makes it possible to achieve high accuracy while not leading to excessively long computation times.
First, a pseudorandom value y was generated in the range from 0 to 1, according to the uniform probability distribution. Then, using the empirical distribution function, a value, x, was determined such that the distribution function takes the value y, i.e.,
In this way, pseudorandom values of the variable xzr were obtained.
The simulation was executed in two loops: an outer loop and an inner loop. In the outer loop, the production time xp, was iterated, i.e., the variable xp took successive integer values from 1 to xsmax, where xsmax is the maximum production time in the simulation. In the developed program, the parameter xsmax is set in the “parameters” option.
The inner loop serves to repeatedly count the number of web breaks for each value of the production time parameter xp set in the outer loop. The inner loop is executed as many times as the number of simulation trials (a value also set in the “parameters” option of the developed program) for determining the number of web breaks. First, a pseudorandom value xzr (time to a web break) is generated on the basis of the empirical distribution function, and this is repeated until the sum of these times exceeds the value xp (production time) specified in the outer loop. When this happens, the number of web breaks is equal to the number of calls to the function generating the pseudorandom value xz.
Specifically, if
then the number of web breaks is
On the other hand, if
then
According to Formula (3), profit is the product of the production time (set in the outer loop) and the profit per minute of production, reduced by the product of the square of the number of web breaks and the cost of downtime. Thus, for each value of the variable xp set in the outer loop, the profit resulting from the performed simulations is obtained. As a result, a functional relationship between profit and production time is obtained.
An example plot of this relationship is shown in
Figure 3, presenting the obtained optimal production time equal to 1346 min with profit equal to 2181.93 PLN for paper A-70.
On the basis of this relationship, it is possible to determine the optimal production time at which the maximum profit is obtained (for the adopted parameters).
As a result of the optimization procedure described above, for a given paper grade and basis weight in a given year, and for the considered ranges of Vs and Vn, the optimal production time corresponding to the maximum profit was determined.
All calculations used to determine the empirical distribution function, as well as to perform the simulation runs (for the selected paper within specific ranges of speeds Vs and Vn) based on the chosen parameters, were implemented in a dedicated computer program developed for this purpose.
5. Conclusions
The paper presented a method for modifying process parameters using computer simulation, illustrated by the example of a paper production process. The approach is based on the empirical distribution of production interruption times combined with selected process parameters. On this basis, it is possible to determine improved ranges of operating parameters while taking into account the partly random nature of production disturbances. The computer simulation method used served, amongst other things, to select ranges for these parameters in such a way as to minimize the number of production stoppages for a specific type of paper, and thus to determine the optimal production time (without stoppages). The high degree of consistency between these results and those obtained using numerical taxonomy methods indicates that the ranges obtained are reliable for a given type of paper, taking into account the applicable speed ranges Vs and Vn, which in turn enables the calculation of the profit derived from the quantities of heat and electricity produced by the paper mill. Surplus energy production can be sold on the energy exchange, where systematic forecasting of the declared amount of energy produced is required 24 h in advance.
An important aspect of the study is the relationship between the stability of the production process and the operation of the combined heat and power (CHP) system supplying heat and electricity to the plant. Reducing the number of uncontrolled production interruptions improves the stability of the energy system and makes it easier to forecast the amount of surplus energy that may be sold on the energy market.
Although the analysis was carried out for a specific paper production plant, the proposed methodology may be applied to a broader range of industrial installations. This applies in particular to enterprises characterized by high energy consumption or equipped with their own energy generation sources. In such systems, the stability of the technological process may influence energy purchasing and selling strategies and thus affect the economic performance of the enterprise. Apart from improving the prediction of the energy balance, higher process stability may also contribute to better efficiency and a longer lifetime of energy generation equipment. For this reason, the presented approach may be considered as an example of a method that can be used in various sectors of energy-intensive industry.
The experimental results presented in this paper form part of a planned series of studies comparing various possible approaches. Future research plans to further develop the proposed methodology, including the incorporation of evolutionary algorithms, which could yield even better prediction results. This will enable even more effective energy management within the company, including its active participation in the energy exchange.