A Simulation Model of Power Demand Management by Manufacturing Enterprises under the Conditions of Energy Sector Transformation

: This paper addresses electricity consumption management in manufacturing enterprises. The research aims to provide manufacturing enterprises with an effective tool to control electricity costs. Recently, some factors have been observed to affect the rapid changes in the operating conditions of enterprises. These include the transformation of the power sector toward renewable energy, the disruption of supply chains resulting from a coronavirus pandemic, political crises, and process automation. A method for the analysis and management of electricity consumption in enterprises based on simulation modeling is proposed. The simulation model contains predeﬁned objects representing physical system elements and the data processing algorithm. The production order execution time, energy consumption, employee overtime, and machine load are included in the model. The results show that it is possible to determine the level of power available for the process completion and its inﬂuence on the production volume and realization time. In the studied case, when the available power was reduced by half, there was an increase in order execution time of nearly 25 percent and an increase in energy consumption of nearly 15 percent. The method can be used in the operational activities of enterprises as well as extended to different types of production processes.


General Factors Influencing Energy Price Increases
The primary resource necessary for the operation of practically any economy is electricity. Electricity is supplied from generation units via transmission and distribution grids to the customers. The generating sources are primarily large system power plants. Renewable sources have still not become dominant, despite significant political pressure in recent decades and massive subsidies to support their installation and operation.
The significant increase in the number of small distributed sources has also not changed the structure of the power systems. The amount of renewable energy supplied to consumers has increased, but so have the problems of grid operators responsible for the security of supply and balancing the power system resources. So far, the main visible effect of the transformation of the electricity sector has been an increase in electricity prices for consumers. The electricity costs are distributed differently among various customer groups depending on political and regulatory decisions in individual countries.
In the past few years, additional factors driving up the operating costs of manufacturing companies have been the coronavirus pandemic and local and global political crises. The coronavirus pandemic led to the disruption of supply chains for materials, components,

Determinants of Energy Consumption Management in Enterprises
With the development of automation and robotics, electricity is becoming a key resource for the execution of the production process, and its lack has already led and will lead in the future to the interruption/suspension of ongoing processes. Energy as a resource is used in the entire production area, starting from ensuring the operation of machinery, through running transport and storage systems, to ensuring proper working environmental conditions. This includes artificial lighting, maintaining a constant temperature, ventilation, etc. [2].
There are three basic levels of research identified in the literature, depending on the details of the analysis. The first level consists of a single workstation, usually a machine. The second is a production cell, a controlled cluster of interconnected machines. The third is the production system, a cluster of many production cells and areas that allow for handling activities within the entire enterprise. For example, it may include material and product storage areas and social areas. At each of these levels, a specific set of resources must be identified and the extent of electricity consumption must be determined [3,4].
For selected resources, consumption over time can be constant or variable. This factor is an important criterion when deciding on the running of technological operations as well as their financial implications for the company. The possibility of variable power consumption is more flexible for the entire process and allows for the operations to be adjusted to the company's capabilities. Constant power consumption in time usually means that power is drawn when the resource is working. This situation, however, requires a decision as to when the resource should be switched on, whether it is possible to ensure its continuous operation, and what this means for the company.
Another important aspect is the use of different technologies in the implementation of production processes that have different characteristics. For example, this may be related to the necessity of performing certain activities in a certain sequence or procedure. It can also be related to the maintenance of certain parameters of machine operation (temperature, humidity, pollution level, noise level). It turns out that even in the case of variable power consumption by a given resource, the company may not have such high flexibility. Due to the nature of the operation/technology used, the resource will be forced to maintain its operating parameters, consuming an adequate amount of power, incommensurately greater than the operation performed. For example, ensuring a high temperature of the furnace or dryer during operation usually means a high power consumption throughout the entire period of operation of the machine, not only during the processing of the material/product, but also while waiting for the delivery of material to operate.

Objectives and the Paper Content
The main subject of this research was the impact of the occurrence of power limitation on the production system. The production system is a deliberately designed and organized system, within which the available resources are used to produce specific products that meet the consumer needs [5]. This system is based on the execution of the production process, using four key resources. The resources include material resources, human resources, information resources, and capital resources. In the last few years, more and more attention has been paid to including the energy component in the definition of the production system. This component is one of the inputs to the manufacturing process. Electricity makes it possible to perform technological operations on machines as well as to ensure the functioning of the entire production environment.
It is likely that soon, both the increase in electricity prices and the reduction in the availability of electricity may constitute one of the main challenges for manufacturing companies. In this context, this paper aims to propose a method that would enable manufacturing companies to analyze electricity consumption in rapidly changing production conditions. In particular, the method should answer the question of how the constrained availability of power or large differences in electricity prices between different times can be compensated by changing the production plan. A change in the production plan is understood as an extension of the execution time for a given production batch, moving the execution to another time, or determining which part of the production batch will not be completed on the previously planned date. This type of approach has not been considered in the literature thus far. The main conclusion of this paper is that with the help of available simulation modeling programs, it is possible to analyze electricity consumption in production processes and draw practical benefits for the company. An additional conclusion is the possibility of developing and applying the proposed method to various production processes, which requires further research.

Literature Review
The literature review is divided into several key topics concerning the addressed problem. These topics include power sector and market characteristics, energy management and energy consumption in manufacturing companies, energy management system, and simulation modeling in energy management. The literature studied on each topic can be seen in Table 1, and only the most relevant literature is cited in the text. Table 1. Literature review structure and resources.

