Format And Type Fonts CHEMICAL ENGINEERING TRANSACTIONS VOL. 45, 2015 A publication of The Italian Association of Chemical Engineering www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Jiří Jaromír Klemeš, Sharifah Rafidah Wan Alwi, Jun Yow Yong, Xia Liu Copyright © 2015, AIDIC Servizi S.r.l., ISBN 978-88-95608-36-5; ISSN 2283-9216 DOI: 10.3303/CET1545299 Please cite this article as: Moreno-Benito M., Dombayci C., Espuña A., Puigjaner L., 2015, Integrated process and plant design optimization of industrial scale batch systems: addressing the inherent dynamics through stochastic and hybrid approaches, Chemical Engineering Transactions, 45, 1789-1794 DOI:10.3303/CET1545299 1789 Integrated Process and Plant Design Optimisation of Industrial Scale Batch Systems: Addressing the Inherent Dynamics through Stochastic and Hybrid Approaches Marta Moreno-Benito a , Canan Dombayci b , Antonio Espuña b , Luis Puigjaner* b a Centre for Process Systems Engineering, University College London (UCL), Torrington Place, London WC1E 7JE, UK b Department of Chemical Engineering, Universitat Politècnica de Catalunya, Av. Diagonal, 647, 08028 Barcelona, Spain luis.puigjaner@upc.edu This work explores stochastic and hybrid solution approaches for dealing with the problem of integrated batch process development and plant design. The simultaneous optimization of batch process synthesis, task allocation and plant design has been formulated in the literature as a mixed-logic dynamic optimization (MLDO) problem, including dynamic control profiles, continuous variables, integers and Booleans as degrees of freedom. In industrial scale situations, this formulation leads to numerically intractable problems when mathematical programming solution strategies are used. So, this work presents a 2-step approach that combines a differential genetic algorithm (DGA) with a deterministic direct- simultaneous solution that transforms the problem into a non-linear programming (NLP) problem. The core idea is to combine in the DGA chromosomes the multiple decisions that characterize the problem, and then to use the solution obtained for reducing the complexity of this highly non-linear problem, so it can be managed by standard deterministic solvers. A comparative study of the stochastic and hybrid strategies with the purely deterministic solution is made for the specific case of primary copolymerization for acrylic fibre production. The results show that local optimal solutions of the deterministic method can be beaten by the proposed optimization strategy, becoming a suitable option for solving cases of industrial size. 1. Introduction Nowadays, the chemical industry faces tight and changing production environments, which require an agile introduction of new or modified products into manufacturing facilities through sustainable and viable production processes. A traditional response to face unsteady market requirements is the use of batch processes by exploiting their inherent flexibility and adaptability (Rippin, 1993). Moreover, the integration of process synthesis, task allocation, and plant design constitutes a crucial step to guarantee fully functional and optimally operated plants at a wide range of working regimes (Moreno-Benito and Espuña, 2011). Typical examples are polymerization processes, which are usually characterized by a strong synergy among the aforementioned sub-problems due to: (i) the complexity of the involved reaction system, (ii) the existing interactions between polymerization and downstream tasks, and (iii) the influence of multiple interplay between processing decisions over global economic and environmental targets. On the one hand, the compromise between productivity and polymer quality is strongly affected by physicochemical phenomena, like gel and glass effects, which are depending on processing times and operating conditions, e.g. reactor temperature and monomer feeding profiles (Lima et al., 2009). On the other hand, there exist key processing interactions in polymerization processes that highly affect the outcome; e.g., large reaction yields allow the elimination of polymer-solvent separation, and the environmental and economic targets are strongly influenced by the selection of organic versus aqueous solvents (Gol'dfein and Zyubin, 1990). However, the simultaneous process synthesis, task allocation, and plant design must face several difficulties, underlining the mathematical and computational complexity for modelling and solving the holistic problem. In particular, the batch nature of the process requires dynamic models to represent variable profiles, the combination of task and equipment networks, and the use of qualitative integer or 1790 logical variables to contemplate decisions associated to the selection of chemicals and process stages, among others. The problem can be addressed by means of optimization-based approaches, for example using mixed-logic or mixed-integer dynamic optimization (MLDO and MIDO, respectively) formulations, characterized by a high rate of non-linear and non-convex elements, discrete events, and discrete variables. These complexities have led to simplifications of the problem by means of decomposition solution strategies and the extended use of fixed processing recipes based on nominal conditions and laboratory/pilot plant tests, losing a significant part of the interaction between the multiple degrees of freedom. Besides, other simplifications in the process models, like linearizations, may be a source of suboptimal or even unfeasible solutions. In this work, we propose the use of an integrated MLDO model that incorporates batch process and plant design decisions and their simultaneous solution using an optimization approach based on differential genetic algorithms (DGAs). This is presented as a powerful alternative to deterministic solution methods due to their simple concept, plain structure, and independence of gradient information. 2. Integrated process and plant design of production systems In order to clarify the modelling implications for solving the integrated problem here studied, an example based on acrylic fibre production (Moreno-Benito, 2014) has been chosen. In this specific case, the aim is to quantify simultaneously the interactions among:  Process synthesis decisions: (a) selection of separation stage , (b) selection of solution or suspension polymerization technologies, (c) selection of an organic solvent DMF or an aqueous one NaSCN(aq) , (d) recirculation of solvent / suspension medium and un-reacted monomer , (e) optimal feed-forward trajectories of control variables –i.e. monomer feed rate , recirculation , output flow rate and temperature in reactors , distillate and polymer output flow rates in evaporator and duration of batch operations constituted by and approximating the dynamics of stages load/unload, (f) input composition of monomers AN and VA and initiator AIBN to reactors , and (g) synchronization of flow rates , compositions , duration of transfer operations in consecutive process and storage units;  Task allocation decisions: (h) processing and storage units selection and (i) batch sizing , which is determined by the number of batches in problems with a given demand;  Plant design decisions: (j) equipment sizing . Overall, the optimization problem seeks to determine the best solution for producing a given demand in a maximum time horizon according to capital and operational cost metrics and quality constraints. 3. Optimization-based approach The integrated process and plant design problem is here formulated as a MLDO problem, where qualitative information is represented by Booleans and logical propositions and the transient behaviour of batch tasks is represented by hybrid discrete/continuous models , composed of stages and dynamic control variables (Moreno-Benito, 2014). Essentially, the problem is summarized as: , (1) where and represent continuous and integer decisions, and correspond to differential and algebraic process variables respectively, are continuous variables and are process parameters. Systematic transformation procedures can be used to reformulate the model into a mixed-integer dynamic one (MIDO), and then into a MINLP one, in order to finally apply one of the state-of-the art MINLP solvers currently available –the interested reader is addressed to Moreno-Benito (2014). Since deterministic optimisation strategies are mostly based on gradient analysis, the solution of the integrated problem of Eq(1) faces some difficulties due to the presence of large number of non-linear and non-convex terms, integers and binaries. In the literature, multiple simplifications of the problem have been studied in order to successfully apply deterministic solution procedures, like process-performance models, algebraic relaxations, and the approximation of discrete decisions to continuous variables. Even though it 1791 has been proved that the integrated formulation can be solved through deterministic approaches (Moreno- Benito, 2014), the abovementioned difficulties still limit the size of the problem that can be considered. Therefore, stochastic strategies are posed as a promising alternative, consisting of heuristics that use random search procedures to reach near-optimal solutions. Particularly, genetic algorithms (GAs) rely on the solution improvement via adaptive search procedures that select and combine the best feasible solutions of each iteration and has been successfully applied to several mixed-integer linear and non-linear mathematical programming (MILP and MINLP, respectively) problems in process systems engineering – e.g. for a fed batch reactors (Grau et al., 2001) or large-scale systems (Victorino et al., 2009). Besides, the principal limitation of stochastic methods of not guaranteeing optimal solutions can be overcome through their combination with deterministic methods in hybrid approaches. One of the principal features of the integrated model of Eq(1) is the presence of dynamic control variables. These have been addressed using differential genetic algorithms (DGAs) introduced by Michalewicz et al. (1992), which include discretized dynamic control trajectories in the vector of decisions and constitute purely stochastic approaches for solving optimal control problems. Additionally, Sun et al. (2013) included concepts of the simplex method in a GA strategy for improving the local search and Qian et al. (2013) combined control vector parameterization (CVP) and a GA that approximated dynamic controls to polynomials iteratively. Regarding mixed-logic or mixed-integer dynamic optimization problems, Wongrat et al. (2011) proposed a hybrid solution method that solved discrete decisions with a GA and dynamic profiles with CVP. In contrast, Moreno-Benito and Espuña (2012) studied the incorporation of discrete decisions in DGAs to address qualitative decisions. 4. Application of stochastic and hybrid strategies based on DGAs The DGA studied in this work combines dynamic, continuous and discrete variables of the integrated problem in the chromosome, following the strategy by Moreno-Benito and Espuña (2012). The problem of Eq(1) is solved through its reformulation into a sequential modular model for quantifying the objective function and constraint fulfilment. 4.1 Decision variables The proposed chromosomes are composed of three sections, as illustrated in Figure 1: Part I with dynamic control profiles , Part II with continuous decisions and Part III with discrete variables and Dynamic variables representing monomer dosage and temperature in the principal stage are discretized following a piecewise-constant function with finite intervals and are represented in the chromosome by the value in each interval , while constant profiles are considered in initial load and final unload stages, defined by a constant value Booleans are represented by the corresponding binary values . It is worth noting that additional process knowledge introduced in the optimization model through logic propositions and disjunctions helps to reduce the problem combinatory but also can lead to an over-specification of logical decisions. In these cases, it is possible to eliminate decisions like from the chromosomes to adjust the number of degrees of freedom. The equipment size definition can be encompassed too, as it depends on the volume processed in each equipment unit and therefore on the input and output flow rates. Overall, the exhaustive set of decisions in Figure 1 can be reduced by eliminating these genes. Figure 1: Chromosome for process and plant design for acrylic fibre production. Dark grey and light grey gens indicate their total or partial elimination respectively to avoid the problem over-specification 1792 4.2 Sequential modular modelling and constraint handling The strength of evolutionary algorithms is their potential for exploring wide solution domains by generating diverse combinations of decision values with random procedures. Therefore, these strategies mostly rely on sequential modular modelling. As a result, the application of DGAs to constrained problems, where a desired or constrained output determines the definition of decision variables, requires constraint handling strategies to guarantee the feasibility of the optimization problem for a random combination of input values. Currently, a significant number of methodologies exist for dealing with inequality constraints in sequential modelling; their suitability depends on the problem linearity or non-linearity and on the cost and time that can be sacrificed (Shokrian and High, 2014). The so-called feasible search methods are based on the generation of feasible new solutions and can be applied in linear or convex constrained problems. Alternatively, repairing methods rely on the creation of sub-populations for specific constraint subsets and their combination to find completely feasible solutions. Finally, constraint violation elimination methods emerged as a better alternative for highly constrained non-convex problems. This group includes: (i) penalty terms, applied to solve problems with continuous, integer, and Boolean decisions, (ii) constraint dominancy strategies, which aim at avoiding local optima by using competing solutions to provide a search direction towards the feasible region, and (iii) overall-violation minimization methods, where the overall unfeasibility is minimized as another objective. From all these alternatives, static penalty terms are used in this work as a suitable tool in the non-convex scope of the MLDO problem studied. Namely, the following non-linear inequality constraints are considered: (1) product demand; (2) time horizon; (3) copolymer composition; (4) minimum monomer conversion required for eliminating the separation stage; (5) maximum equipment sizes; (6) empty final volumes; (7) exothermic operation, and (8) non-negativity processing volumes. Their penalty cost is calculated by: , (2) where are penalty weights. As for equality constraints that characterize recirculation loops, establishing dependence relations between input and output variables of processing units, these are addressed through traditional iterative loops during the evaluation of the processing model. Finally, all the constraints associated to logical propositions and disjunctive equations can be solved in sequential modular modelling by means of if-then-else clauses, since the definition of the search direction in DGAs does not rely on the evaluation of sensitivities and gradients. Following the notation of Eq(1), logical equivalence is transformed into algebraic equalities , logical implication into if-then clauses and disjunctions into if-then-else clauses 4.3 Stochastic optimization DGAs include the same steps as conventional GAs (Michalewicz et al., 1992): (i) initial population generation, (ii) fitness function evaluation and ranking, (iii) replication of individuals by crossover and mutation operators, and (iv) termination. As the objective in this work is to evaluate the potential of DGA strategies for solving the integrated problem independently, the first generation is produced randomly. Next, each individual is evaluated according to the equivalent problem defined by Eq(3) below, where the fitness function quantifies the objective function and penalties for violated inequality constraints ) with a positive value , in order to rank their solution performance: (3) The best individuals are selected to define next generations, until the termination criterion is reached. 4.4 Combination with deterministic NLP solvers Hybrid strategies allow combining the advantages of stochastic and deterministic approaches. In this work, the complete problem is first solved using a DGA and then the obtained solution is refined with a deterministic method by setting the solution as initial point and fixing the structural part of the problem. In particular, the deterministic step is solved through full discretization of the differential-algebraic equations using orthogonal collocation in finite elements to generate a NLP problem. The main advantages are: (i) the reformulation of the MLDO into a simpler NLP without discrete variables otherwise required for solving the holistic problem and (ii) providing the deterministic solver with a suitable initial solution. 1793 5. Numerical example This example addresses the integrated batch process and plant design for producing 5 tons of acrylic fibre with of 85 % of AN and 15 % of VA in bulk format through single-product campaign in a maximum time horizon of 144 h minimizing the total production cost and fulfilling quality constraints. In particular, the problem statement of Section 2 is solved for minimizing capital and operational expenses, namely equipment amortization, processing costs, raw material consumption and waste disposal costs expenses. Further details of this example can be found in Moreno-Benito (2014). The problem is implemented in Matlab 14b and solved with the GA of the Matlab Optimization Toolbox. It is solved using populations of 50 individuals, 5 elite solutions per generation, Laplace crossover with a selection of 80 % and power mutation. The algorithm terminates when the relative change in the best fitness of the last generation is below or equal to the tolerance 10 -6 or a number of 1000 generations is reached. The computational performance and solution goodness are summarized in Table 1 and Figure 2(a) for the three solution procedures: the purely deterministic approach where the MLDO model is reformulated into a MINLP, the stochastic DGA with static penalty terms, and its combination with a deterministic NLP. As it can be observed, the results of the DGA and hybrid approaches are extremely encouraging, providing the same process structure as the MINLP solution and improvements around the 24 % and 42 % respectively in terms of the selected cost-based objective. This confirms the difficulties faced by MINLP solvers to find global optimum solutions when a problem of the mathematical complexity of the integrated batch process and plant design case is addressed. Moreover, the results prove that despite the random component of evolutionary algorithms, their simplicity to search in a wide solution space leads to better decision values, especially if this is complemented with the solution refinement offered by deterministic solvers. Figure 2(b) illustrates the gradual improvement of the dynamic profiles, showing the relevance of the NLP for further adjusting the dynamic profiles. However, it is worth highlighting that the DGA terminates in this case by reaching the maximum number of generations, so it would be possible to obtain solutions with further improved dynamic profiles in the stochastic step. Although the stochastic and hybrid approaches are apparently more time-consuming in terms of computational effort, the results in Table 1 do not include the demanding manual procedure for adjusting the variable bounds of the MINLP model that allow the convergence of deterministic solvers; this step is straightforward in the stochastic and hybrid methods. Table 1: Comparison of optimization approaches. 1 Improvement over the deterministic solution Solution approach Fitness value Improvement 1 Total penalty CPU time Process structure MINLP 38,613 € - 0 0.12 h Solution technology, DMF, no separation (Vsolu,SDMF=true; Z2,R21=false) DGA 29,493 € 23.6 % 0 8.4–11.1 h DGA+NLP 22,447 € 41.9 % 0 8.4–11.1 h (a) (b) Figure 2: Evolution of the optimization strategies: (a) fitness function and (b) fragment of the best chromosome; it corresponds to monomer dosage in unit during operation Additionally, repairing methods for constraint handling have been tested, confirming their inefficiency for solving highly non-linear problems. The DGA has been applied with different population dimensions too; in 1794 most cases, the procedure reaches a good solution with zero total penalties, but not all of them provide the optimal structure. Since Figure 2(a) also shows very poor fitness function values in the first generations due to the penalty component, lower penalty factors could be used to avoid potential convergence of the DGA to local optima, at the risk of converging to unfeasible solutions. 6. Conclusions The stochastic and hybrid approaches presented in this paper constitute a powerful option to solve integrated problems like batch process development and plant design, whose mathematical complexity would otherwise require problem decomposition or recipe approximations. Both strategies, based on a DGA with random initial populations, provide very promising results, with improvements over the 40 % in the objective function compared to the solutions obtained with purely deterministic solvers, with no need of a manual adjustment step. This proves that local optima were obtained through the deterministic direct- simultaneous approach previously employed, which was very sensitive to variable bounds and found convergence difficulties due to the number of non-linear and mixed-integer terms. Particularly, the hybrid strategy is highlighted because, once the intermediate solution has been obtained in the DGA step, the use of a deterministic solver for further refining the dynamic and continuous decisions with a good variable initialization exhibits an outstanding performance. Besides, the static penalty method used for the reformulation of inequalities should be revised to guarantee that the DGA does not meet a local optimum. Several directions can be taken for further research, namely the use of adaptive penalty factors or other strategies that balance the order of magnitude of the objective function and the penalties in the fitness function. Additionally, other equations-oriented modelling frameworks with alternative constraint handling methods could be explored. The use of deterministic global solvers in this case should be also assessed. Acknowledgements Financial support from the Spanish Ministry of Economy and Competitiveness and the European Regional Development Fund (Project SIGERA, DPI2012-37154-C02-01), and from the Generalitat de Catalunya (AGAUR scholarship 2014 FI_B00305 and grant 2014-SGR-1092-CEPEiMA), is fully appreciated. References Gol'dfein M.D., Zyubin B.A., 1990, Kinetics and mechanism of the processes of preparing fibre-forming polymers based on acrylonitrile – Review. Polymer Science USSR, 32(11), 2145-2166. Grau M.D., Nougués J.M., Puigjaner L., 2001, Obtention of the Optimal Feeding Profile in a Fed-Batch Reactor Using Genetic Algorithms. Industrial & Engineering Chemistry Research, 40, 1488-1494. Lima N.M.N., Zuñiga L., Maciel Filho R., Manenti F., Manca D., Embiruçu M., 2009, Dynamic Optimization of MMA and VAc Copolimerization Process. Chemical Engineering Transactions, 17, 1383-1388. Michalewicz Z., Janikow C.Z., Krawczyk J.B., 1992, A modified genetic algorithm for optimal control problems. Computers & Mathematics with Applications, 23(12), 83-94. Moreno-Benito M., 2014, Integrated batch process development based on mixed-logic dynamic optimization, PhD thesis, UPC-BarcelonaTech, Barcelona, Spain. Moreno-Benito M., Espuña A., 2011, Facing new products demand through simultaneous structural and operational decisions in the design of control recipe. Chemical Engineering Transactions, 25, 423-428. Moreno-Benito M., Espuña A., 2012, Stochastic and hybrid approaches to solve integrated synthesis and operation of batch processes. Computer Aided Chemical Engineering, 30, 1332-1336. Qian F., Sun F., Zhong W., Luo N., 2013, Dynamic optimization of chemical engineering problems using a control vector parameterization method with an iterative genetic algorithm. Eng. Opt. 45, 1129-1146. Rippin D., 1993, Batch process systems engineering - A retrospective and prospective review. Computers & Chemical Engineering, 17(S), S1-S13. Shokrian M., High A.N., 2014, Application of a multi objective multi-leader particle swarm optimization algorithm on NLP and MINLP problems. Computers & Chemical Engineering, 60, 57-75. Sun F., Du W., Qi R., Qian F., Zhong W., 2013, A hybrid improved genetic algorithm and its application in dynamic optimization problems of chemical processes. Chin. J. Chem. Eng., 21(2), 144-154. Victorino I., Morais E., Agremis G., Maia J., Maciel Filho R., 2009, Analysis of Genetic Algorithm Operators in the Productivity of a Large Scale Process. Chemical Engineering Transactions, 17, 1353-1358. Wongrat W., Younes A., Elkamel A., Douglas P.L., Lohi A., 2011, Control vector optimization and genetic algorithms for mixed-integer dynamic optimization in the synthesis of rice drying processes. Journal of the Franklin Institute, 348(7), 1318-1338.