A Mixed Integer Linear Programming Model for the Optimization of Steel Waste Gases in Cogeneration: A Combined Coke Oven and Converter Gas Case Study

: O ﬀ -gas is one of the by-products of the steelmaking process. Its potential energy can be transformed into heat and electricity by means of cogeneration. A case study using a coke oven and Linz–Donawitz converter gas is presented. This work addresses the gas allocation problem for a cogeneration system producing steam and electricity. In the studied facility, located in northern Spain, the annual production of the plant requires 95,000 MWh of electrical energy and 525,000 MWh of thermal energy. The installed electrical and thermal power is 20.4 MW and 81 MW, respectively. A mixed integer linear programming model is built to optimize gas allocation, thus maximizing its beneﬁts. This model is applied to a 24-h scenario with real data from the plant, where gas allocation decision-making was performed by the plant operators. Application of the model generated proﬁt in a scenario where there were losses, increasing beneﬁts by 16.9%. A sensitivity analysis is also performed. The proposed model is useful not only from the perspective of daily plant operation but also as a tool to simulate di ﬀ erent design scenarios, such as the capacity of gasholders.


Introduction
Despite the improvements made by the steel industry, reducing greenhouse gas emissions is still a global challenge. The energy consumed in the entire steel production process represents a very significant percentage of economic and environmental costs. Using the basic oxygen furnace route, approximately 89% of the energy comes from coal, 7% from electricity, 3% from natural gas, and 1% from other gases [1]. According to the same report, when using an electric arc furnace route, the energy input from coal accounts for 11%, that from electricity accounts for 50%, that from natural gas is 38%, and 1% comes from other sources (data calculated from Worldsteel LCI database, 2018). Therefore, the efficient use of energy is very important for reducing total operational costs.
Steel waste gases, which are produced in a continuous and inherent way, can be transformed into other forms of energy, such as electricity and steam. These gases, which are considered byproducts, are increasingly used for this purpose, and there are considerable worldwide efforts to study their effective utilization. A comprehensive review can be found in [2,3].
Because steel waste gases have the advantage of being a secondary fuel while avoiding greenhouse emissions at the same time, different consumers within factories compete for these gases. Under this context, optimization methods are useful to determine the best distribution of available resources.
high-value fuel for effective power generation due to its high calorific power. Converter gas is created from pig iron during the steel production process. The LD process is the most common production method used to generate raw steel. By means of this process, the pig iron is refined with oxygen, lowering the carbon proportion and providing enough process heat to maintain the steel liquid. Table 1 summarizes the main characteristics of each gas. The calorific power of COG is almost double that of LDG, but the latter is a cleaner gas. The actual composition of both gases for this plant is detailed in Table 2. Table 1. Main characteristics of coke oven gas and Linz-Donawitz converter gas.