Power Sector and Market Characteristics
The transformation of the power sector in some countries is mainly concerned with increasing the share of renewable energy in total energy consumption, which is mostly taking place in European Union countries. This transformation of the sector is driven by EU policy objectives and affects both the power sector and the functioning of the energy market. The directions and pace of changes vary between the EU countries. The biggest challenges are faced by countries where the share of energy produced from coal is the highest. Such countries include Poland and the Czech Republic, which have different amounts of energy production from coal and declare different energy policies.
Poland declares its support for mining and the use of coal, especially because changing the fuel mix would require huge expenditure. The reason would not only be the need for new technologies, but also the necessity to cope with the general transformation of the economy and its social effects. At the same time, energy security must be ensured. The entire transformation should therefore be based primarily on the modernization of existing coal-fired power plants (where cost-effective), resulting in greater efficiency and cost savings. Moreover, the use of renewable energy sources is expected to increase, although this type of energy is not significantly used in Poland [6]. Achieving the coal reduction target will be a challenge, though studies undertaken suggest that it should be achievable [7]. However, Poland's final energy mix will depend heavily on the impact of various environmental policy factors on the energy industry [8].
The Czech Republic is currently an exporter of electricity and is reported to be the seventh-largest exporter of electricity in the last decade. However, unlike Poland, the energy policy update enforces a clearer shift away from coal, also taking into account the potential social and economic impacts [9]. In terms of electricity production, an important role in the replacement of coal will be played, especially by the greater use of RES and nuclear energy. In the field of heating, this will be the use of natural gas [10,11].
However, the plans to move away from coal are probably too ambitious. Replacing coal with nuclear power has become increasingly problematic in recent years. Decisions on the construction of new units are being delayed or cancelled, and the global construction of nuclear power plants is running behind schedule. The commissioning of some new units is planned just before the official end of life of the current units [12].
There is also a relatively high level of opposition to the construction of reservoirs with hydroelectric power plants (primarily for water supply) and wind power plants. Similarly, the landscape conditions are not entirely ideal for these sources to be used to a greater extent in the Czech Republic, especially for hydropower plants [13]. The greater development of RES is undoubtedly hindered by the reduction in state aid [14] and contradictory public opinion regarding these resources [15].
The whole energy situation in both countries is extremely problematic and there is potential talk of instability of the electricity grid in the whole region [9]. In principle, it is possible to expect a scenario in which the slow reduction in coal use leads to an increase in energy prices (due to the purchase of emission allowances, the maintenance of a strategic reserve, or the import of coal) or a scenario in which there is a shortage of resources for electricity and heat production. The transformation of energy production must therefore go hand in hand with the transformation of the electricity market. Given that there is a certain similarity between the Czech and Polish energy markets [16], it can be assumed that the development and transformation in both markets could follow a similar pattern.
The key is the creation of a dual-energy market, where, in addition to buying and selling the physical electricity consumed, the readiness to supply energy is also purchased to ensure energy security. This is because it is necessary to hold a strategic reserve in conventional sources in the case of outages or the instability of electricity supply from RES (problems in the case of no wind or cloudy skies). However, this solution does not correspond to the idea of green electricity, is economically expensive, and is also not potentially feasible where there are not enough energy sources available (e.g., because they have been decommissioned due to high emissions). In this context, the responsibility for the stability of supply is beginning to shift much more from the manufacturers and distributors to the customers themselves. An important role should be played here by the DSR (demand-side response) service to reduce energy consumption on the customer's side, without which ambitious energy goals will not be achieved [17].

Energy Management in Manufacturing Companies
Within DSR, unlike other tools, the customer takes care of power management, as it is necessary to know the current consumption and the possibilities of reducing it for quality DSR operation (see Energy management below). It will no longer only be necessary to adjust production according to the current consumption, but thanks to the financial reward for "non-consumption" (or, conversely, "over-consumption"), it will be possible to influence the behavior of the consumers themselves. Thus, demand will be managed using a pricing policy, and, paradoxically, there may be situations where consumers consume more, but at a lower cost [18]. Moreover, as it turns out, DSR and management through a clear pricing policy alone can have a much greater impact on RES uptake than other factors such as the customers' environmental sentiment [19]. This fact, on the other hand, is not so surprising, because in general, the reasons for increasing energy efficiency, which is closely linked to consumption, are mainly organizational (e.g., education, know-how), managerial (e.g., competence), or economic (e.g., cost reduction) [20]. One of the ways to deal with grid instability could also be so-called energy clusters or hubs, which would have more predictable energy consumption patterns and thus enable a more efficient use of RES [6,21].
However, ensuring energy-efficient production and implementing DSR in the manufacturing sector is significantly more complicated than, for example, in the residential and service sectors [21,22], given the difficulty of matching energy optimization with production requirements [23,24]. A large number of factors are involved in the whole process (see below). Energy management should help companies cope with these requirements [25][26][27]. Scientific articles have mentioned several important areas to focus on in this context.
First and foremost is the importance of setting up a framework-a systematic approach using ISO 50001 and ANSI MSE 2000 (United States) [25,28,29]. Or also other standards (e.g., EN 16231) [26,30,31]. Next is respecting all key steps of the energy management process. This includes, for example, the setting of KPIs, which is important, among other things, in terms of the actual optimization of energy consumption and the measurability of the effect [26,27,32]. Furthermore, the mapping and analysis of the whole system, focusing on energy management (not only electricity, but also gas, water, and raw materials), on load curves and the possibilities of influencing them to shift the load from the peaks to the valleys as well as on the characteristics of the production program (batch sizes, production processes). This step should be implemented from the whole production plant down to the machine components. Various tools such as energy audits, value stream mapping, Sankey diagrams, etc., can be used for this purpose [26,29,33].
Without process analysis or knowledge of KPIs, it is not possible to address energy optimization, which includes activities such as process modification, modeling, planning, scheduling, forecasting, etc., to ensure energy-efficient production [26,27]. Energy optimization focuses on several key areas such as [21]: • Production technology and its actual selection in terms of the design and operating characteristics of machines and their components, tools, and other equipment including their maintenance [26,31,34].

•
The material and design of the products. Furthermore, the manufacturing process itself, for example, in terms of pressing using sequential tooling on several presses [26,34].

•
The organization, planning, and scheduling of production [26]. Important in this context is the focus on the selection of specific machines (e.g., regarding their energy efficiency, reliability, or utilization to limit machine downtime, regarding batch sizes, etc.) [35][36][37]. • Educating workers on machine operation and maintenance, operating modes, etc. [24,26,32].

