Introduction

A biorefinery is defined as a facility that converts biomass to diverse fuels, energy, and value-added chemicals through process and equipment (Hasunuma et al. 2013). The product diversity in biorefinery enhances its economic performance by increasing the number of markets it enters (Scherer and Ross 1990). Encountering product diversity, optimal resource allocation is crucial in maximizing the overall profit of the biorefinery (Sammons et al. 2007). Zondervan et al. (2011) developed a mixed integer nonlinear programming optimization model to determine the optimal biomass conversion route for the production of ethanol, butanol, and succinic acid. Andiappan et al. (2014) applied a multiple objective optimization model for the synthesis of an optimal palm-based biomass allocation network considering economic performance, environmental performance, and energy requirement. Kasivisvanathan et al. (2013) developed a mixed-integer linear programming model for determining the optimal network reallocation when subjected to process inoperability in unit operations. It is notable that although resource allocation under uncertainties has been addressed in Kasivisvanathan et al. (2013), the variability in conversion efficiency of the unit operations has not been taken into account. Taking into account the unit operation efficiency may result in a highly nonlinear model because it could be affected by different variables such as part load ratio, feedstock properties, ambient temperature, etc. As a result, the modeling of a biorefinery that is operating with multiple interconnected thermal and biological unit operations may suffer from inaccuracy due to the propagation of uncertainty by the assumptions made. In contrast, detailed mathematical modeling emulating the actual biorefinery ecosystem will give high accuracy, however at the expense of large computational effort and duration.

Smart manufacturing is gaining attention from both researchers and industries. It is a new manufacturing approach that aims to connect unit operations through a wireless network with the use of sensors and advanced computational intelligence to improve system productivity and sustainability performance (Wang et al. 2018). The implementation of smart manufacturing can minimize human error especially in industries with various products and feedstocks. Human error can occur during the product or feedstock adjustments due to the unfamiliarity of the situation, time shortage for error detection, miscommunication between operator and engineer, and mental or physical fatigue (Kurata et al. 2015). Resource allocation optimization is a key feature in smart manufacturing, whereby the system must respond swiftly to perturbations in feedstock supply and product demand by improvising a new optimal allocation network (Yuan et al. 2017). Therefore, the problem discussed in the previous literature by Kasivisvanathan et al. (2013) poses a significant barrier in the implementation of resource allocation in biorefinery.

To mitigate such issue, some research works have integrated the artificial neural network (ANN) into the mathematical optimization model for the modeling of different unit operations (Chen et al. 2017, 2020). The artificial neural network (ANN) can be used to model the unit operations in a biorefinery because it is relatively simple and it does not require experts with highly specialized mathematical background (Gago et al. 2010). An ANN is based on an interconnected group of artificial neurons that function to simulate the thinking process in the human brain (Wu et al. 2007). Many research works have been carried out to compare the prediction accuracy for various unit operations between mathematical modeling such as nonisothermal diffusion of moisture in wood (Avramidis and Wu 2006), prediction of glucose concentration during enzymatic hydrolysis (Nikzad et al. 2012), and drying kinetic of figs (Şahin and Öztürk 2018). In these works, the use of ANN is reported with higher prediction accuracy as compared to mathematical modeling. Due to the advantages mentioned above, ANN is used extensively in modeling the unit operations and processes in the biorefinery, for instance biomass boiler (Pornsing and Watanasungsuit 2016), combined heat and power (De et al. 2007), fermentation (Ahmadian-Moghadam et al. 2013), and pyrolysis (Sunphorka et al. 2017). In the work of Fahmi and Cremaschi (2012), ANN is used to replace the unit operations in the mathematical model of a biodiesel production plant. Mixed-integer nonlinear programming (MINLP) solver is then applied to optimize the overall network based on total annual cost. It is reported that the ANN output values differ less than one percent as compared to the results from Aspen HYSYS software. Furthermore, the computational effort during the optimization is reduced significantly, leading to a shorter computational duration ranging from 5 to 23 s.