and heavy oils
Quite clean Difficult energy utilisation Highly toxic In an SGCP, these by-product gases are valorized by special engines to produce electricity in the electric plant and by boilers in the thermal plant to produce steam. Figure 1 provides a schematic view of the production process and subsequent use of the gases. The electric plant works only with LDG; meanwhile, the thermal plant runs mainly with COG but also with LDG or natural gas (NG) when the production of steelmaking gases is insufficient to supply the thermal energy required by the steel factory. The energy contained in the engine jacket water is also used to heat the boiler feed water up to 95 • C, and the energy of the engine exhaust gases is expelled at 500 • C for the production of recovery steam. This helps minimize thermal losses and reduces both the consumption of other resources and the emissions into the environment, as described in [6].
The steel factory requires approximately 90 tonnes/h of steam. The thermal energy is supplied by three conventional boilers, type FDU-3527, with a multifuel burner (coke gas, converter gas, or natural gas) with a steam production of 35 tonnes/h and a nominal power of 27 MW, as well as a recovery boiler, type GV-201, with a steam production of 20 tonnes/h and a nominal power of 11 MW. The equipment includes an economizer, vaporizer, and superheater, as well as a chimney for the evacuation of gases with a bypass in the economizer. This process is depicted in Figure 2. The steel factory requires approximately 90 tonnes/h of steam. The thermal energy is supplied by three conventional boilers, type FDU-3527, with a multifuel burner (coke gas, converter gas, or natural gas) with a steam production of 35 tonnes/h and a nominal power of 27 MW, as well as a recovery boiler, type GV-201, with a steam production of 20 tonnes/h and a nominal power of 11 MW. The equipment includes an economizer, vaporizer, and superheater, as well as a chimney for the evacuation of gases with a bypass in the economizer. This process is depicted in Figure 2. The plant includes 12 groups of gas engines that provide a total net electric power of 20,400 kW. The exhausts gas is recovered through a heat recovery unit for the generation of steam. The unit is designed as compact modular groups integrated with an engine, an alternator, and auxiliary systems for fuel, cooling, lubrication, and boot. Gas engines, designed to operate with converter gas, are a four-stroke type that provide turbocharging and cooling of the air-gas mixture and the electronically regulated combustion of the lean mixture. This process is depicted in Figure 3.  The steel factory requires approximately 90 tonnes/h of steam. The thermal energy is supplied by three conventional boilers, type FDU-3527, with a multifuel burner (coke gas, converter gas, or natural gas) with a steam production of 35 tonnes/h and a nominal power of 27 MW, as well as a recovery boiler, type GV-201, with a steam production of 20 tonnes/h and a nominal power of 11 MW. The equipment includes an economizer, vaporizer, and superheater, as well as a chimney for the evacuation of gases with a bypass in the economizer. This process is depicted in Figure 2. The plant includes 12 groups of gas engines that provide a total net electric power of 20,400 kW. The exhausts gas is recovered through a heat recovery unit for the generation of steam. The unit is designed as compact modular groups integrated with an engine, an alternator, and auxiliary systems for fuel, cooling, lubrication, and boot. Gas engines, designed to operate with converter gas, are a four-stroke type that provide turbocharging and cooling of the air-gas mixture and the electronically regulated combustion of the lean mixture. This process is depicted in Figure 3. The plant includes 12 groups of gas engines that provide a total net electric power of 20,400 kW. The exhausts gas is recovered through a heat recovery unit for the generation of steam. The unit is designed as compact modular groups integrated with an engine, an alternator, and auxiliary systems for fuel, cooling, lubrication, and boot. Gas engines, designed to operate with converter gas, are a four-stroke type that provide turbocharging and cooling of the air-gas mixture and the electronically regulated combustion of the lean mixture. This process is depicted in Figure 3.
The electricity produced is commercialized in the daily electrical market. The steam is entirely consumed by the steelmaking plant. The temperature of the superheated steam is 300 • C, which is controlled through an attemperator system with an outlet pressure of 1.9 MPa.
In this kind of environment, there is an imbalance between the produced and consumed gas. Production is irregular and depends on very complex factors, such as planning production orders, mineral stocking, scheduled maintenance, breakdowns, incidents, and many other issues. The gasholders are a key element that balance the process. Since the storage capacity of the gasometers is limited, the correct planning and management of waste gases is crucial. This decision-making process usually relies on the empirical knowledge of the plant managers. Therefore, it is convenient to apply optimization techniques.
This case study is different compared to existing works. Conventional cogeneration plants are usually formed by the boiler and turbine assembly working in series. However, this study combines Energies 2020, 13, 3781 5 of 23 two related but independent processes: the boilers always produce steam, but the engines can be stopped without generating electricity. This aspect is very important because, in addition to electrical energy, the use of the thermal energy contained in the engines has special relevance for the operation of the thermal plant. Because of all this, the optimal management of steel gases has a very important impact on plant performance. The electricity produced is commercialized in the daily electrical market. The steam is entirely consumed by the steelmaking plant. The temperature of the superheated steam is 300 °C, which is controlled through an attemperator system with an outlet pressure of 1.9 MPa.
In this kind of environment, there is an imbalance between the produced and consumed gas. Production is irregular and depends on very complex factors, such as planning production orders, mineral stocking, scheduled maintenance, breakdowns, incidents, and many other issues. The gasholders are a key element that balance the process. Since the storage capacity of the gasometers is limited, the correct planning and management of waste gases is crucial. This decision-making process usually relies on the empirical knowledge of the plant managers. Therefore, it is convenient to apply optimization techniques.
This case study is different compared to existing works. Conventional cogeneration plants are usually formed by the boiler and turbine assembly working in series. However, this study combines two related but independent processes: the boilers always produce steam, but the engines can be stopped without generating electricity. This aspect is very important because, in addition to electrical energy, the use of the thermal energy contained in the engines has special relevance for the operation of the thermal plant. Because of all this, the optimal management of steel gases has a very important impact on plant performance.