•
Operation of supporting technologies and equipment in terms of heating and cooling of buildings, water heating, etc.
Finally, it is of course necessary to simultaneously respect the energy (e.g., energy availability, regulations, prices), operational (e.g., current operation of some machines), safety, and other constraints (e.g., quality) [24,34]. In some cases, these can often be subtle limitations (e.g., switching off machines can compromise their thermal stability) [38].
As some of the factors may be variable [30] such as the electricity consumption of the technologies depending on the type of product or the electricity available from the grid, the optimization needs to focus on different scenarios taking these factors into account [38].
Moreover, it should be noted that only part of the electricity supplied to the enterprise is used for the realization of production processes [1]. Part of the energy is transferred to powering other devices (not directly related to technological operations) or the realization of auxiliary processes. According to the concept of lean manufacturing, these activities are called non-value-added but necessary operations. Their execution supports the realization of the basic process (i.e., it is necessary/required), but they do not translate directly into manufacturing a product for the customer. Especially in the engineering sector, the state of "processing" reaches a high percent share in energy consumption, however, depending on the technologies used in the industry, this share may not be significant/dominant [39,40].

Energy Consumption in Manufacturing Companies
The study of energy consumption in manufacturing companies focuses on identifying and analyzing the elements that contribute to power consumption. Each element is characterized by a different energy consumption profile. In a manufacturing company, the number of elements to be surveyed is significantly high, therefore, depending on the purpose of the survey, it is necessary to divide the company into smaller elements, for which the survey is simpler.
It is possible to study individual elements, with their impact on the examined area, and then add/sum up other elements, thus extending the scope of the research, the examined energy consumption. In the literature, these ranges are called levels of energy testing. The most common is the division into three to six levels. Research in this range has been conducted, for example, by [3,4,41].
Based on these, four levels of energy consumption testing have been identified: • Machine level-A single machine or tool is tested, which is used to perform production operations.

•
Multi-machine level-Logical organization of devices in the system in the form of a production cell (production line, socket); the devices perform the assigned operations in series or parallel. • Factory level-a separate system of interconnected devices is examined.
• Multi-factory level-differentiated manufacturing companies that are in a relationship with each other due to the joint performance of activities, generating synergy effects are subject to examination.
Determining the energy consumption levels is easiest to study for the lowest level (machine level), and at subsequent levels, add energy consumption profiles for additional resources included in the analysis. For example, examining energy consumption at the multi-machine level would consist of overlaying the energy consumption profiles of each machine and adding up the results for each moment/period of analysis [42][43][44]. Testing the energy consumption of a single machine is a complex task [45][46][47] and requires the definition of a consumption profile for each machine. The consumption profile is closely linked to the various states that the machine can be in (process operation state, standby state, etc.). In each of these states, the power consumption of the machine is different and the total energy consumption depends on the duration of each state. Research on the identification of possible states to be reached by machines has been the subject of many publications, for example, [41,45,48], especially in the engineering industry. Based on the research presented, nine states were identified: Power off, Shut down, Warm-up, Power on, Start-up, Stand by, Production, Maintenance, Failure. The publications by [1,48,49] identified the status/characteristics of the values taken in each state by defining them as constant or stochastic (or variable). This aspect is important for the detailed analysis of power consumption at a given time and the study of parameters, conditioning the power consumption.

Energy Management Systems
Another important issue in the context of this research is the systems supporting the management of energy consumption by enterprises. An energy management system is an interconnected set of elements, devices, and tools (hardware and software) used for monitoring, predicting, controlling, and optimizing energy consumption. Such systems have so far been mainly used by large enterprises, but with the development of modern technologies, digital twins, and the concept of Industry 4.0, they will become and are becoming much more accessible to smaller companies [50][51][52].
The whole system consists of several layers, the number of which varies according to the detail of the view of the issue. The first layer consists of the end devices (machines, equipment, but also energy sources), where the energy consumption data are collected [53,54]. The second layer is the communication and integration layer and is used to send data from devices in the first layer and to transmit commands from higher layers in the direction of the end devices [53,54]. The third layer consists of a server with a database and possibly other tools (machine learning, prediction engine, etc.) or a cloud environment [51,53,55]. The fourth layer is then functional (information and control), and consists of either specialized energy management software (Siemens Simatic, Wattics, EnergyCAP, ProntoForms) or other less sophisticated tools for prediction and data visualization such as Python and Microsoft Power BI [51,53,55]. Within the previous two layers, they can be integrated with other enterprise systems designed for production management such as the ERP, MES, APS, or simulation tools [55,56]. The fifth layer is the control logic itself in the form of objectives, strategies, and rules to ensure energy-efficient operation, respectively, the optimization of energy consumption, respecting production requirements and various other constraints [56][57][58].
• Visualization and analysis of historical data related to KPIs, different types of energy data, but also weather and environmental conditions, production, seasonal effects, costs, and energy prices.

•
Monitoring of current energy consumption and other energy data including various automatic alerts. • Prediction and forecasting of energy demand or energy prices.
• Regular reporting focusing on KPIs and other data. • Control of energy consumption, production, and possibly energy storage. • Integration with production planning and scheduling tools to optimize consumption.
However, to effectively manage energy consumption, respectively, ensure energyefficient operation of production using energy management software, it is necessary to understand the optimal rules and strategies for the management itself, taking into account different conditions (available energy, energy prices, etc.). Despite the relatively broad functionality, energy management systems do not allow for the testing of various scenarios of future events related to energy limitations and the selection of the solution best suited to the needs of enterprises. Simulation modeling offers such possibilities.