Aside from mathematical optimization, deep neural network (DNN) can be used for resource alllocation in a manufacturing plant as it is able to manage an abundant number of data and input variables and identify the nonlinear behaviors among the variables (Behrooz et al. 2018). Furthermore, it provides a quick response to the variations in the process because no optimization is required when devising the new resource allocation scheme. In further research, Mason et al. (2018) has proposed the use of neuroevolution algorithms to generate a deep neural network (DNN) system for resource allocation. Neuroevolution of Augmented Topology (NEAT) is one of the well-known neuroevolution algorithms developed by Stanley and Miikkulainen (2002); it employs genetic algorithm (GA) to evolve a DNN’s connection weight and topology in order to maximize the objective function of a prediction problem. It is able to outperform the best fixed-topology method such as Enforced Sub-Populations (ESP) in a reinforcement learning task, and it requires no output data during the training process and is therefore suitable in solving large and complex problems (Floreano et al. 2008). NEAT is widely applied in the field of robotic movement (Wen et al. 2017), gaming (Stanley et al. 2005), knapsack problem (Denysiuk et al. 2019), and financial trading (Nadkarni and Ferreira Neves 2018), as well as engineering problems such as watershed management (Mason et al. 2018). Apart from NEAT and ESP, Neuro Differential Evolution (NDE) is a more recent neuroevolution algorithm developed by Mason et al. (2017) and it improves the NEAT algorithm. In NEAT, GA is employed to optimize both ANN’s topology and synaptic weight, whereas in NDE, the ANN’s topology and synaptic weights are optimized separately using GA and differential algorithm. In the work of Mason et al. (2018), all three neuroevolution algorithms (ESP, NEAT, and NDE) have been applied to evolve a DNN for the optimal allocation of water from the river to a number of individuals accounting the variations in water supply and stakeholders’ demand. The problem involves an environment whereby the water availability in the river and the dam are input variables and they are subject to changes. In their results, NDE converged to the best solution in the shortest duration, followed by ESP and NEAT. Besides, NDE is reported with the highest fitness and lowest standard deviation as compared to other neuroevolution algorithms.

Based on the above literature, there are several research gaps that remained to be addressed. Firstly, there is a lack of literature in addressing the resource allocation problem in a biorefinery using NDE, given that the biorefinery is a complex process which involves multiple unit operations, feedstocks, and products with possible fluctuations in supply, demand, biomass properties, and ambient temperature. Secondly, although NDE is proven to be more effective in addressing resource allocation problems as compared to other neuroevolution algorithms such as ESP and NEAT, its optimality and response time against the mathematical optimization solver is not compared. We have postulated the optimal resource allocation network and faster response will enhance the profitability of an enterprise. Hence, to address these research gaps, this work is proposed to study the application of NDE in a biorefinery to optimize the resource allocation problem. Firstly, various unit operations in the biorefinery are modeled using ANN based on past literature data in “Surrogate modeling of unit operations using ANN.” The input and output values from these ANN models are then connected to the overall plant network using mass and energy balances in “Overall network modeling,” and the net profit of the overall network is evaluated in “Net profit evaluation.” Then, a DNN is optimized using NDE to perform resource allocation on the biorefinery with the objective of net profit maximization (“Neuro differential evolution”). The optimality and response time of the DNN is compared against the solution from nonlinear programming (NLP) solver (“Result and discussion”). Lastly, a conclusion is drawn to highlight the contributions and findings in this work.

Problem statement

The problem statement in this paper is given as follows:

  • Given three types of palm oil biomass used in the biorefinery plant: empty fruit bunch (EFB), palm mesocarp fiber (PMF), and palm kernel shell (PKS) and they are represented with the set b ∈ B.

  • Given four lignocellulosic biomass-processing routes available in the biorefinery plant to produce the following end products: (1) direct selling of biomass; (2) steam generation for plant consumption; (3) chilled water generation for plant consumption; and (4) ethanol synthesis for selling.

  • The biomass allocation to different processing routes is determined by the DNN evolved from NDA.

  • Given the chilled water generation process is driven by steam from the biomass boiler using an absorption refrigeration system (ARS).

  • Given the prices of lignocellulosic biomass, fuels, and utilities are obtained based on the current market price.

Based on the problem statement above, NDE is used to evolve a DNN for the resource allocation in a lignocellulosic biorefinery plant that is responsive to the variations in feedstock supply, biomass properties, product demand, and ambient temperature. It is also intended to investigate the performance of the DNN in the aspect of training duration, optimality, and response time.

Methodology