Method
The problem was modelled as a constraint satisfaction problem. This kind of problem can be defined by a set of variables, the domains for each of the variables, and the constraints on the values that the variables might assume simultaneously [7]. Different families of optimization models are used to formulate and solve these kinds of problems. One of the most successful methods is MILP modelling.
MILP models are one of the most prominent tools for solving the optimization of by-product gas systems and achieving cost reduction. Akimoto et al. [8] were the first to use MILP to optimize the by-product gases in the iron and steel industry. A mathematical model was formulated by Kim et al. [9,10], whose objective was to minimize the total cost over multiple periods. Kim et al. [11] also

Method
The problem was modelled as a constraint satisfaction problem. This kind of problem can be defined by a set of variables, the domains for each of the variables, and the constraints on the values that the variables might assume simultaneously [7]. Different families of optimization models are used to formulate and solve these kinds of problems. One of the most successful methods is MILP modelling.
MILP models are one of the most prominent tools for solving the optimization of by-product gas systems and achieving cost reduction. Akimoto et al. [8] were the first to use MILP to optimize the by-product gases in the iron and steel industry. A mathematical model was formulated by Kim et al. [9,10], whose objective was to minimize the total cost over multiple periods. Kim et al. [11] also achieved an optimal trade-off between conflicting objectives, such as reducing the number of burners on/off and reducing holder level changes, thereby minimizing fuel consumption costs.
Compared to previous works, Kong et al. [12] proposed a model that simultaneously optimizes the distribution of by-product gases in the by-product gas system, the cogeneration system, and the ironand steelmaking system. Qi et al. [13] developed a model for the plant-wide optimization of by-product gases to reduce the total cost. In their study, the authors proposed a more precise and objective penalty weight as a constraint in the function. De Oliveira et al. [14] presented a model to solve the problem of by-product fuel distribution to maximize energy utilization and assign appropriate weights to the objective function penalties, resulting in an increase in the operational performance of the fuel distribution system. Song et al. [15] noted that the dynamic optimization of surplus gas distribution has a very important position in the management of gas systems and established a common model. Zeng et al. [16] incorporated a novel multi-period model for the optimal distribution of by-product gases as steam and power. Different by-product gases can be mixed to satisfy the minimum heating and energy requirements of production units. Moreover, the authors introduced key practical features Energies 2020, 13, 3781 6 of 23 of by-product gases, steam, and power generation and distribution. Orre et al. [17] evaluated methods for decreasing the total energy demand and CO 2 emissions in a system containing an integrated steel plant connected to a combined heat and power plant through optimized production operations for seasonal-dependent energy demands.
Pena et al. [18] carried out a sensitivity analysis of the objective function considering the penalties associated with the decision variables of the optimization problem to evaluate the price of fuel used in a thermoelectric plant with a high market value, which should replace the gases generated in the steelmaking process only when the reserves of stored gas are small. Later, the same authors [19] minimized the imbalance between the random dynamics of by-product fuel generation and consumption and maximized the energy efficiency under various uncertainties using adaptive time-series models. Considering the time-of-use electricity price, Zhao et al. [20] proposed a model to optimize the by-product gas used. This model was later extended by considering Pareto optimality and fuzzy sets to find the best solution for two conflicting objectives: achieving gasholder stability and reducing the electricity purchasing cost [21].
The model was implemented using IBM ILOG CPLEX Optimization Studio software (CPLEX) [22]. CPLEX is software developed by IBM to solve optimization problems. CPLEX is a comprehensive tool designed to facilitate building and solving integer programming problems, very large linear programming problems (using either primal or dual variants of the simplex method or the barrier interior point), convex and non-convex quadratic programming problems, and convex quadratically constrained problems (solved via second-order cone programming). This tool combines integrated and full-featured development and supports OPL (optimization programming language) and high-performance CPLEX and CP Optimizer solvers. CPLEX has been selected because it is one of the most powerful and extended software optimization packages that can be used freely for academic applications. The suite has been in continuous improvement since the first version developed by Robert Bixby in 1988 [23]. The version used for this work was CPLEX Studio 12.9.0. Using the studio, optimization problems can be modelled using OPL, an easy-to-use declarative language. OPL allows the model to be separated from the data in two different declarative files: model file and data file. It is easy to simulate different scenarios using this feature. The models are defined in terms of decision variables, the objective function and constraints. The model files may also include scripts for pre-or post-processing the data. OPL syntax is very close to the natural way that a mathematical constraints optimization problem is expressed. This package has also been selected because of this feature, so starting the implementation from the mathematical formulation is easy, and also to carry on the model to other optimization packages. As a benefit, our work is more easily replicable.
The steps performed for this modelling can be summarized as follows: 1.
First, the boundaries of the system are established, and the processes are identified. Reasonable simplifications are introduced to describe the system mathematically. This process is depicted in Section 2.