Simulation Modeling in Energy Management
Simulation modeling is a suitable tool to design and verify various rules and strategies for power and energy management, to find the optimal production setup in terms of energy consumption, and also for the analysis of energy consumption itself. Its use is quite widespread:
In these sectors, simulation models are created for both systems consisting of a single machine or a multistage machine [66,76] and for entire production plants [69,77,78], sometimes including, for example, the operation of buildings or other supporting technologies [26,66,68,79].
The main motive for using simulation modeling is almost always to analyze energy consumption and reduce costs or energy intensity to resource depletion or global warming. To reduce consumption, the following approaches can be identified primarily, namely, optimization of machine control functions, optimization of parameters in production, and the design of energy-efficient production at the beginning of its design. However, individual approaches and models are quite specific and focused on addressing a particular problem and need [26,70,77]. In this context, their wider use is thus rather limited and a comprehensive view is usually missing-the greater integration and interaction of various factors and parameters such as production equipment operation, process parameters, building operation, price tariffs, etc. For example, if parameters such as operation and management of individual machines, production batches, efficiency, and number of operating machines, failure rates, building operation, etc. are integrated into the model in great detail, parameters such as price tariffs or constraints on the energy supply side are no longer integrated into the model [68,69,78]. On the other hand, if parameters such as price tariffs or supply-side constraints are already integrated, other parameters are not integrated to a sufficient extent or in sufficient detail [71,72,75]. Another situation is that models only integrate certain types of energy such as electricity, for example, [69,72,73].
One reason why other different factors and parameters are not integrated into the models may be that simulation tools still provide their users with limited options in some respects, despite some progress in recent years [80]. However, the key point remains that simulation modeling allows companies to analyze and optimize consumption [26,69,70] as well as validate different energy optimization strategies [2,81]. Moreover, without having, for example, APS software, which they often cannot even buy for financial reasons, it is also important that, unlike APS software, simulation modeling allows for the inclusion of uncertainty in the model (e.g., in the form of machine failure rates or production quality) [68,70,77]. Another benefit is that simulation modeling enables "what if" analyses [78,82].

Materials and Methods
A comprehensive study of the energy consumption of a production system was based on the identification of all elements of the system that consume electricity. The exclusion of any element will result in an incomplete view of the analysis and subsequently in inappropriate decisions being made by the enterprise. The literature review shows that depending on the purpose of the study and the analysis capabilities, the approaches will vary. In this paper, a multi-stage research method is presented to show how to study energy consumption in an enterprise using simulation modeling. The research method is shown in Figure 1. The subsequent stages of the method are described below. Stage 1. Defining the subject of energy consumption research. The purpose of the analysis to be performed will influence the scope of the work undertaken. From the literature survey conducted, there are several approaches to studying energy consumption, related to either a tight or wide scope of the study. In the tight scope, the analysis deals with energy consumption on a single machine, where the study will focus on that single facility and the instrumentation/equipment used on that machine. In the case when the analysis concerns the entire production cell (production line, production slot), tests will be conducted for each machine (including equipment) and the transport operations related to the flow of material between objects (machines, buffers between stations, place of collection of materials/parts or storage of finished products). Transport operations include belt feeders, forklifts, etc.
A comprehensive approach assumes the identification of the impact of the environment in which the studied production system operates. Therefore, the analysis of the entire production system should not only take into account the individual energy consumption of individual production cells (located in a given area), the service system (transport, picking materials, parts, semi-finished or finished goods), but also the environment of the given production system (lighting, air conditioning, social facilities, computers for processing production orders). In selected studies, further levels of analysis appeared concerning energy consumption within interconnected production systems or the entire supply chain. Due to the research topic undertaken in this paper, the authors decided to include the first three levels indicated in the research method.
The specific scope of the research carried out influences the subsequent activities performed within the method-limiting or extending the scope of these activities.
Stage 2. Identification of enterprise resources in terms of power and electricity consumption. The subject specified in stage 1 sets the level at which the electricity consumption analysis will be performed. Based on this, it is clear how detailed the enterprise resources should be analyzed. The classification of enterprise resources includes physical resources, information resources, human resources, and financial resources. In the framework of each group, it is necessary to identify all objects used in the implementation of the production process that are associated with energy consumption. The largest number of objects can be found in the material resources, where the following are distinguished: machines, tools, possible means of transport, or equipment of the entire production system. In other resources, the range of identified objects will be tighter and will be more limited to the level of analysis performed (machine level, production cell level, or production system level).
As part of information resources, the knowledge that employees have should be identified. Knowledge itself is not associated with energy consumption, but the way it is collected, processed, and the process of exchanging knowledge among employees (for example, through computers, tablets, and cell phones) is.
Within human resources, employees who perform tasks in the production area under study should be identified. Similar to information resources, workers affect energy consumption by performing activities related to/involving machine operation, connecting/disconnecting tooling, or operating logistics equipment. Therefore, the identified activities must be classified appropriately to the levels of analysis performed. For example, devices used to collect and process data on the process flow or readers recording working time should be analyzed only at the level of examining a production cell or the whole production system.
The final resource is financial resources. Similar to the previously described information and human resources, the nature of financial resources does not involve/directly cause energy consumption. However, the activities related to recording or managing these resources using electronic equipment (computers, tablets) are associated with energy consumption. The identification of each resource at the listed levels of energy use analysis is shown in Table 2.  Stage 3. Modeling individual detailed resources of an enterprise due to electricity consumption. It is necessary to identify the power and energy consumption profile of the enterprise, having determined the enterprise resources to be studied. For this purpose, for each identified resource, the parameters characterizing the consumption profile are determined. The range of parameters studied is complex and should take into account the standard nature of the work of a given resource. Additionally, it should include changes of this nature depending on the changing factors of the surrounding environment. Therefore, these parameters can be divided into internal factors (related to the operation of the machine-the operating states of the analyzed object) and external factors. If there are several resources with similar parameters working at the same time, the resources can be aggregated and studied as a whole. A summary of the key factors is presented in Table 3. Table 3. Parameters characterizing the power and energy consumption profile.

List of Factors Impact
Internal factors

Power Off
The machine does not consume power or consumes very little power.

Warm-Up/Fast-Warm Up
The machine consumes additional power to set the operating parameters at the right level. In the case of the "Fast Warm-Up" option, the power consumption is even higher.

Idle
The machine consumes a nominal power assigned to the standby mode in readiness for the next technological operation (maintaining the set machine parameters).

Processing
The machine consumes a nominal power in the course of a technological operation.

Stand by
The machine consumes a nominal power assigned to the machine's ready state to enter "Idle" mode.

Failure
The machine consumes reduced power if the disturbance prevents or restricts operation. The machine may consume an increased power where the disturbance degrades the performance of the machine.

