Multiple-Shooting Optimization using the JModelica.org Platform

Jens Rantil
Lund University, Sweden

Johan Åkesson
Department of Automatic Control, Lund University, Sweden \ Modelon AB, Ideon Science Park, Sweden

Claus Führer
Lund University, Sweden

Magnus Gäfvert
Department of Numerical Analysis, Lund University, Sweden \ Modelon AB, Ideon Science Park, Sweden

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

Ingår i: Proceedings of the 7th International Modelica Conference; Como; Italy; 20-22 September 2009

Linköping Electronic Conference Proceedings 43:89, s. 757-764

Visa mer +

Publicerad: 2009-12-29

ISBN: 978-91-7393-513-5

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


Dynamic optimization addresses the problem of finding the minimum of a cost function subject to a constraint comprised of a system of differential equations. There are many algorithms to numerically solve such optimization problems. One such algorithm is multiple shooting. This paper reports an implementation of a multiple shooting algorithm in Python. The implementation is based on the open source platform JModelica. org; the integrator SUNDIALS and the optimization algorithm scipy_slsqp. The JModelica.org platform supports model descriptions encoded in the Modelica language and optimization specifications expressed in the extension Optimica. The Modelica/Optimica combination provides simple means to express complex optimization problems in a compact and useroriented manner. The JModelica.org platform in turn translates the high-level descriptions into efficient C code which can compiled and linked with Python. As a result; the numerical packages available for Python can be used to develop custom applications based on Modelica/Optimica specifications. An example is provided to illustrate the capabilities of the method.


Optimization; optimal control; parameter optimization; Modelica; Optimica; JModelica.org


[1] J. Åkesson; T. Bergdahl; M. Gäfvert; and H. Tummescheit. The JModelica.org Open Source Platform. In 7th International Modelica Conference 2009. Modelica Association; 2009.

[2] Johan Åkesson. Optimica—an extension of modelica supporting dynamic optimization. In In 6th International Modelica Conference 2008. Modelica Association; March 2008.

[3] L.T. Biegler; A.M. Cervantes; and A Wachter. Advances in simultaneous strategies for dynamic optimization. Chemical Engineering Science; 57:575–593; 2002. doi: 10.1016/S0009-2509(01)00376-1.

[4] H.G. Bock and K. J. Plitt. A multiple shooting algorithm for direct solution of optimal control problems. In Ninth IFAC world congress; Budapest; 1984.

[5] R. Bulirch. Die Mehrzielmethode zur numerischen Lösung von nichtlinearen Randwertproblemen und Aufgaben der optimalen Steuerung. Technical report; Carl-Cranz-Gesellschaft; 1971.

[6] Inc. Enthought. SciPy; 2009. http://www.scipy.org/.

[7] Python Software Foundation. ctypes: A foreign function library for Python; 2009. http://docs.python.org/library/ctypes.html.

[8] A. C. Hindmarsh; P. N. Brown; K. E. Grant; S. L. Lee; R. Serban; D. E. Shumaker; and C. S.Woodward. SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw.; 31(3):363–396; 2005. doi: 10.1145/1089014.1089020.

[9] J. Hunter; D. Dale; and M. Droettboom. matplotlib: python plotting; 2009. http://matplotlib.sourceforge.net/.

[10] Karl Henrik Johansson. Relay Feedback and Multivariable Control. PhD thesis; Department of Automatic Control; Lund Institute of Technology; Sweden; September 1997.

[11] Dieter Kraft. TOMP - Fortran modules for optimal control calculations. ACM Transactions on Mathematical Software; 20(3):262–281; 1994. doi: 10.1145/192115.192124.

[12] Dmitrey L. Kroshko. OpenOpt Home Page; 2009. http://www.openopt.org/Welcome.

[13] T. Maly and L. R. Petzold. Numerical methods and software for sensitivity analysis of differential-algebraic systems. Applied Numerical Mathematics; 20(1-2):57–82; 1996. doi: 10.1016/0168-9274(95)00117-4.

[14] T. Oliphant. Numpy Home Page; 2009. http://numpy.scipy.org/.

[15] A. Pfeiffer. Numerische Sensitivitätsanalyse unstetiger multidisziplinärer Modelle mit Anwendungen in der gradientenbasierten Optimierung (Numerical sensitivity analysis of discontinuous multidisciplinary models with applications in gradient based optimization). PhD thesis; Martin Luther University Halle-Wittenberg; 2008.

[16] Open Source Project. Pysundials. http://pysundials.sourceforge.net; May 2009.

[17] Open Source Project. Python programming language. http://www.python.org; May 2009.

[18] Open Source Project. Suite of nonlinear and differential/algebraic equation solvers (sundials). http://www.llnl.gov/casc/sundials/; May 2009.

[19] O. Rosen and R. Luus. Evaluation of gradients for piecewise constant optimal control. Comput. chem. Engng.; 15(4):273–281; 1991.

[20] J. Stoer and R. Bulirsch. Introduction to Numerical Analysis. Springer-Verlag; New York and Berlin; 1980.

[21] The Modelica Association. The Modelica Association Home Page; 2007. http://www.modelica.org.

[22] V. Vassiliadis. Computational solution of dynamic optimization problem with general differential-algebraic constraints. PhD thesis; Imperial Collage; London; UK; 1993.

Citeringar i Crossref