2.
Second, an optimization model is created. The objective functions and constraints are both presented (Section 4).

3.
Third, an appropriate optimization routine is applied. In this study, CPLEX is used to solve the MILP problem.

4.
Fourth, the model is validated using a scenario, and the results are analyzed.

Objective Function
The subobjectives of the multifuel cogeneration process are to maximize energy revenue sales (1), minimize fuel costs (2), and minimize CO 2 emission costs (3). All these objectives are considered independently to explain the influence and impact of each separately. Subsequently, they are grouped into an overall objective function (4) to maximize the profit of the process. The numbers in parentheses Energies 2020, 13, 3781 7 of 23 refer to the equations that describe each component. Equipment maintenance cost (5) is also considered but not included within the objective function, as justified in Section 4.6.

Revenue
Revenue from energy sales (R) consists of: • Remuneration for the sale of electric energy (R EE ): this is obtained by multiplying the electric energy generated by the hourly price of the electric pool, given by P POOL [t].

•
Remuneration for the sale of thermal energy (R TE ): this is obtained from the product of steam produced compared to the price paid by the steel factory (in this case, a fixed price, given by P TE ).
The analyzed temporal window (t) is 24 h. The electric power production (PR EE ) is calculated by multiplying the amount of LDG allocated for electric production by the heat value of LDG. The thermal value is calculated in a similar way while also considering the amount of each gas allocated (thermal production could be performed with any of the three gases).

Fuel Cost
This is the amount of gas consumed in the SGCP to produce electrical and thermal energy multiplied by its unit cost: The cost of the gas is fixed (not time-dependent) and is given by P LDG (cost of LDG in €/Nm 3 ), P COG (cost of COG in €/Nm 3 ) and P NG (cost of GN in €/Nm 3 ) in the equation. Q LDG , Q COG, and Q NG are the cumulative amount of gas consumed per hour for each kind of fuel. Natural gas is consumed only for producing electricity and COG only for thermal energy, but LDG is consumed for both thermal and electrical power production. Thus, we must consider the amount allocated to each use:

Emission Cost
This model considers CO 2 emissions. The cost is estimated using the conversion factor for each of the fuels recovered in the SGCP according to Equation (3): where µ represents the emission factor of each type of gas, and P CO2 is the cost per ton of CO 2 emissions.

Profit
The profit of the plant includes all of the above conditions: Energies 2020, 13, 3781 8 of 23

Manteinance
Maintenance cost (C MTE ) is derived from the number of stops of the equipment. For the burners, the unitary cost is represented by α, and for the engines β. The installation also has fixed maintenance costs, but these are not considered as they remain constant.
Equation (5) is not included within the overall goal because the number of stops cannot be modelled with the linear programmer of OPL. Although at first glance it seems easy to compute, and it would be with a standard programming language, the OPL modelling language is limited to mathematical expressions within the context of linear programming. To calculate it, we would need to compare the fuel consumption of one hour with that of the previous one, to detect equipment starts, and accumulate the number of on/offs. However, this cannot be done either in the section of the code dedicated to working with decision variables or in the section where the restrictions are declared. We are doing this calculation using CPLEX scripts post-processing the results. Therefore, we calculate the cost that it has, but this cost is not considered in the optimization. This is a limitation of the model. However, the maintenance cost is negligible compared to the rest of the costs.