Maintenance
The machine consumes varying power depending on the maintenance and repair work performed.

External factors
Time of the day In the production area, there is an increased energy consumption in the afternoon and at night due to the need to switch on artificial lights.

Season
In the production area, there is increased energy consumption in winter due to the need for heating. In summer, on the other hand, increased energy consumption can result from the need to switch on air conditioning.

Thermal losses of associated machines
In a production area, the increased/reduced energy consumption must be considered to the influence of other machines in the area. For example, a machine that generates a lot of heat during operation may require additional cooling equipment. This would be particularly advisable in summer when the temperature in the production hall can also be high. Similarly in the winter period (lower temperatures), the cooling equipment may be used less often due to the lower temperature on the production floor.
Stage 4. Building a simulation model of a manufacturing system. Based on the specified level of analysis of energy consumption (machine, production cell, or production system), the objects that should be placed in the simulation model should be identified. The list of objects should be as presented in Table 1. For each level, the resources enabling the realization of the production process have been defined, divided into the material, personnel, financial, and information resources. Within the framework of the simulation model being built, it is possible to represent material and personnel resources using objects occurring in the selected computer modeling program. In the next step, it is necessary to identify the connections occurring between these objects. For each identified object, it is necessary to determine the set of parameters, characterizing the data on the course of the production process (duration of a technological operation, setup time, the size of the production batch) and data on energy consumption (normative for different states of the machine). The simulation model should be validated to confirm the correctness of the representation of the tested real system. The developed simulation model makes it possible to carry out several analyses of a given production area without the need to interfere in the real process. Particularly in the case of the analysis of power consumption by the equipment, carrying out tests on the real system would be difficult due to the necessity of stopping the production of objects in progress, the possibility of failure to the objects consuming energy from the system, or the entire power system in the company. An additional advantage of using computer simulation is the possibility of conducting tests in a short time considering many different variants of solutions through one built model-changing only the values of selected variables. The more data are entered into the model, the more analyses (with a wider scope) will be possible to conduct.
Stage 5. Verification of changes in electricity consumption with the simulation model. Power limitation addressing. In a general case, the subject of research can be the analysis of the impact of the power limitation (by a set value) on the analyzed production system. The power limitation may be of soft or hard character (constraint). The soft constraint may result from high electricity prices in a certain part of the planning period (e.g., during selected hours of the work shift). Exceeding this constraint is possible and affects the high cost of implementing the production process. Maintaining this constraint makes it necessary to shift production to other hours (e.g., night hours), when the energy price is acceptable. The hard case of the capacity constraint may be caused by the limitation of supply by the power system. This constraint cannot be exceeded. Any non-executed production must be postponed to another period. In any case, at the start of the operation, the production system has a certain level of available capacity. Then, during the execution of the process, the available power is reduced in the specified time. It is necessary to identify objects on which it is possible to change the state of power consumption. This should be conducted in the period with the introduced constraint, according to Table 2.
The reduction in power consumption can be realized in many ways, depending on the possibilities and needs of the implemented production process. A general (optimal or sub-optimal) procedure for power reduction should be the subject of further research. In the general case, a mathematical model of the problem and an optimization algorithm for its solution should be developed. In the practical case, a heuristic approach can be used. In such an approach, different action scenarios can be proposed and investigated. The scenarios can be based on the sequential start-up of operations, keeping selected machines in operation, keeping a bottleneck in operation, and in worst cases, stopping production. The criterion for each scenario should be to not exceed the limit of available power. Stage 6. Recommendations for the production process activities. Based on the results obtained from the experiments, it is necessary to determine the impact of different strategies for dealing with the occurrence of power limitations. The simulation carried out allows one to determine the change in the studied parameters in terms of measurable and non-measurable quantities. For each investigated state, it is necessary to determine quantities such as the production schedule, the graph of power consumption, the duration of the production process, the value of energy consumption, and the load of machines involved in the implemented production process. The data obtained from the simulation model are only the proposals of different strategies of action by the enterprise and should be evaluated by the enterprise because of the possibility of implementing each strategy in the production process and the effects it will have on the enterprise. The results of the evaluation should be recommendations for further actions in the production process.
The indicated characteristics such as process duration and energy consumption are measurable parameters that allow for a simple comparative analysis of each strategy. At the same time, they may require a more in-depth analysis of a given parameter. For example, the increase in the duration of the production process causes both delays in delivering the product to the customer and affects the increased wear and tear of machinery/equipment or the need to pay compensation to employees. Repeated allocation of overtime to employees will have an impact on lowering the motivation of employees to work, the overtiredness of employees, thus consequently lowering the work efficiency or increasing the number of mistakes made by employees.
The increased exploitation of machinery leads to faster deterioration of its components, which means the implementation of more frequent repairs and maintenance and the need to stop production in a given production area. It is also possible for more frequent failures in the system to occur, which can be particularly severe when they occur at the moment of realization of the production process just after lifting the limitation of power consumptionat the moment of increased realization of the operation. These characteristics are difficult to introduce to the simulation model, focusing on the analysis of the selected production area. These will be taken into account as additional quantities analyzed in the given treatment strategies. The analyzed parameters include the amount of employee overtime, energy consumption by other resources necessary for the implementation of the production process (lighting of workspaces, social rooms, corridors, ventilation/space heating) as well as increased operation of machinery/equipment. In summary, it is necessary to use practical data from the enterprise to determine recommendations. In terms of production management, this is primarily an assessment of whether it is possible to implement the production process in a manner deviating from the established ones. This applies to changing the order of some technological operations, the implementation of only selected technological operations, a different order of starting and ending operations, the possibility of extending the operation of machinery, and the availability of an adequate number of workers, etc. The above information should be collected, analyzed, and evaluated by an authorized production manager. Alternatively, it can be collected in the form of a procedure to be followed in the production process in the case of a limitation of available capacity. The procedure will have a specific form for each company. As far as enterprise control is concerned, the choice of the recommended strategy should first be assessed based on the simulation results by comparing the values of the determined process parameters. On this basis, information on the cost of implementing the selected strategy and the possible lost benefits in the case of its abandonment can be determined. As a result, a decision should be made on whether the selected strategy will be implemented.