This study is conducted in the following manner. Firstly, the unit operations for ethanol conversion, boiler, and absorption chiller are modeled using surrogate modeling based on ANN (“Surrogate modeling of unit operations using ANN”). Secondly, mathematical model is used to connect the ANN models using material and energy balance (“Overall network modeling”), and to compute the net profit of the overall network (“Net profit evaluation”). Finally, NDE is employed to evolve a DNN to perform resource allocation in biorefinery when subjected to fluctuations in supply, demand, biomass properties, and ambient temperature ((“Neuro differential evolution”). Figure 1 shows the overall network representation of the biorefinery. The entire methodology is conducted using MATLAB R2017b, and the detailed step is explained in the following sub-sections.

Fig. 1
figure 1

Overall network representation for oil palm–based lignocellulosic biorefinery (ANN = artificial neural network)

Surrogate modeling of unit operations using ANN

Based on Fig. 1, there are three unit operations that are modeled using a surrogate. Table 1 summarizes the inputs and outputs for different unit operations along with the literature source of the data used in the surrogate modeling. The first ANN model (ANN-1) represents the biomass boiler. The efficiency of the boiler is the output of ANN-1; it is affected by many input variables such as biomass moisture content, steam temperature, ambient temperature, and the part load ratio.

Table 1 Input and output data for ANN models

The ANN-2 ethanol formation process consists of pretreatment, hydrolysis, and fermentation process. Note that PKS is not included in this pathway because it has a high lignin content which is not suitable for fermentation. The inputs of ANN-2 are the ratio of EFB and PMF entering the process and the hydrolysis temperature. The ratio of EFB and PMF entering the process affects the conversion efficiency due to different cellulose, hemicellulose, and lignin compositions (Wongwatanapaiboon et al. 2012); the pretreatment hydrolysis temperature affects the effectiveness of the hydrolysis process effectiveness and the ethanol conversion efficiency. A high hydrolysis temperature is favorable for cellulose conversion (Mekala et al. 2014), but at the same time contributes to the operating cost. Other variables such as residence time, acid concentration, enzyme loading ratio, and solid-medium ratio are assumed constant in this study as they are not affected by the variation in resource allocation. The output of ANN-2 is the biomass-to-ethanol conversion efficiency.

ANN-3 models the double-effect absorption chiller that recovers steam from a biomass boiler to generate chilled water. Absorption chiller is a green technology that utilizes waste heat in the form of hot water, steam, or flue gas for the generation of chilled water, hence reducing the electricity consumption required by the commercial electric chiller (Chan et al. 2017). Chilled water is a crucial utility in any industry for process cooling, space cooling, or material preservation purposes (Chan et al. 2019). The use of biomass to drive the absorption chiller has proved to be more desirable for industries compared to other sources of energy (Chan et al. 2020). In this work, the inputs of ANN-3 are steam temperature, chilled water temperature, ambient temperature, and the part load ratio. The output of ANN-3 is the coefficient of performance of the absorption chiller, which depicts the steam consumption per unit of cooling power.

The number of data used to train the ANN model for the reactors is 850 data for ANN-1, 30 data for ANN-2, and 720 data for ANN-3 (Appendix 1). However, it should be noted that the main focus of this work is to demonstrate the application of the resource allocation system in a biorefinery rather than the accuracy of unit operation modeling. Upon collecting the data in Table 1, the ANNs are trained using the neural network input-output and curve fitting app in MATLAB R2017b. A default setting is used in modeling the unit operations (training, validation, and testing percentages are set to 70%, 15%, and 15%, respectively, with 10 hidden neurons). In this study, the Bayesian regularization algorithm is selected for ANN training because it can result in good generalization for difficult, small, or noisy datasets (MacKay 1992). Mean squared error is used as an indicator to evaluate the performance of the ANN model. After ANN training, a MATLAB function of the ANN with matrix and cell array argument support is generated to be used combined with the overall network modeling in “Overall network modeling” Eqs. (7), (16), and (19). The MSE obtained is 6.85e−11 for ANN-1, 1.05e−4 for ANN-2, and 1.31e−4 for ANN-3.

Overall network modeling

DNN is used to determine the values of output nodes upon detecting changes in the parameters of input nodes (Fig. 2), so that a new optimal resource allocation scheme can be devised instantly during the sudden disruptions in the parameters. In this section, mathematical modeling equations are used to relate the parameters and variables listed in Fig. 2 to the overall network.

Fig. 2
figure 2

NNC representation

The overall network boundary begins from the biomass feedstock supplied by the palm oil mill to the generation of end products such as ethanol, steam, and chilled water. Equations (1)–(3) describe the mass balance of biomass from the palm oil mill. Set b is used to describe the set of biomass feedstock comprising EFB (b = 1), PMF (b = 2), and PKS (b = 3).

$$ {m}_b^{\mathrm{BM}\_\mathrm{FUEL}}={m}_b^{\mathrm{BM}}{\varphi}_b^{\mathrm{BM}\_\mathrm{FUEL}}\kern7.5em \forall b\in B $$
(1)
$$ {m}_b^{\mathrm{BM}\_\mathrm{ETH}}={m}_b^{\mathrm{BM}}{\varphi}_b^{\mathrm{BM}\_\mathrm{ETH}}\kern7pc \forall b\in B $$
(2)
$$ {m}_b^{\mathrm{SELL}}={m}_b^{\mathrm{BM}}-{m}_b^{\mathrm{BM}\_\mathrm{ETH}}-{m}_b^{\mathrm{BM}\_\mathrm{FUEL}}\kern3.7pc \forall b\in B $$
(3)

where \( {\varphi}_b^{\mathrm{BM}\_\mathrm{ETH}} \) and \( {\varphi}_b^{\mathrm{BM}\_\mathrm{FUEL}} \) are the ratios of biomass to the ethanol conversion process and boiler operation, respectively; these ratios are determined using the NDE algorithm, and they are within the scale of 0 to 1. \( {m}_b^{\mathrm{BM}} \) is the mass flow rate of biomass from the palm oil mill; \( {m}_b^{\mathrm{BM}\_\mathrm{FUEL}} \), \( {m}_b^{\mathrm{BM}\_\mathrm{ETH}} \), and \( {m}_b^{\mathrm{BM}\_\mathrm{SELL}} \) are the mass flow rates of biomass to boiler, ethanol conversion process, and selling.

Boiler fuel is one of the possible pathways for biomass utilization. By referring to Table 1, the biomass boiler efficiency (ηBOILER) is affected by various inputs which is a function of mass flow rate, composition, and moisture content of biomass. Equation (4) determines the total mass flow rate of biomass utilized as boiler fuel (mBM _ FUEL).

$$ {m}^{\mathrm{BM}\_\mathrm{FUEL}}={\sum}_{b\in B}{m}_b^{\mathrm{BM}\_\mathrm{FUEL}} $$
(4)

Equation (5) describes the derivation of biomass boiler fuel energy content (PFUEL). Equation (6) derives the boiler part load ratio (φPL _ BOILER), which is defined as the ratio of boiler load to boiler maximum capacity.

$$ {P}^{\mathrm{FUEL}}=\frac{\sum_{b\in B}{m}_b^{\mathrm{BM}\_\mathrm{FUEL}}{HHV}_b^{\mathrm{FUEL}}}{m^{\mathrm{BM}\_\mathrm{FUEL}}} $$
(5)
$$ {\varphi}^{\mathrm{PL}\_\mathrm{BOILER}}=\frac{P^{\mathrm{FUEL}}}{P^{\operatorname{MAX}\_\mathrm{BOILER}}} $$
(6)

where \( {HHV}_b^{\mathrm{FUEL}} \) is the higher heating value of biomass and PMAX _ BOILER is the maximum capacity of the biomass boiler.

Equation (7) describes the surrogate modeling of the biomass boiler, whereby the boiler efficiency is determined based on the ANN-1 inputs such as biomass moisture content (φBM _ MC), ambient temperature (TAMB), steam temperature (TBOILER), and part load ratio (φPL _ BOILER). Equation (8) describes the derivation of actual output from the biomass boiler (PBOILER) after accounting the boiler efficiency (ηBOILER).

$$ {\eta}^{\mathrm{BOILER}}={f}_{\mathrm{ANN}\_1}\left({\varphi}^{\mathrm{BM}\_\mathrm{MC}},{T}^{\mathrm{AMB}},{T}^{BOILER},{\varphi}^{\mathrm{PL}\_\mathrm{BOILER}}\right) $$
(7)
$$ {P}^{\mathrm{BOILER}}={\eta}^{\mathrm{BOILER}}{P}^{\mathrm{FUEL}} $$
(8)

where ηBOILER is the efficiency of the biomass boiler obtained from ANN-1 (Table 1). fANN _ 1 represents the function model of ANN-1.

Equations (9)–(11) describe the energy balance of steam from the biomass boiler to ethanol conversion process (PBOILER _ ETH), ARS (PBOILER _ ARS), and steam demand (PBOILER _ STEAM).

$$ {P}^{\mathrm{BOILER}\_\mathrm{ETH}}={P}^{\mathrm{BOILER}}{\varphi}^{\mathrm{BOILER}\_\mathrm{ETH}} $$
(9)
$$ {m}_b^{\mathrm{BM}\_\mathrm{ARS}}={m}_b^{\mathrm{BM}}{\varphi}_b^{\mathrm{BOILER}\_\mathrm{ARS}} $$
(10)
$$ {P}^{\mathrm{BOILER}\_\mathrm{STEAM}}={P}^{\mathrm{BOILER}}-{P}^{\mathrm{BOILER}\_\mathrm{ETH}}-{P}^{\mathrm{BOILER}\_\mathrm{ARS}} $$
(11)

where φBOILER _ ETH and φBOILER _ ARS are the ratio of boiler steam to the ethanol conversion process and ARS, respectively; they are also determined using the NDE algorithm.

Ethanol conversion is the second pathway for the biomass. Note that PKS is not available for this pathway because it has low cellulose content and high lignin content which is more suitable to be used as fuel. Equations (12)–(13) describe the derivation of the total biomass feedstock mass flow rate to ethanol conversion process (mBM _ ETH) and each biomass ratio in the feedstock (\( {\varphi}_b^{\mathrm{BM}\_\mathrm{ETH}} \)).

$$ {m}^{\mathrm{BM}\_\mathrm{ETH}}={\sum}_{b\in B}{m}_b^{\mathrm{BM}\_\mathrm{ETH}} $$
(12)
$$ {\varphi}_b^{\mathrm{BM}\_\mathrm{ETH}}=\frac{m_b^{\mathrm{BM}\_\mathrm{ETH}}}{m^{\mathrm{BM}\_\mathrm{ETH}}}\kern7pc \forall b\in B $$
(13)

Equation (14) describes the derivation of the total mass flow rate of the mixture (mMIX _ ETH) for the pretreatment and hydrolysis process. Equation (15) describes the reaction temperature (TETH) during the hydrolysis process utilizing the steam produced from the biomass boiler (PBOILER_ETH).

$$ {m}^{\mathrm{MIX}\_\mathrm{ETH}}=\frac{m^{\mathrm{BM}\_\mathrm{ETH}}}{\varphi^{\mathrm{BM}\_\mathrm{ETH}}} $$
(14)
$$ {T}^{\mathrm{ETH}}={T}^{\mathrm{AMB}}+\frac{P^{\mathrm{BOILER}\_\mathrm{ETH}}}{m^{\mathrm{MIX}\_\mathrm{ETH}}{\mathrm{Cp}}^{\mathrm{MIX}\_\mathrm{ETH}}} $$
(15)

where φBM _ ETH is the ratio of biomass in the mixture of solution containing other substances such as sulfuric acid and water. The composition of biomass in the mixture is obtained from reference Mafe et al. (2015). TAMB is the ambient temperature and CpMIX _ ETH is the specific heat content of the mixture.

Equation (16) describes the surrogate modeling of the ethanol conversion process, whereby the efficiency is determined based on the ANN-2 inputs such as the ratio of EFB (\( {\varphi}_{b=1}^{\mathrm{BM}\_\mathrm{ETH}} \)), the ratio of PMF (\( {\varphi}_{b=2}^{\mathrm{BM}\_\mathrm{ETH}} \)), and hydrolysis temperature (TETH). Equation (17) describes the derivation of ethanol generation after accounting the conversion efficiency.

$$ {\eta}^{\mathrm{ETH}}={f}_{\mathrm{ANN}\_2}\left({\varphi}_{b=1}^{\mathrm{BM}\_\mathrm{ETH}},{\varphi}_{b=2}^{\mathrm{BM}\_\mathrm{ETH}},{T}^{\mathrm{ETH}}\right) $$
(16)
$$ {m}^{\mathrm{ETH}}={\eta}^{\mathrm{ETH}}{m}^{\mathrm{BM}\_\mathrm{ETH}} $$
(17)

where ηETH is the efficiency of the overall ethanol conversion process obtained from ANN-2.

ARS utilizes steam from the biomass boiler for chilled water generation. Equation (18) calculates the part load ratio of ARS (φPL _ ARS), which is defined as the ratio of actual of thermal load to maximum thermal capacity of ARS.

$$ {\varphi}^{\mathrm{PL}\_\mathrm{ARS}}=\frac{P^{\mathrm{BOILER}\_\mathrm{ARS}}}{P^{\operatorname{MAX}\_\mathrm{ARS}}} $$
(18)

where PMAX _ ARS is the maximum thermal load capacity of ARS.

Equation (19) describes the surrogate modeling of ARS, whereby the coefficient of performance (COPARS) is determined based on the ANN-3 inputs such as steam temperature (TBOILER), chilled water temperature (TCHW), ambient temperature (TAMB), and part load (φPL _ ARS). Then, the chilled water output (PCHW _ ARS) is determined using Eq. (21).

$$ {COP}^{\mathrm{ARS}}={f}_{\mathrm{ANN}\_3}\left({T}^{\mathrm{BOILER}},{T}^{\mathrm{CHW}},{T}^{\mathrm{AMB}},{\varphi}^{\mathrm{PL}\_\mathrm{ARS}}\right) $$
(19)
$$ {P}^{\mathrm{CHW}\_\mathrm{ARS}}={COP}^{\mathrm{ARS}}{P}^{\mathrm{BOILER}\_\mathrm{ARS}} $$
(20)

Net profit evaluation

In this work, the net profit of the overall network takes into account the profit generated from the selling of ethanol and raw biomass, the penalty cost from unmet demand for ethanol, chilled water, and steam.

Equations (21) and (22) describe the calculation of hourly profit from ethanol (PfETH) and raw biomass (\( {Pf}_b^{\mathrm{BM}} \)).

$$ {Pf}^{\mathrm{ETH}}={C}^{\mathrm{ETH}}{m}^{\mathrm{ETH}} $$
(21)
$$ {Pf}_b^{\mathrm{BM}}={C}_b^{\mathrm{BM}}{m}_b^{\mathrm{FEED}}\kern7pc \forall b\in B $$
(22)

where CETH and \( {C}_b^{\mathrm{BM}} \) are the selling prices of ethanol and biomass per unit mass.

Equations (23)–(25) describe the calculation of hourly penalty cost from unmet demand of ethanol (CostETH), steam (CostSTEAM), and chilled water (CostCHW).

$$ {Cost}^{\mathrm{ETH}}={\alpha}^{\mathrm{ETH}}{C}^{\mathrm{ETH}}\left({m}^{\mathrm{DEM}\_\mathrm{ETH}}-{m}^{\mathrm{ETH}}\right) $$
(23)
$$ {Cost}^{\mathrm{STEAM}}={\alpha}^{\mathrm{STEAM}}{C}^{\mathrm{STEAM}}\left({P}^{\mathrm{DEM}\_\mathrm{STEAM}}-{P}^{\mathrm{BOILER}\_\mathrm{STEAM}}\right) $$
(24)
$$ {Cost}^{\mathrm{CHW}}={\alpha}^{\mathrm{CHW}}{C}^{\mathrm{CHW}}\left({P}^{\mathrm{DEM}\_\mathrm{CHW}}-{P}^{\mathrm{CHW}\_\mathrm{ARS}}\right) $$
(25)

where α is the penalty factor for unmet demand; mDEM _ ETH is the mass demand of ethanol; PDEM _ STEAM is the power demand of steam; PDEM _ CHW is the power demand of chilled water; CSTEAM is the purchase cost of steam; CCHW is the purchase cost of chilled water.

Equation (26) describes the net profit in this model, which is the hourly net profit (NPf). Then, NPf will be used to calculate the fitness value in “Neuro differential evolution.”

$$ NPf={Pf}^{\mathrm{ETH}}+{\sum}_{b\in B}{Pf}_b^{\mathrm{BM}}-{Cost}^{\mathrm{ETH}}-{Cost}^{\mathrm{STEAM}}-{Cost}^{\mathrm{CHW}} $$
(26)

For the mathematical optimization approach, a nonlinear programming (NLP) solver is used to perform optimization on the variables (\( {\varphi}_b^{\mathrm{BM}\_\mathrm{ETH}} \), \( {\varphi}_b^{\mathrm{BM}\_\mathrm{BOILER}} \), TBOILER, φBOILER _ ETH, φBOILER _ ARS) based on the maximization of NPf. Whereas for the NDE approach, these variables will be decided by the DNN generated using the NDE algorithm.

Neuro Differential Evolution (NDE)

The function of DNN is to improvise a new optimal resource (biomass in this case) allocation network and steam upon detecting changes in input variable such as biomass amount, biomass properties, product demand, and ambient temperature (Fig. 2). NDE is used to evolve the DNN’s connection weight and topology such as its connection pattern, the number of connections, and number of hidden nodes. Leaky ReLU is used as the default activation function for the DNN. The detailed methodology of NDE is summarized in Fig. 3.

Fig. 3
figure 3

DNN-NDE methodology flowchart (DE = differential evolution; GA = genetic algorithm)

In the first step, the settings of NDE including probability of node addition, crossover, connection addition, and weight mutation are defined for the simulation. Then, a matrix consisting of nine inputs (columns) and 500 distinct states (rows) are generated. The inputs in the 500 distinct states are randomized and normalized values between predefined hypothetical operating ranges (Table 2). Followed by that, a population of 200 individuals is initialized whereby each individual contains a DNN with the same topology but randomized weight. Based on the input values, the output values of each individual DNN can be obtained for the 500 distinct states of inputs. These input and output values are then used in sections “Surrogate modeling of unit operations using ANN” to “Net profit evaluation” to evaluate the net profit (NPf). The fitness function is determined by averaging the net profit from the 500 distinct states.

Table 2 Minimum and maximum boundary of input data

At this stage, each individual DNN carries a value for the fitness function and they are sent for mutation and crossover. Differential evolution is first performed on the synaptic weight of each individual DNN. It generates new weight by adding a weighted difference weight between two individual DNNs to a third individual DNN. The resulting advantages include the minimization of nonlinear and non-differentiable continuous space functions and faster convergence of solutions. Then, stochastic universal sampling is performed to select parents for crossover in the ANN topology. The offspring will undergo probability-based mutation events such as the enabling and disabling of specific connections, the addition of hidden nodes, and connections.

After crossover and mutation, the offspring are passed on to the next generation whereby they will be mixed with individuals from the new population. The percentage of old and new population in the next generation is self-defined. The entire cycle is repeated until the following stop conditions are achieved: (1) The fitness function stays stagnant within a specific threshold for a given number of generations, and (2) the maximum number of generations are met. Detailed methodology of DE, NDE, and NEAT can be referred to in the following literature: Price et al. (2005), Mason et al. (2017), and Stanley and Miikkulainen (2002), respectively.

Result and discussion

The minimum and maximum boundaries of the input data used in the DNN training are tabulated in Table 2. The prices of products, utility, fuels, and biomass are summarized in Table 3. The rest of this section is presented as follows: (1) NDE training performance and (2) DNN and NLP performance evaluation. In this section, optimality is used as a quantifiable measure to compare DNN and NLP, and it measures how close the net profit is compared to NLP by dividing the net profit of DNN to that of NLP.

Table 3 Resource prices (Foo et al. 2017)

NDE training performance

The machine used for the computation is Illeagear Raven-SE with 10th gen. Intel i5-10300H/i7-10750H, 16GB DDR4 2933 MHz RAM. During the training process of DNN using NDE, the performance of the process is evaluated based on the optimality and duration it took for the training. Both performances can be affected by different probabilities of connection addition, node addition, weight mutation, and crossover in the NDE settings. In order to study the relationship between these parameters and the NDE performance, the fitness value and training duration against generation are plotted for different probabilities. Finally, the DNN topology is displayed for the NDE settings with the highest fitness value.

Based on Fig. 4, the optimum NDE settings for connection addition, node addition, weight mutation, and crossover probability are 0.04, 0.003, 0.6, and 0.8, respectively. The first three studies are categorized under mutation but in different aspects (connections, hidden nodes, and weight), while the fourth study focused on the crossover. In mutation studies (which color line), a long duration is needed to arrive at the optimum solution if the mutation probability is too low as shown in Fig. 4 (e.g., P (connections) = 0.02, P (nodes) = 0.001, P (weight) = 0.2, and P (crossover) = 0.4). In contrast, if the mutation rate is too high (which color line), the search space increases but it is difficult to arrive at a better fitness value because the search is done coarsely near the parents (Geretti and Abramo 2011). This explains why the plots for large mutation probabilities tend to perform poorly or stay stagnant after a certain generation (e.g., P (connections) = 0.06 and 0.08 in Fig. 4a, P (nodes) = 0.005 and 0.007 in Fig. 4b, P (weight) = 0.8 in Fig. 4c). In a crossover study, a low crossover probability depicts a slower rate to arrive at an optimum solution. However, a crossover probability of 1 means that the new generation is composed entirely of the offspring from the previous generation. This is unfavorable for the simulation if the individuals in the starting generation do not possess the genes needed for an optimal solution.

Fig. 4
figure 4

Fitness value against generation for mutation studies. a Connection addition, b node addition, c weight mutation probability, d crossover probability (P = probability)

When the species with maximum fitness stays stagnant within a threshold of 0.01 for more than 20 generations, its fitness value will be reduced to zero and eliminated. Then, the champion of other species with more than five networks remained unchanged and was copied into the next generation. At the same time, only the top two species are allowed to reproduce in the given situation. This explains the sudden drop of fitness value and the gradual increase after the sudden drop in some of the figures. These features are part of the algorithm in NDE to prevent stagnation during reproduction and to refocus the species after the elimination of the stagnant species.

Overall, the training duration varies between 150 and 200 min for 3000 generations (Fig. 5). Using the optimum NDE settings, a DNN is evolved for the biorefinery DRE problem using NDE. The training process is run continuously until the fitness value becomes constant. Based on Fig. 6c, the highest achievable fitness value is 2137 USD/h at generation 13,000. Note that the fitness value increases rapidly during the initial 3000 generations. After that, the rate of increase slows down and eventually becomes constant at a fitness value of 2110 USD/h during the 12,000th generation. Aside from that, the number of connections and hidden nodes is seen to increase constantly throughout the generations (Fig. 6a, b) Therefore, it can be drawn that the increase in the number of connections and hidden nodes allows the DNN to obtain the nonlinear relationship between the input and output nodes that can lead to a high fitness value. The evolved DNN consists of 130 hidden nodes and 550 connections (Fig. 7).

Fig. 5
figure 5

Training duration against generation for mutation study. a Connection addition, b node addition, c weight mutation probability, d crossover probability (P = probability)

Fig. 6
figure 6

NDE training using optimum configuration: a connections against generation, b hidden nodes against generation, c fitness value against generation

Fig. 7
figure 7

Optimum DNN evolved from NDE

DNN and NLP performance

The main task of the DNN is to allocate steam and biomass based on the different set of randomized input values in the range defined in Table 2. In every industry, it is important to ensure a smooth operation and at the same time maximize profit. In this section, DNN is used to compute the fitness value for 100 states of inputs that are different from the 500 states of inputs used in the NDE training process. The fitness values and response time of DNN are compared against the nonlinear programming (NLP) solver in Matlab where optimization is done individually on each of the 100 states of inputs to find the global optimum fitness value. The response time is measured by the convergence duration needed for the solver or DNN to process one input state. The optimization results from DNN and NLP are tabulated in Table 4.

Table 4 Optimization results from NLP and DNN

Both NLP solver and DNN have their advantages and drawbacks. Using the NLP solver, the optimality of the results is guaranteed but the response time is significantly longer as compared to the DNN (Appendix 2). This is a drawback for unit operations that have a short cycle time or frequent fluctuations in parameters. Based on Table 4, the NLP solver is only able to respond to an existing state after a duration of 7.81 to 55.04 s. The difference between the shortest and longest response times may be contributed by the complexity of the resource allocation variables. Any changes in parameters between this timeframe are unable to be processed due to the ongoing optimization. On the other hand, DNN has a much shorter response time (ranging from 0.08 to 0.20 s) but it yields lower average optimality (97.7%) as compared to the NLP solver which gives a global optimum solution. Optimality is defined as the ability to be optimal, and it is calculated by dividing the average fitness of DNN to that of the NLP solver. The distribution of optimality over the hundred sets of data is shown in Fig. 8. Based on the figure, the optimality varies between 91 and 100%. However, the distribution is concentrated in the range of 98 to 99%. Overall, the results proved that DNN is effective in biorefinery resource allocation as it is able to ensure fast response and high profitability.

Fig. 8
figure 8

Histogram of DNN optimality

Conclusion and future work

In this work, the NDE algorithm is applied to evolve a DNN for the optimization of resource allocation in a biorefinery. The optimal NDE settings for mutation and crossover probability are first determined. The response time and optimality of DNN are compared to the solution obtained from the NLP solver. The response time of DNN is 99.5% faster than NLP solver but it yields a lower optimality (97.7%). In terms of process engineering, the resource allocation provided by NDE-DNN provides a swift response to any changes in input but at the expense of lower optimality. The selection of which method depends mainly on the cycle time of unit operations and the time interval of parameter fluctuations. Future work may consider the detailed study on the performance of NDE-DNN to contribute to the higher-accuracy model. Besides, the adoption of the HyperNEAT algorithm to evolve a large-scale DNN will also be considered so that complex processes that have more process parameters can be taken into account.