Constraints
The overall goal of this model is to maximize profits according to the following constraints.

Gas Availability
Natural gas and COG are available without limitations, but LDG is produced discontinuously depending on the melts of the steelworks and is captured and conducted to a gasholder, as depicted in Figure 1. Therefore, the first restriction refers to the fact that LDG consumption must not exceed the gasholder's amount available at any time: where Q LDG_ET and Q LDG_EE are the amount of LDG allocated for electric and thermal power respectively, F LDG is the flow of gas captured from steelmaking, and stock LDG is the amount of surplus LDG stored by the gasholder in the previous period (at time t = 0).

Gasholder Constraints
As previously stated, gasholders play a key role in this process. In this case, the LDG gasholder that acts as a buffer for the gases captured from the conversion process is constrained by the maximum capacity (V LDG_MAX ) and the minimum capacity (V LDG_MIN ). The profit of the system is largely determined by the proper management of the capacity of this gasholder. Equation (7) and (8) model these constraints:

Steam Demand Satisfaction Constraint
The steam generated from the boilers must meet the energy demands (D TE ) for each period, which are shown in Equation (9): Energies 2020, 13, 3781 9 of 23 The thermic production (PR TE ) is calculated according to the gas's heat value described in Section 4.2 (revenue).

Boiler Constraints
Boilers have their operational ranges and cannot operate under their technical limits. They require a minimum gas flow threshold to be started, as modeled in Equation (10), (11), and (12): These three equations are equivalent; the only difference is that Equation (10) considers that LDG may be consumed for thermal or electrical power, so the equation considers the flow to be thermally allocated. These equations can also be parameterized to distinguish different levels for each boiler (for example, in the case study, there are three boilers). However, the boilers that are used generally have the same technical characteristics.
A very important factor is the use of the "OR" operator (noted as " " in the equations). This is used in the sense that the CPLEX solver will assign 0 to that variable (the allocated gas) if the minimum threshold of the boiler is not reached. In this way, the boiler does not start if there is not a minimum gas flow.
In a similar way, the boilers cannot burn more fuel than the upper limit. This is modeled according to Equations (13)- (15):

Engine Constraints
The engines for electric production are also subject to operational constraints. In this case, the number of equations is more significantly reduced because the engines can only operate with LDG.
The "OR" operator is used in Equation (16) as it is used in Equation (10) within the context of the CPLEX solver to avoid the engine from starting if the minimum gas threshold is not reached.

OPL Model
Appendix A includes part of the CPLEX OPL source code. The code starts with the data section. All the variables and data structures are declared within this section. It is necessary to consider that the data is loaded from a complementary .dat file, so the variables are initialized with those values. In this way, the same model can be used to easily simulate different scenarios. This file is not included, but the values of the variables can be easily derived from the description of the scenario in Section 5.
The second section includes the declarations of the decision variables. In that section, dvar is the OPL keyword used to declare decision variables. Some expressions can be used to write more complex expressions in a compact way. In this case, the subobjectives stated in Sections 4.2-4.4 are written using decision expressions. Finally, the objective must be stated. In this case, maximize the overall profit.
The third section contains the model constraints. Here, all the problem formulation described in Section 4.7 is coded. Finally, the model also includes scripts for post-processing the results and to perform additional calculations. This section has not been included in the Appendix A due to its length and because it is not of special interest.