Results
The method characterized in the previous section was used to conduct computational experiments. From the wide spectrum of possible energy consumption management problems to be studied, the case of hard constraint power limiting was selected for the study. The analysis involved the level of the production cell. The purpose of the research was to verify the completeness and consistency of the proposed method. The possibility of building and including real production conditions in the simulation model in terms of power and electricity consumption was investigated. Based on the simulation experiments, different scenarios for responding to the situation of available power limitation were defined and investigated.

Defining the Subject of Energy Consumption Research
The subject under study was the production cell of a selected enterprise in the mechanical industry. The production line produces two types of products (Product 1, Product 2), which are elements of the electric motor of production machines. The production cell consists of four machines and two belt feeders. Each production workstation is equipped with a buffer where materials, parts, and semi-finished products used for the production process are stored. An operator is assigned to each workstation, who operates the machine (loads/unloads semi-finished products) and controls the machine parameters during the process.

Identification of Enterprise Resources in Terms of Power and Electricity Consumption
In the next step, all resources of the production line that consume power during the production process were identified ( Table 4). The power consumption for buffers and belt feeders was constant at any time during the process, while for machines, it changed depending on the machine state.

Modeling Individual Detailed Resources of an Enterprise Due to Electricity Consumption
In the next step, a simulation model of the investigated production process was developed. The simulation model consisted of resources whose power consumption during the process realization was variable. For the remaining resources, power consumption was constant in each of the assumed states. In the "Power Off" state, the power consumption was 0 kW, while in the "Processing" state, it was at the set level for the operation of the resource. For example, in the case of buffers in the process under study, the power consumption was at the level of 0 kW, because they are a place for depositing products. They do not require the use of special equipment in the form of cooling/heating/keeping the movement of products, which would consume energy. For each resource, there is a profile of power consumption, which in the case of machinery is more complicated. This required introducing rules of power consumption in each of the states of the machine as well as defining the possibility of switching between the states. Characteristics of the production process in the form of unit power consumption by the machine as well as the duration of individual operations (for two manufactured products) are presented in Table 5. The duration of operations was given for two states of the machine (Warm-Up, Processing) because the duration of the other two states (Power Off, Idle) was calculated as part of the procedure for selecting operations on machines implemented in the simulation model. The "Power Off" state occurs when the work in the examined production cell is switched off-outside the set calendar of working hours from 6:00 a.m. to 2:00 p.m. The "Idle" state occurs on machines when the machine is waiting for a technological operation to be performed. The waiting time varies for different machines and also depends on the adopted strategy for the implementation of the production schedule.

Building a Simulation Model of a Manufacturing System
In a simulation model, the course of the investigated manufacturing process was mapped, taking into account the resources whose power consumption varies in time. To build the simulation model, data on the duration of individual operations and the volume of energy consumption for each state on specific machines were used (Table 5). Simulations were performed for a specific set of production orders scheduled during one working shift of 8 h. The simulation model developed in FlexSim 20.1.3 software is shown in Figure 2. Within the framework of the model, the logic of assigning tasks to be performed in the production process was developed. This logic is particularly important when there is a limitation of power consumption for a given production cell. The logic developed in the ProcessFlow tool of FlexSim program is presented in Figure 3. The data processing logic of the model was built on three elements. The first is the production schedule; the second is a flow of operations when an order is started on a machine; and the third is an assignment of power to a specific machine. At each iteration of the process, the state of the used power is examined, and then the power that can be distributed in the production cell to the remaining machines is determined (based on the difference between the available power and the power already used in the system). The power must be distributed to those machines that have made a request, and the decision to allocate power to each machine is made based on the established priorities in the production flow (order of request, order of flow in the process, etc.).

Verification of Changes in Electricity Consumption with the Simulation Model
The experiments analyzed the possible strategies for the company to deal with power curtailment in the assumed time interval. The analysis was performed at two levels. In the first, different variants of reducing peak power by 5, 10, 15, or 20 kW were analyzed.
In the second, different handling scenarios and their impact on the implementation of the production process were examined. Within each experiment, the following factors were investigated: • Process schedule; • Machine load schedule; • Diagram of power consumption for the production cell; • Process execution time; and • Level of electricity consumption within the execution of the assumed production program.
The first step of the analysis was to simulate the production process for the base state, without the occurrence of the constraint. The obtained results make it possible to identify the points where, in case of the occurrence of a power constraint, it will be necessary to make changes in the production schedule. The power consumption graph with the production schedule is shown in Figure 4. In the base state, the total process execution time was 462.6 min (i.e., it was executed during one work shift). One worker was assigned to each machine, therefore, their availability was 480 min, taking into account a 20-min work break. The work break was assigned to each station at a different time of the production schedule, therefore, it did not affect the working restrictions of the machines. The productivity of the machines varied from 48.61% (M1, M4) to 95.28% (M3). At the same time, the presented machine load chart showed that machine M3 was the bottleneck of the process, according to the concept of theory of constraints. The production schedule showed that on three workstations (M1, M2, M3), the course of production in the absence of restrictions on power consumption took place without restrictions/interruptions. The only breaks/restrictions occurred at station M4, where they were caused by waiting for the machine to run off/flow of semi-finished products from machine M3. While waiting, the machine operates in "Idle" mode. The factors of the production process for the base state are shown in Table 6.
If a constraint occurs from 11:00 a.m. to 1:00 p.m., part of the production must be reduced due to exceeding the available power consumption volume. The company can solve this problem according to the four proposed action scenarios:

1.
Execution of operations in a sequential manner, starting from the last link of the production process and switching on the remaining links;

