517
CHEMICAL ENGINEERING TRANSACTIONS Volume 21, 2010
Editor J. J. Klemeš, H. L. Lam, P. S. Varbanov
Copyright © 2010, AIDIC Servizi S.r.l., ISBN 978-88-95608-05-1 ISSN 1974-9791
DOI: 10.3303/CET1021087
Please cite this article as: Manenti F., Lima N.M.N., Zuñiga Liñan L. and Colombo S., (2010), Exploiting C++ polymorphism for
operational optimization of chemical processes, Chemical Engineering Transactions, 21, 517-522 DOI: 10.3303/CET1021087
Exploiting C++ polymorphism for operational
optimization of chemical processes
Flavio Manenti
1*
, Nadson M. N. Lima
2
, Lamia Zuñiga Liñan
2
, Simone Colombo
1
1
CMIC Dept. “Giulio Natta”, Politecnico di Milano, Piazza Leonardo da Vinci 32
20133 Milano, Italy
2
State University of Campinas (UNICAMP), Dept. of Chemical Processes
flavio.manenti@polimi.it
Object-oriented programming is more and more spreading in engineering and scientific
areas for some relevant benefits making it particularly appealing to write complex
codes. Nevertheless, the use of such a programming philosophy still encounters large
inertia in those areas characterized by a long programming experience and one of them
is engineering. This is mainly due to a set of existing models and subroutines wrote in
procedural (usually Fortran) language. The present paper is aimed at showing some
benefits coming from object-oriented programming applied to the field of process
optimization and specifically to the operational levels of supply chain management
paradigm such as nonlinear model predictive control (NMPC). Polymorphism is
exploited to provide a single solution for different NMPC techniques such as input
blocking, offset blocking, and -blocking.
1. Introduction
The optimization of unit operations and chemical processes has recently seen the
significant spreading of Nonlinear Model Predictive Control (NMPC) methodology
against other control alternatives (Qin and Badgwell, 2003; Bauer and Craig, 2008).
Success of NMPC is mainly due to the following reasons: it is intrinsically able to
manage nonlinearities in process dynamics and in profits (Manenti and Rovaglio, 2008;
Dones et al., 2010); it can be based on first-principles mathematical models and on
nonlinear semi-empirical models as well (Lima et al., 2009a; Lima et al., 2009b); it
allows solving simultaneously the predictive control and the dynamic optimization
(Zavala et al., 2005; Manenti et al., 2010). The basic architecture of NMPC has been
wide described in the literature (Morari and Lee, 1999; Rawlings, 2000; Findeisen and
Allgower, 2003). The plant provides raw data, which is reconciled (Bagajewicz, 2003;
Signor et al., 2010) and sent to NMPC at each sampling time. Specifically, the
reconciled data are sent to an optimization routine, which includes an objective
function, a dynamic model and, usually, according to the mathematical model type, a
numerical integrator to solve specific differential or differential-algebraic systems