Scenario Description
To begin, we detail the installation parameters that are relevant to the formulation of the problem. Table 3 shows the capacity of the LDG gasholder. Once the upper limit is reached, the untapped LDG is directly burned by the torch. The efficiency of each type of equipment is shown in Table 4. Frequently starting and stopping the equipment should be avoided, which can be enforced by penalties. The penalty for each engine stop was established as 10 € due to the mandatory maintenance costs for every 2000 engine starts. For each burner stop, 5 € was established to avoid the risk of unwanted unavailability. Finally, 70 € was determined for each boiler stop to reduce the work of partial loads on the boilers and the consequent loss of performance, according to Zhao et al. [20]. These penalties were established according to the plant operators' experience. Tables 5 and 6 present the consumption ranges of the equipment for different gases. The electric engines are adapted to work only with LDG.  The heating values of fuel gases and the factor emissions are shown in Table 7. A penalty for CO 2 emissions must also be considered. For the computation, 5.96 €/t was the average value registered for the geographical area of the plant during the period of study (2014). The revenue of steam production is fixed by contract and is shown in Table 8. The price paid is higher for steel gas due to the environmental benefits that it provides to the factory by avoiding torch combustion. The planning period spans one day with real data from the operation in SGCP. The time step length of 1 h corresponds to the actual measuring period used in the process. The thermal energy required by the steel process must be supplied by the cogeneration plant in a continuous, safe, and reliable way. For electric energy, the objective is to maximize energy sales based on the hourly price of the electricity market. In Spain, this price is known the day before as a consequence of crossing the energy supply and demand curve forecasting. The electricity spot market defines the prices for every hour of the following day. For this reason, the correct management and optimization of gas flows is essential to ensure the fewest repercussions for the performance of the thermal plant.
The management of off-gas is currently done manually and based on the knowledge of the operators. The operating data were recorded for the plant over one year. The data differ in the amount of available steel gases, as well as the steam demands and electricity prices. Based on a study of these data, a scenario was selected; this scenario is considered representative of the different situations that may occur. The operation and performance of the current results are compared and evaluated against the results of the optimization model proposed in this work.

24-h Reference Scenario Data
This scenario represents the base day in the operation of the plant with very irregular and discontinuous steel gas availability. The scenario involves periods of operation with natural gas due to a lack of steel gas and mixed operation with steel gas and natural gas. Thus, this scenario is interesting for comparison. Notably, steel gas is not always available depending on the operational program of the steel plant and its storage capacity, which is limited by its gasholders.
The following figures detail the initial conditions with which the different consumption strategies are evaluated. Figure 4 shows the availability of steel waste gas, and Figure 5 presents the steam requirements of the steel company. The electricity price market during this period can be seen in Figure 6.

Results
Here, we describe the optimization results during the period. Figures 7 and 8 present the distributions of LDG, COG, and NG in the SGCP in the base scenario (based on the actual data for the studied period) and the results of the optimized solution, respectively. The base scenario refers to the 24-h situation described in Section 5.1, considering the decisions made by the managers and, thus, the outcomes produced by those decisions. That situation is taken as baseline for the comparison against the decisions proposed by the situation modelled with CPLEX. The results indicate the amount that the three kinds of gases fluctuated during the planning period. The behavior in both scenarios is very different. In the optimized solution during nighttime hours, LDG is mainly used to produce thermal energy. This is due to the low price of the electricity market (<40 €/MWh) and to avoid the consumption of NG. However, in the morning hours, the strategy is different due to the high price of the electricity market (> 55€/MWh) and the decrease in the thermal requirements of the steel factory (<50 Tn). In the afternoon (from 15 h onward), LDG accumulates in the gasometer to minimize the contribution of GN (from 19 h onwards).

Results
Here, we describe the optimization results during the period. Figure 7 and 8 present the distributions of LDG, COG, and NG in the SGCP in the base scenario (based on the actual data for the studied period) and the results of the optimized solution, respectively. The base scenario refers to the 24-h situation described in Section 5.1, considering the decisions made by the managers and, thus, the outcomes produced by those decisions. That situation is taken as baseline for the comparison against the decisions proposed by the situation modelled with CPLEX. The results indicate the amount that the three kinds of gases fluctuated during the planning period. The behavior in both scenarios is very different. In the optimized solution during nighttime hours, LDG is mainly used to produce thermal energy. This is due to the low price of the electricity market (<40 €/MWh) and to avoid the consumption of NG. However, in the morning hours, the strategy is different due to the high price of the electricity market (> 55€/MWh) and the decrease in the thermal requirements of the steel factory (<50 Tn). In the afternoon (from 15 h onward), LDG accumulates in the gasometer to minimize the contribution of GN (from 19 h onwards).   Energies 2020, 13, x FOR PEER REVIEW 13 of 25