2.
Realization of production with the assumption of maintaining work for selected machines (M2, M4) because of the applied production technology; 3.
Subordination of the process under the maximum use of the bottleneck following the concept of theory of constraints; and 4.
Disabling the execution of the production process for the period of introduction of the constraint or setting all machines in the work state "Idle". When the power limitation occur, operations on machine M1 are completed. On the other machines, operations are started or the machines are set to the "Idle" state. Although the job allocation priority was set to the last operation on machine M4, it was not set to run continuously. Operations must be run sequentially. This means that products from machine M2 are passed to machine M3, and then machine M4. This allows for subsequent production orders to be executed. It is important to note that the start of production of a given production batch must be completed and only then can the machine operate in the "Idle" state. Figure 5 shows the power consumption, depending on the production schedule, for four variants of the size of power limitations. The red box indicates the times of power limitation. There was a clear decrease in the frequency and diversity of the performed technological operations.  Table 7 shows the factors of the production process for different variants of power limitation. Increasing the amount of power limitation (decreasing the available power) increased the production process time by 27 min (with the 5 kW available power reduction) to 113.4 min (with the 20 kW reduction). Increasing the process realization increased the electricity consumption in the production cell due to the increased time the machines were in the "Idle" state. The power consumption increased from 6.54 (variant 1) to 28.29 (variant 4) with respect to the base state ( Table 6). As the reduction in power consumption increased, the productivity of the machines used in the process decreased. It is because of the lower possible value of power consumption that the selected machines cannot run but have to be put into the "Idle" state. The maximum utilization of machine M3 decreased from a value of 90.09% (with the 5 kW available power reduction) to a value of 76.56% (with the 20 kW available power reduction).

Scenario 2
When the power limitation occurs, operations on machine M1 are completed. On the remaining machines, individual operations are started or the machines are set to the "Idle" state. In the production cell, two machines (M2 and M4) should constantly be in the "Processing" state (i.e., the machine setting parameters should enable the start or execution of the production process at any time). Due to the characteristics of the process, meeting this condition for machine M4 was not possible. However, for machine M2, it was possible in two variants, a reduction in power consumption by 5 or 10 kWh, while in other cases, it was again impossible. Table 8 presents the factors of the production process for different power limitations. Increasing the amount of power limitations influenced the increase in the time execution of the production process by 29.4 min (with the 5 kW available power reduction) up to 113.4 min (with the 20 kW available power reduction). Increased process realization was associated with increased electricity consumption in the production cell-from 7.26 (variant 1) to 28.29 (variant 4) with respect to the base state (Table 6). Again, with the increase in the limitation of power consumption, the efficiency of individual machines used in the realization of the production process decreased. The maximum utilization of machine M3 decreased from the value of 89.66% (with the 5 kW available power reduction) to 76.56% (with the 5 kW available power reduction).

Scenario 3
When a limitation occurs, operations on machine M1 are completed. On the remaining machines, individual operations are started or the machines are set to "Idle". In this scenario, the production was subject to maximum utilization of the bottleneck of the process (i.e., machine M3). Machine M3 should therefore be run continuously to ensure that its productivity is at the highest level. Note that the power allocation priors for a given machine should also be set on the machines upstream of the bottleneck. This means that the bottleneck is continuously provided with semi-finished products for production. Continuity of operation of machine M3 was maintained in two variants with a power reduction of 5 or 10 kW. In the other variants, there was an interruption to the production operations. With the 20 kW available power reduction, all production operations on machines were stopped and only the readiness of machines to work was maintained. Figure 6 presents power consumption, depending on the realized production schedule, for four variants of the size of the power consumption limitation. The red box indicates the times of power limitation. There was a clear decrease in the frequency and diversity of technological operations.  Table 9 shows the factors of the production process for different power limitations. Increasing the amount of the power constraint increased the process execution time by 3 min (with the 5 kW available power reduction) to 113.4 min (with the 20 kW available power reduction). Of all the scenarios presented, this one had the shortest process execution extension. It also resulted in the lowest increase in electricity consumption in the production cell, which ranged from 0.71 kWh (variant 1) to 28.29 kWh (variant 4) with respect to the base state (Table 6). With the increase in the reduction in power consumption, the efficiency of individual machines decreased. However, the efficiency values for the first few variants were significantly higher than in the previous scenarios. The maximum utilization of machine M3 decreased from the value of 94.70% (with the 5 kW available power reduction) to the value of 76.56% (with the 20 kW available power reduction).

Scenario 4
When the constraint occurs, operations on machine M1 have been completed and the machine is in the "Idle" state. However, in the considered scenario, the power constraint was so high (with the 30 kW available power reduction) that no machine could complete the production process. Therefore, all machines entered the "Idle" state and waited for the release of the power limitation to continue the technological operations. Table 10 shows the production process factors associated with the power limitation. The results obtained in the scenario of waiting for the release of the power limitation to continue the production process are also presented in each previous scenario when the power curtailment was 20 kW. Likewise in this scenario, there was a significant increase in the duration of the production process of 113.4 min, which was simultaneously associated with an increased electricity consumption of 260.25 kWh. The production rates in the form of efficiency of the machines used in the process were also at a low level and ranged from 39.06% (for machines M1 and M4) to 76.56% (for machine M3).

Recommendations for the Production Process Activities
The simulations examined four key event scenarios possible for the enterprise. The results were analyzed and provided to the enterprise with recommendations. The best results in terms of reducing production order, lead time extension, and energy consumption were obtained in scenario 3. This solution subordinates power allocation to resources, prioritizing the bottleneck of the process, identified from the point of view of the production organization. The company's management has to make a decision taking into account both criteria from the production organization (shorter order processing time, less load on machines and employees, no overtime) and energy consumption analysis (reduction of energy consumption). These factors have a direct impact on reducing the costs of business. The paper did not take into account any classified information (e.g., legal provisions) that may affect the decisions made by the management, hence the interpretation of the results obtained from the simulation led to the establishment of recommendations for the enterprise.
At the same time, as part of the model building and validation process, the introduction of appropriate values of process parameters was checked and verified, corresponding to the given assumptions, requirements, and limitations of the tested production process.

