Collocation Methods for Optimization in a Modelica Environment

Fredrik Magnusson
Department of Automatic Control, Lund University/Modelon AB, Lund, Sweden

Johan Åkesson
Department of Automatic Control, Lund University, Sweden

Ladda ner artikelhttp://dx.doi.org/10.3384/ecp12076649

Ingår i: Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany

Linköping Electronic Conference Proceedings 76:66, s. 649-658

Visa mer +

Publicerad: 2012-11-19

ISBN: 978-91-7519-826-2

ISSN: 1650-3686 (tryckt), 1650-3740 (online)


The solution of generic dynamic optimization problems described by Modelica; and its extension Optimica; code using direct collocation methods is discussed. We start by providing a description of dynamic optimization problems in general and how to solve them by means of direct collocation. Next; an existing implementation of a collocation algorithm in JModelica.org; using CasADi and IPOPT; is presented. The extensions made to this implementation are reported. The new implementation is compared to an old C-based collocation algorithm in JModelica.org in two benchmarks. The presented benchmarks are based on a continuously stirred tank reactor and a combined cycle power plant. The new algorithm and its surrounding framework is more flexible and shown to be several times more efficient than its predecessor.


dynamic optimization; JModelica.org; collocation; nonlinear programming; CasADi


[1] L. T. Biegler; Nonlinear Programming: Concepts; Algorithms; and Applications to Chemical Processes. MOS-SIAM Series on Optimization; Mathematical Optimization Society and the Society for Industrial and Applied Mathematics; 2010. doi: 10.1137/1.9780898719383.

[2] T. Binder; L. Blank; H. Bock; R. Bulirsch; W. Dahmen; M. Diehl; T. Kronseder; W. Marquardt; J. Schlöder; and O. Stryk; “Introduction to model based optimization of chemical processes on moving horizons;” in Online Optimization of Large Scale Systems: State of the Art (M. Grötschel; S. Krumke; and J. Rambau; eds.); pp. 295–340; Springer; 2001. doi: 10.1007/978-3-662-04331-8_18.

[3] J. Åkesson; K.-E. Årzén; M. Gäfvert; T. Bergdahl; and H. Tummescheit; “Modeling and optimization with Optimica and JModelica.org—languages and tools for solving large-scale dynamic optimization problem;” Computers and Chemical Engineering; vol. 34; pp. 1737–1749; Nov. 2010. doi: 10.1016/j.compchemeng.2009.11.011.

[4] J. Åkesson; “Optimica—an extension of Modelica supporting dynamic optimization;” in In 6th International Modelica Conference 2008; Modelica Association; Mar. 2008.

[5] J. Andersson; J. Åkesson; F. Casella; and M. Diehl; “Integration of CasADi and JModelica.org;” in 8th International Modelica Conference; Mar. 2011.

[6] F. Magnusson; “Collocation methods in JModelica.org;” Master’s Thesis ISRN LUTFD2/TFRT--5892--SE; Feb. 2012.

[7] J. T. Betts; Practical Methods for Optimal Control and Estimation using Nonlinear Programming. SIAM’s Advances in Design and Control; Society for Industrial and Applied Mathematics; 2nd ed.; 2010.

[8] E. Hairer and G. Wanner; Solving Ordinary Differential Equations II: Stiff and differentialalgebraic problems. Springer series in computational mathematics; Springer-Verlag; 2nd ed.; 1996.

[9] J. Andersson; J. Åkesson; and M. Diehl; “CasADi – A symbolic package for automatic differentiation and optimal control;” in Recent Advances in Algorithmic Differentiation (S. Forth; P. Hovland; E. Phipps; J. Utke; and A. Walther; eds.); Lecture Notes in Computational Science and Engineering; (Berlin); Springer; 2012.

[10] A. Wächter and L. T. Biegler; “On the implementation of a primal-dual interior point filter line search algorithm for large-scale nonlinear programming;” Mathematical Programming; vol. 106; no. 1; pp. 25–57; 2006. doi: 10.1007/s10107-004-0559-y.

[11] R. Parrotto; J. Åkesson; and F. Casella; “An XML representation of DAE systems obtained from continuous-time Modelica models;” in 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools; (Oslo; Norway); pp. 91–98; Oct. 3 2010.

[12] G. A. Hicks and W. H. Ray; “Approximation methods for optimal control synthesis;” The Canadian Journal of Chemical Engineering; vol. 49; no. 4; pp. 522–528; 1971. doi: 10.1002/cjce.5450490416.

[13] F. Casella; F. Donida; and J. Åkesson; “Objectoriented modeling and optimal control: A case study in power plant start-up;” in 18th IFAC World Congress; (Milano; Italy); Aug. 2011.

Citeringar i Crossref