Results
Here, we describe the optimization results during the period. Figure 7 and 8 present the distributions of LDG, COG, and NG in the SGCP in the base scenario (based on the actual data for the studied period) and the results of the optimized solution, respectively. The base scenario refers to the 24-h situation described in Section 5.1, considering the decisions made by the managers and, thus, the outcomes produced by those decisions. That situation is taken as baseline for the comparison against the decisions proposed by the situation modelled with CPLEX. The results indicate the amount that the three kinds of gases fluctuated during the planning period. The behavior in both scenarios is very different. In the optimized solution during nighttime hours, LDG is mainly used to produce thermal energy. This is due to the low price of the electricity market (<40 €/MWh) and to avoid the consumption of NG. However, in the morning hours, the strategy is different due to the high price of the electricity market (> 55€/MWh) and the decrease in the thermal requirements of the steel factory (<50 Tn). In the afternoon (from 15 h onward), LDG accumulates in the gasometer to minimize the contribution of GN (from 19 h onwards).   As depicted in Figure 9, the volume of COG allocated to thermal production is the same in both cases (the lines are overlapped) and coincides with the amount available ( Figure 4). To achieve the thermal energy requirements, NG must also be used ( Figure 10). This scenario features a shortage of Energies 2020, 13, 3781 14 of 23 COG, which is complemented with NG. However, as shown in Figure 10, the consumption of NG is greater in the base case than in the optimized scenario, which yields notable savings.
As depicted in Figure 9, the volume of COG allocated to thermal production is the same in both cases (the lines are overlapped) and coincides with the amount available ( Figure 4). To achieve the thermal energy requirements, NG must also be used ( Figure 10). This scenario features a shortage of COG, which is complemented with NG. However, as shown in Figure 10, the consumption of NG is greater in the base case than in the optimized scenario, which yields notable savings.   11 details a comparison between the level of the base and the proposed gasholder level once the optimization is carried out. In the latter case, the optimized solution is associated at a low level during the night; however, from 4 a.m. until 6 p.m. it remains above 50,000 m 3 . The following hours take advantage of the energy stored in the gasholder to decrease the consumption of NG. As depicted in Figure 9, the volume of COG allocated to thermal production is the same in both cases (the lines are overlapped) and coincides with the amount available ( Figure 4). To achieve the thermal energy requirements, NG must also be used ( Figure 10). This scenario features a shortage of COG, which is complemented with NG. However, as shown in Figure 10, the consumption of NG is greater in the base case than in the optimized scenario, which yields notable savings.   11 details a comparison between the level of the base and the proposed gasholder level once the optimization is carried out. In the latter case, the optimized solution is associated at a low level during the night; however, from 4 a.m. until 6 p.m. it remains above 50,000 m 3 . The following hours take advantage of the energy stored in the gasholder to decrease the consumption of NG.  Figure 11 details a comparison between the level of the base and the proposed gasholder level once the optimization is carried out. In the latter case, the optimized solution is associated at a low level during the night; however, from 4 a.m. until 6 p.m. it remains above 50,000 m 3 . The following hours take advantage of the energy stored in the gasholder to decrease the consumption of NG. The numbers of engines, burners, and boilers turned on/off in the base and optimized scenarios are shown in Figure 12 and 13, respectively. The optimized solution minimizes the stoppage of the motors by 29%. However, the burner changes in the boilers are increased by 70% due to the more complex management of steel gas. The numbers of engines, burners, and boilers turned on/off in the base and optimized scenarios are shown in Figures 12 and 13, respectively. The optimized solution minimizes the stoppage of the motors by 29%. However, the burner changes in the boilers are increased by 70% due to the more complex management of steel gas. The numbers of engines, burners, and boilers turned on/off in the base and optimized scenarios are shown in Figure 12 and 13, respectively. The optimized solution minimizes the stoppage of the motors by 29%. However, the burner changes in the boilers are increased by 70% due to the more complex management of steel gas.       The base scenario focuses mainly on the way to avoid the consumption of NG, neglecting how more suitable off-gas allocation could contribute in a more positive way. Therefore, the base model yields higher operational costs systematically. The optimized model minimizes fuel costs by 55% based on the reduction of NG consumption. The maintenance costs are practically the same in both models. Emission costs are also lower in the proposed scenario due to the greater use of COG, which also has a much lower CO2 emission factor than LDG. The thermal energy revenue is almost the same in both cases because the price per ton of steam produced using steel gases is the same. The revenue from the production of electrical energy is lower with the proposed model, but the overall benefits are higher.   The base scenario focuses mainly on the way to avoid the consumption of NG, neglecting how more suitable off-gas allocation could contribute in a more positive way. Therefore, the base model yields higher operational costs systematically. The optimized model minimizes fuel costs by 55% based on the reduction of NG consumption. The maintenance costs are practically the same in both models. Emission costs are also lower in the proposed scenario due to the greater use of COG, which also has a much lower CO 2 emission factor than LDG. The thermal energy revenue is almost the same in both cases because the price per ton of steam produced using steel gases is the same. The revenue from the production of electrical energy is lower with the proposed model, but the overall benefits are higher.