Discussion
The discussion of the results is conducted in two areas: the first area was the analysis of the quantitative results obtained from the simulation experiments; and the second area was the evaluation of the proposed method in the context of applications for manufacturing companies and applications for conducting further research of the problem.
In the first area, a simulation model of the problem was developed in FlexSim software. All practically important elements of the problem concerning the management of power and electricity consumption in the investigated production process were represented in the model. Research scenarios were prepared, adequate to the needs of solving the problem. Simulation experiments were carried out according to the assumptions. Each experiment provided the expected quantitative results. Analysis of the results showed that the best results in terms of managing power consumption when a constraint occurred were obtained in scenario 3. In this scenario, production was subordinated to the bottleneck of the process. By increasing the throughput of the process and continuity of material flow (continuity of work) at the bottleneck, the lowest electricity consumption in the whole system was obtained (Table 9).
When limiting the available power by 20 kW, a stoppage of the production process was obtained in every scenario studied. All machines were running in the "Idle" state (i.e., waiting for the possibility of carrying out operations). The question to be analyzed was whether it is worthwhile keeping the machines in the "Idle" state. It is also possible to switch machines to the "Power Off" state. Then, when the restriction is removed, all machines must be restarted. The answer to this question depends on whether the electricity consumption in the "Warm Up" state covers the electricity consumption in the "Idle" state. In addition, it has to be assessed whether stopping and starting the machines increases their running costs and makes them wear out faster. In addition to electricity consumption, the need for increased overtime costs for employees must also be considered. These issues should be considered together when deciding how to respond to a reduction in an available capacity for a production process.
In the second area of discussion, it can be concluded that the proposed method was successful. The required data were collected, models of power consumption by the enterprise resources were prepared, experiments were carried out, and practical conclusions were formulated. However, it should be noted that for the analyzed production process, the authors of the paper managed to adequately prepare the research environment.
From a practical point of view, it is the ability to prepare the research environment within the enterprise that determines the ability to manage power and electricity consumption. For the company, this means that good internal preparation is required beforehand. Above all, the machinery and equipment must be metered. For decision-making, the measurements must be available virtually online. For possible long-term analyses, the measurements should be stored in databases, which requires that the company has qualified personnel. In addition, the company must have computer programs for simulations. Such programs require the purchase of licenses and the training of personnel to build models and conduct simulation experiments, which are costly and time-consuming activities. Other elements, indirectly related to the analyzed problem, are the type of manufactured products, the industry in which the company operates, and the technologies used. Not in every case is it possible to take sufficiently flexible actions to be able to react to problems related to the limitation of available power or the high prices of electricity.
On a general level, to mitigate these challenges, manufacturing companies can take the following actions: • Assess how energy price increases affect the company's cost increases; • Assess how energy supply interruptions, if any, affect production losses; • Estimate investment expenditures for the purchase of energy consumption metering and software and hardware; and • In the case of a decision to implement the solution, acquire appropriate specialists or services. Implementation of the above activities requires special care and the assessment of risks associated with their operational execution. In practice, the management of power and energy consumption in most manufacturing enterprises, especially those for which energy costs are not significant, requires measures of a very basic nature. Thus far, the perception of energy as a public good has not been conducive to both the building managers' awareness of possible problems and to prepare enterprises in the technical layer. There is also a lack of work in the literature to help identify and better understand the reasons for this situation. The assessment of the convergence of the obtained results with the knowledge in enterprises on power and electricity consumption management requires further research.
In the research area, the formulated problem seems to be extremely interesting. The proposed method should be developed quantitatively and qualitatively. Simulation experiments conducted quantitatively require the construction of formal mathematic models of individual production resources. Additionally, optimization models should be formulated, taking into account the various decision-making criteria, not only in the field of power and electricity costs. The investigated problem has a multi-criteria character. Such models and possibly dedicated algorithms should help decision-makers in enterprises to make well-reasoned business decisions.
The advantage of the applied method is that it supports the decision-making process in manufacturing companies. Currently, in many of them, the decision-making process is based on simple quantitative data, intuition, and the experience of production managers as they do not have efficient and effective supporting tools at their disposal.
The method allows one to verify the possibility of carrying out the adopted production schedule in specific conditions of the power possessed in a given production cell, which also enables determining the adverse effects of reducing power consumption in a given time. Simulation modeling enables quick verification of different event scenarios in the scope of the occurring power reduction. It also provides a basis on which to assess the consequences of using different solutions in response to the limitation. Carrying out the simulation takes a short time, and after its execution, a detailed production schedule is obtained. Other data are also available concerning the extension of the order execution time and the amount of machine load. Depending on the model built and the adopted characteristics/parameters of the production process, these data can be varied and dedicated to a specific company. This information is taken into account in the built mathematical model, which shows the relationships between variables. Then, the described relations are translated into a simulation model.
It can be concluded that the main advantage of the proposed solution is the possibility of the experimental verification of different energy consumption management strategies. Complex systems do not have such functionality. Simulation modeling software is intuitive and easy to install, does not require large hardware resources, and can be used in both large and small enterprises. Simulation models are scalable and their functions can be defined by users. A certain limitation in their use is their difficult integration with other enterprise systems (no API).
In qualitative terms, it is important to note that the problem under study is related to a much broader research area that concerns the use of modern information technologies including the field of communication IoT systems and data analysis AI algorithms. Manufacturing companies strive to build digital twins of the production systems they own. Regardless of the choice of a given software or tools, the application of the presented method will have a versatile character.
The changes should be considered in the context of the functioning of power markets, which primarily concerns a new definition of products and services in these markets and the necessity of the instantaneous valuation of these products.

Conclusions
Simulation modeling can be used to effectively study power and electricity consumption in production processes. Such studies provide potential cost reductions in manufactur-ing companies. Due to the flexibility of available software, the proposed approach can be applied to different processes. This paper draws attention to the broad context of the research to be conducted. Apart from the obvious problem of rising electricity prices, one has to take into account possible future limitations in power availability. The very issue of differentiating between power and electricity can be a problem for production companies. Considering electricity as a commodity and not as a public good would help to better balance the power system resources, but this would require changes necessary in the rules of the energy markets.
Finally, it should be noted that the problem under consideration may not seem very urgent at present. According to the authors, this is a mistaken impression. The current pandemic crisis, political crises that are likely to recur, and the drive to implement Industry 4.0 solutions may very quickly verify such a view. The time to discuss and prepare solutions for these challenges is now.