Sensitivity Analysis
A sensitivity analysis of the most significative factors was performed. Off-gases have no cost in the present scenario. Coke batteries work in a continuous way, so their consumption is presently a priority. In the future, iron and steel plants will increase their consumption and use of steel gases, especially COG, due to its good calorific value. Therefore, COG has economic value. A sensitivity analysis of the COG price was conducted, concluding that until reaching a cost of 0.079 €/m 3 , the present scenario remains profitable.
Trading in the CO 2 emissions market is becoming increasingly relevant to the sustainability and competitiveness of companies. The future trend is that the price of CO 2 emissions will continue to increase. Therefore, a sensitivity analysis was conducted by increasing the P CO2 value and comparing its process's profitability with other very important economic parameters. One of those parameters is the capacity of the gasholder. The capacity of the gasholder is fixed, but this model could be useful to design a new process or to expand the decision-making process. Table 9 shows how the benefits vary with different amounts of CO 2 and different capacities of the gasholder. Here, the breakpoint where the cost of CO 2 emissions becomes unprofitable is projected for a specific gasholder capacity. For example, in the present scenario, a capacity of 60,000 Nm 3 would be between 5 and 10 €/t. Another interesting analysis is the relationship between the gasholder capacity and the expected profit, which follows a logarithmic relationship: doubling the capacity of the gasometer does not mean doubling the profit. Likewise, Table 10 shows a comparison of thermal energy prices and CO 2 emissions. With a thermal energy price above 50% of the CO 2 price, a plant would be profitable.

Conclusions
The management of cogeneration processes based on off-gases in the iron and steel industry is complex. To achieve the lowest operational cost, it is important to take the entire system into account to avoid sub-optimal operations. In this paper, an MILP model for multi-period optimization of the steel gas allocation in a cogeneration system is proposed. The case study shows that the proposed method performs well in maximizing the total benefits. Compared to the base model (human decision-making), a benefit of more than 16.9% was obtained. This result is based on the operational data over one day with a shortage of off-gas and thus requires the system to be supplemented with natural gas. This is a limitation of the present study. However, this is not a rare case but a representative case of a situation that occurs with a certain frequency. In gas-sufficiency situations, human decision-making and model decision-making do not differ significantly, but when other circumstances come into play, operators tend to make decisions following short-term, and therefore less efficient, criteria. To overcome this limitation, the analysis of scenarios with a broader time horizon is proposed for further work. A 24-h time window was used because the electricity price is known anticipatedly, but scenarios with larger periods reflecting different patterns can be considered, for example a week with adverse weather conditions that entails expensive electricity prices.
Sensitivity analyses of CO 2 prices, gasholder levels, and thermal energy were also conducted. This information could be very useful when designing new cogeneration processes. In this sense, our analysis of the influence of gasometer capacity is especially important. The correct dimensioning of gasometer capacity is one of the most relevant design parameters; as noted in this study, the relation of capacity-benefits is logarithmic. The analyses of the influence of CO 2 emissions is also remarkable, as this factor is one of the most important in the context of decarbonization. This study considers only one objective because the CO 2 emissions are translated to cost in order to compute the overall profit. An interesting challenge and future line of research may be the application of multi-objective optimization in which benefits and CO 2 emissions are analyzed. As further work, a model will be developed evaluating the pareto front that relates the profit with the tons of CO 2 emissions. This, in this way, the decision makers will have valuable information for the decision-making process. The CPLEX model would enable the use of a ε-constraint multi objective approach, which is an extension of linear programming for application in bi-objective optimization problems.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.