Evolution – From My Perspective

Hilding Elmqvist Dassault Systèmes Ideon Science Park, SE-223 70 Lund, Sweden [email protected]

Abstract mathematical expressions. I was just studying com- piler technology, so I considered this project perfect This paper intends to tell the story of Modelica for me. The result was Simnon (SIMulation of NON- (www.Modelica.org) from the author’s perspective. linear systems): (Elmqvist, 1975, 1977a). A novel It is a fantastic saga that for me started in April 1976. feature was that a mixture of continuous time and The saga includes studying the needs, the original discrete time systems could be simulated, i.e. perfect idea, the development of a solution, waiting for ma- for simulation of sampled data control systems ture hardware technology, a start-up company, a fan- which were becoming very important at that time. tastic collaboration, an automotive company caring However, I was not satisfied with the approach as for its software supplier, how to get momentum by a basis for my PhD thesis, since it was based on standards collaboration, forming the right team, and submodels with inputs and outputs. I therefore want- the magic phone call from the right company. ed to investigate the fundamentals of modeling which my professor Karl Johan Åström supported. In Keywords: Simnon; Dymola; Modelica; Physical April 1976, I was studying a report with about 200 Modeling; DAE; Modelica Association pages about a drum-boiler model written by Sture Lindahl (Lindahl, 1976). The report was very sys- tematic, showing how the equations were organized 1 Introduction for the drum, the super heaters, the turbines, etc., i.e. the approach was object oriented. The modeling In order to describe Modelica evolution it is im- started by stating the relationships as general equa- portant to start by describing Dymola, Dynamic tions. Then the derivations were shown how to put Modeling Language, since many of the original fea- them into state space form in order to be able to sim- tures of Modelica are taken from Dymola. ulate using Simnon. These derivations involved The paper then describes forming the company manual symbolic manipulation of individual equa- Dynasim and the important initial research collabora- tions to solve for the unknown, solving linear sys- tions. The initial Modelica design work and the tems of equations (see excerpt from report below), Modelica community are then discussed. The paper unrolling Newton´s algorithm a fix number of times ends with a discussion about Modelica future. Most to solve nonlinear systems of equations, and differ- of the material is presented in chronological order. entiating certain equations when there were con- For an overview of other simulation tools, see straints between differentiated variables (nowadays (Åström, et.al., 1998). called index reduction). I propose that other key contributors to Modelica evolution, Martin Otter, Peter Fritzson and many others, write similar papers from their perspectives in particular since this paper has a focus on the work before Modelica and gives my perspective.

2 Dynamic Modeling Language

When looking for a master thesis project in autumn 1971, the Automatic Control Department, Lund In- stitute of Technology wanted to develop a simulation program where the user could input the models using

DOI Proceedings of the 10th International ModelicaConference 17 10.3384/ECP1409617 March 10-12, 2014, Lund, Sweden Modelica Evolution - From My Perspective

solve for in each equation? The naïve approach is: Just before Easter 1976, I realized what I needed to look for equations with only one unknown, mark do: design a new language allowing general equa- those as known and repeat. The problem is that there tions, having a class concept for object oriented can be mutual dependencies, i.e. algebraic loops for modeling (I was used to so that was natural) which this approach does not work. And mutual de- and having a structured feature to describe interac- pendencies were normal in the way Lindahl did his tion between submodels (called cut). The language modeling, so the language could not be restricted to was called Dymola for DYnamic MOdeling LAn- avoid algebraic loops. I invented my own algorithms guage (Elmqvist, 1977a, 1978, 1979a, 1979b). using binary incidence matrices. However, these An example in the Dymola language of an elec- were O(n^3), so they would not scale. trical component is shown below. It describes a pin At that time one had to go to the university li- A characterized by an across variable Va and a brary to get help in doing a computerized literature through variable I. Pin B has correspondingly Vb. search (no Alta Vista or Google being available). I The through variable of B is also I but with a preced- found that graph theoretical algorithms were O(n). ing minus sign showing that the currents of pins A The graphs are bipartite, i.e. consists of two types of and B sum to zero. In Dymola, all variables were of nodes corresponding to equations and variables. An real type. The der operator is the same as in Modeli- edge between a variable and an equation means that ca. The path concept was introduced in order to al- the variable appears in that equation. A report from low operators for series-, parallel- and loop- the University of Umeå analyzed several algorithms connections. Such a concept is not used in Modelica for Assignment or matching which corresponded to since connections are typically drawn graphically. finding out what variable to solve for in each equa- tion. Furthermore, Tarjans algorithm would find strongly connected components in a directed graph corresponding to minimal systems of simultaneous equations and sort them into a sequence suitable for solving one system at a time, i.e. the incidence ma- trix becomes block lower triangular (BLT). Lindahl sometimes differentiated equations when Consider the following electrical circuit: potential states were constrained. The Jacobian is then always singular. I designed an algorithm to find what equations to differentiate and tested it success- fully on some small examples. Fortunately, Costas Pantelides and Sven Erik Mattsson later figured out suitable algorithms, (Pantelides (1988), (Mattsson, Söderlind, 1993). Using a library of “model types”: resistor, capacitor, To test the language ideas and the algorithms, I voltage and Common, the circuit could be described wrote a program in the object oriented programming as follows; language Simula, which is included in my thesis, (Elmqvist, 1978). I tested it successfully on a few examples from different domains: electronics, me- chanical, thermodynamics, and electrical power dis- tribution. As an example, the program found one system of equations for solving accelerations and forces of mechanical systems corresponding to the need to invert the mass matrix. The drum boiler model could now be formulated in 15 pages using original equations defined only once for each class and no need for manual symbolic manipulation of

the equations. The total model had about 250 non- The “to” operator means series connection and “par” trivial equations and 11 systems of simultaneous means parallel connection. equations. The trouble was then to figure out how to simu- But there was one big problem: lack of computer late such a model. I had used the symbolic package memory for symbolic manipulation. I was barely REDUCE and started to write symbolic manipula- able to translate the drum boiler model on a Univac tions in LISP. But how to know what variable to 1108 computer having only 64 kWords of 36 bits of

18 Proceedings of the 10th International ModelicaConference DOI March 10-12, 2014, Lund, Sweden 10.3384/ECP1409617 Keynote memory accessible for the user and the garbage col- I also met Peter Fritzson in the summer 1991 at a lector had to work hard. So the hardware technology computer language conference in Toronto and be- at that time was not mature enough for realistic in- came aware of his work on designing a modeling dustrial problems. language, ObjectMath, which combined features of After my thesis in May 1978 (Elmqvist, 1978), I Computer Algebra languages and Object Oriented spent one year as a post doc at Computer Science Programming. I successfully converted some Ob- Department at Stanford University. I took all the jectMath models to Dymola. courses in languages and compilers given by John These were two of the tipping points that made Hennessy (who later became President of Stanford me resume the work on Dymola since I understood University). Working in a compiler project regarding that there was finally an interest in equation based parametric types, (Hennessy, Elmquist, 1982) was a modeling. The third tipping point was the release of very useful experience. Windows 3.0 since the memory barrier of 640 I then returned to the Automatic Control depart- kBytes linear memory was removed. ment for a project on Languages for Implementation Cellier and I started to work together and we of Control Systems (LICS), (Elmqvist, 1985). In ad- wrote a paper for a CACE conference in Napa, Cali- dition to language elements, we also considered the fornia (Cellier, Elmqvist, 1992) which later became relations to graphics and were able to acquire a an article in IEEE Control Systems (Cellier, mouse. That gave valuable knowhow which later Elmqvist, 1993). I continued to make development became meta comments in Dymola and adopted in on the Pascal version of Dymola for some time and Modelica as graphical annotations. In order to used the p2c (Pascal to C) translator to facilitate us- achieve sufficient speed for navigating in hierar- ing a C compiler. Sven Erik Mattsson had given me chical structures, we developed special raster a copy of the article by Costas Pantelides about in- graphics hardware and a font generation program. dex reduction, (Pantelides, 1988). I incorporated this The LICS program was developed on a VAX-11 in Dymola for the paper. computer and ported to an Apollo DN 600 work- At the same conference, Sven Erik presented the station and demonstrated at the second IEEE Com- dummy derivative method including automatic state puter Aided Control Systems Design Symposium in selection after index reduction based on Pantelides 1983 at MIT with high interest since it showed sev- algorithm (Mattsson, 1992). eral novel interaction principles such as “information In Napa, I met Georg Grübel, DLR (Deutsches zooming”. Zentrum für Luft- und Raumfahrt) and learnt that During this project, we also translated the Dymo- Cellier would spend the summer 1992 at DLR in la program from Simula to Pascal since there was no Oberpfaffenhofen, Germany. It was decided that Cel- Simula compiler on the VAX. This enabled handling lier would introduce the Dymola technology at DLR. larger models due to the linear address space of the Martin Otter immediately got hooked and started to VAX. Francois Cellier got a copy of the Pascal ver- implement a library of MultiBody components which sion. The importance will be clear later. was later published in (Otter, et.al., 1996). Francois The LICS project got an industrial follow-up remembers: “Four weeks into my visit, Martin came since I worked for the company SattControl 1984- to my office on Monday morning, telling me that he 1992. We developed a distributed control system now could throw away his program "myRobot" that called SattLine (Elmqvist, 1991a, 1991b, 1992). This he had previously developed for the simulation of experience later influenced the design of hybrid fea- tree-structured robots. Over the weekend, he had re- tures of Modelica. implemented his robot model in Dymola, which turned out to be much more elegant and flexible.” I moved back to Sweden and started the company 3 The Company Dynasim Dynasim in August 1992. DLR realized the potential of the Dymola technology but also the needs to ex- In August 1991, an important thing happened. I was tend the Dymola language and the tool. For example, working in Toronto for two years and attended a Dymola did not have matrix support then which is seminar at the university by a colleague of Francois essential for MultiBody modeling. Fortunately, DLR Cellier. Francois had moved to Tucson, Arizona and could support further development financially which we had lost contact. During our renewed contacts I gave Dynasim important initial funding. Martin Otter learnt that Francois was writing a book: Continuous and I have worked in close collaboration since then. Systems Modeling (Cellier, 1991). I got the manu- We met for the first time at DLR Oberpfaffenhofen script and was overwhelmed! It described Dymola in August 1993 after one year of collaboration via e- and used Dymola for modeling of many examples. mail.

DOI Proceedings of the 10th International ModelicaConference 19 10.3384/ECP1409617 March 10-12, 2014, Lund, Sweden Modelica Evolution - From My Perspective

We made a design for modeling hybrid systems 1995. This was very important for growing the inter- in order to be able to model power electronics and est in the technology in Germany. phenomena such as friction, (Cellier, et.al., 1993) Bengt Jacobson, Machine and Vehicle Design, and (Otter, 1994). The concepts of instantaneous Chalmers Technical University was among the early equations and event iterations were then introduced. adopters and started to use Dymola for powertrain In July 1993, Dag Brück was employed especial- development in a collaborative project with Volvo ly to develop a graphical user interface enabling and Saab in 1995. creating components and connecting them by drag Jan Tuszynski at Sydkraft Konsult in Malmö, and drop. Dag had worked in the Omola project at Sweden deployed Dymola for thermal power sys- the Automatic Control Department, Lund. tems in 1995. A missing piece of the technology was to handle Sebastian Dormido organized a workshop in Avi- that the blocks corresponding to systems of simulta- la, Spain summer 1996. Francois Cellier and I pre- neous equations often got large but sparse. Tearing is sented the principles of object-oriented equation a static technique to handle this problem. Our first based modeling. attempt was to help the translator by introducing Akira Ohata and Yutaka Hirano, Toyota Motor hints in the form of a residue operator, (Elmqvist, Corporation heard about Dymola during a presenta- Otter, 1994). Shortly afterwards, Martin Otter and tion in Japan by Georg Grübel, DLR. They got myself figured out an algorithm to automatically per- Dymola licenses in middle of 1996 and started to use form tearing, and the algorithm was introduced in it for the Toyota Prius development. The multi- Dymola. Dymola would then, for example, for a tree engineering modeling capability was necessary for structured multibody model find a large linear sys- the hybrid car development. However, they realized tem of equations involving accelerations, forces and that the maturity of the Dymola software was not torques and discover that it could be reduced to in- sufficient for large scale deployment and provided verting a linear matrix of size equal to the number of funding during 2 years starting end of 1997 regard- degrees of freedom. ing general GUI enhancements, GUI for Modelica, The efficiency of the code could be enhanced if symbolic solver capabilities, etc. This was an essen- structural and symbolic processing is made not only tial funding allowing for expansion of Dynasim. In on the model equations but also on the discretization the end of 1998, Toyota Techno Service Corporation equations of the numerical integrator. We called it became distributor of Dymola in Japan with Takashi inline integration, (Elmqvist, et.al., 1995). This be- Matsuba and Rui Gao as technical support. In 2007, came very important for hardware-in-the-loop simu- Rui Gao came to work for Dassault Systèmes. lation. For example, this technique allows efficient Martin Otter visited Dynasim for two months in use of implicit methods for multibody models since September and October 1996 and gave a lecture se- it combines inverting the mass matrix and solving ries on object oriented modeling of mechanical sys- the non-linear systems of equations. tems at the Automatic Control department at Lund The early adopters of this equation and object Institute of Technology. We worked in particular on based modeling technology can be seen from the real-time simulation of hybrid systems such as auto- Dymola license numbers: matic gearboxes. Martin was the main author of the Dymola standard library containing Blocks, Elec- 101: Francois Cellier, University of Arizona trical, Rotational, and MultiBody components. 102: Martin Otter, DLR Hans-Jürg Wiessmann and Bernhard Bachmann, 103: Rafael Huber, Dept. Ing. Sistemas, ESAII, Bar- ABB, Baden-Dättwil in Switzerland became users of celona, Spain Dymola in 1996 for power electronics modeling and 104: Sebastian Dormido, Depto. De Informatica y HILS (Hardware-In-the-Loop Simulation). Bernhard Automatica, UNED, Spanien spent 4 weeks at Dynasim in March 1998. He then 105: Michael Grimsberg, Lund Institute of Technol- proposed a simple state selection algorithm which ogy was used in Dymola before the dummy derivative 106: Dieter Kraft, Dept of Mechanical Engineering, algorithm of Sven Erik Mattsson was included. University of München Peter Beater, then at University of Paderborn, 107: Jochen Seibold, Rechenzentrum University of started to develop a Hydraulics library beginning of Stuttgart 1997. This was later converted to Modelica and sold to Modelon in 2006. Ingrid Bausch-Gall early understood the potential Rüdiger Franke (then at University of Ilmenau) of Dymola and Bausch-Gall GmbH became distrib- started to use Dymola with partial Modelica support utor in German speaking countries in September in 1997 for optimization of thermodynamic systems.

20 Proceedings of the 10th International ModelicaConference DOI March 10-12, 2014, Lund, Sweden 10.3384/ECP1409617 Keynote

I started to completely rewrite the symbolic en- In May 1996, I attended a workshop in Brussels gine of Dymola in July 1997. Until then the old ver- regarding simulation methodologies organized by sion converted to C from my thesis had been used. I Hans Vangheluwe. I then, for the first time, met Per used C++ Standard Template Library successfully on Sahlin, Bris Data AB, Stockholm (later renamed to several hundred thousands of equations and Dag Equa AB) and Alexandre Jeandel, Gas de France, Brück implemented counted pointers to handle allo- Paris who both were working on equation oriented cation and de-allocation of memory automatically. modeling languages: NMF and Allan respectively. Martin Otter held his first modeling course based I then realized that it was time for a global uni- on Dymola at Technical University of Munich for fied language design initiative. Modeling requires students of electrical and mechanical engineering in reuse of stored knowledge, i.e. there must be a stand- the year 1997. ard language. It does not make sense that various Mike Dempsey (then at Rover) started to evaluate tool vendors invent their own language and that a Dymola in 1998 for powertrain modeling. new language is created for every Ph.D. thesis on Sven Erik Mattsson was employed in August modeling. 1998. He had a perfect background from the Omola So, I initially phoned Sven Erik Mattsson, Martin project (Andersson, 1994) since he implemented the Otter, Per Sahlin and Alexander Jeandel to discuss symbolic engine of OmSim. starting a collaborative language design effort. We Hans Olsson was employed in January 1999 and agreed to meet in Lund on September 2-4, 1996. The had a complementing background regarding numeric participants are seen below, from left to right: Martin and GODESS solvers. So now, the dream team was Otter, Alexandre Jeandel, Per Sahlin, Sven Erik formed with Dag, Sven Erik, Hans and me together Mattsson, Bernt Nilsson and me. Dag Brück partici- with collaboration with Martin Otter. pated partially and took the photo.

th The picture below shows participants of the 75 Sven Erik, Dag, Hilding, Hans Modelica design meeting in Lund May 2012.

Roger Larsson was utilized as a consultant from June 2004 to accelerate building the business side of Dynasim.

4 Modelica Language Design You might wonder about the name Modelica. The In spring 1996, I had lunch with Prof Karl Johan name was invented during one of the lunches of the Åström and Sven Erik Mattson from the Automatic first meeting. I don’t recall who said it first. We Control department, Lund University. Sven Erik was quickly checked the usage in Alta Vista. It is used in the project leader of the Omola project (Andersson, Spanish for a role model. 1994). We discussed the need for unification of our Sven Erik Mattsson organized a COSY workshop efforts on Omola and Dymola. in Lund the week after with about 20 participants.

DOI Proceedings of the 10th International ModelicaConference 21 10.3384/ECP1409617 March 10-12, 2014, Lund, Sweden Modelica Evolution - From My Perspective

Our language design ideas were then presented, i.e. it 2001). We provided a demo version of Dymola got some immediate attention. We met Costas Pan- which was shipped with the book. Ford was also in- telides at this workshop and convinced him to ar- terested in converting Adams models, so we made a range the 3rd design meeting in London. One of the translator from adm-files to Modelica MultiBody. goals was to get in closer contact and cooperate to- Andreas Möller (now my son-in-law) developed a gether. Unfortunately, Costas decided later to not supporting Modelica library. To handle these large join the Modelica development and continued with models, we had to enhance the internal data struc- his own modeling language, gPROMS. tures of Dymola. In May 2000, we could simulate an The language design effort initially got a small entire vehicle, (Bowles, et.al., 2001). travel funding from the ESPRIT project "Simulation Sven Erik Mattsson invited Hubertus in Europe Basic Research Working Group (SiE- Tummescheit in 1998 to make a Ph.D. thesis at the WG)". It was later organized as the EuroSim Model- Automatic Control department, Lund. Hubertus and ica Technical Committee 1 and the Technical Chap- Jonas Eborn developed a comprehensive Modelica ter on Modelica within Society for Computer Simu- library for thermo-dynamical systems which broad- lation. I was the chairman for 3 years and then hand- ened the applicability of Modelica. Hubertus orga- ed over to Martin Otter, the present chairman. nized the first Modelica Workshop in Lund in 2000 In the year 2000, the non-profit Modelica Associ- with 80 participants. Gerhard Schmitz and his group ation was formed in Linköping, Sweden to formalize in Hamburg utilized this library for building a library the continually evolving Modelica language and the for air-conditioning modeling. DaimlerChrysler, development of the free Modelica Standard Library. BMW, Volkswagen and Audi wanted to standardize Modelica 1.0 was released after one year design on a modeling format to allow them to exchange in September 1997. It had classes, inheritance, class models with their suppliers. During the autumn 2003 parameters (replaceable classes and components) there was intense work including benchmarking var- equations, blocks, connectors, functions, etc. I re- ious tools. However, we needed to form an organiza- member an intense debate at the release meeting tion that could supply and support these customers. when Peter Fritzson, who joined the Modelica effort Hubertus and Jonas then worked at UTRC, USA. I early 1997, argued for including functions and I ar- called Hubertus in December 2003 and asked him to gued to wait until the next release. Thank you Peter come back to Lund and help organizing the effort. for pushing. Hybrid modeling features were included He was back before Christmas. This led to founding in version 1.1 released in December 1998. of Modelon AB by Hubertus Tummescheit, Jonas Dag Brück started to implement a Modelica com- Eborn, Magnus Gäfvert, Johan Andreasson and me piler immediately after the first design meeting. It in 2004. initially output Dymola code in order that the Model- Peter Fritzson made a formal specification of ica models could be simulated. Dymola has been Modelica in 1998 which later led to the open source used as a platform for the design group to test all implementation OpenModelica, (Fritzson, 2002). features during Modelica evolution. The first version Hans Olsson took the responsibility in 2000 of of Dymola which officially supported Modelica being the editor of the Modelica specification, i.e. to was version 4.0 released July 1, 1999. We worked all organize the process of resolving all change requests. night until 6.10 A.M in the morning since we wanted Peter Fritzson wrote the book Principles of Ob- it to be released first half of 1999 (in at least some ject Oriented Modeling and Simulation with part of the world). The meaning of Dymola then had Modelica 2.1 which was published in 2003, to be changed to DYnamic MOdeling LAboratory. It (Fritzson, 2003). also had a conversion option to convert Dymola models and packages to Modelica. Martin Otter was the main author of the Modelica Standard Library 5 Dassault Systèmes (MSL). Later, many people contributed to the devel- opment of MSL and the current version of MSL has Francois Bichet, Dassault Systèmes called in No- Modelica models from about 30 people. vember 2005 and asked if he and Dominique Flo- Michael Tiller, then at Ford, became aware of rack, VP of R&D could visit Dynasim. I made a Dymola (the language) but got really interested in presentation of the company and the technology and Modelica due to the open specification. He became got invited to Paris for presentations to a larger the first Dymola/Modelica power user in beginning group at Dassault Systèmes and for further discus- of 1999 and helped us test our Modelica translator. sions. I then got the question if Dynasim was for He also wrote the first book about Modelica: Intro- sale. I considered such a deal as a perfect marriage duction to Physical Modeling with Modelica, (Tiller, since I believe systems engineering, modeling and

22 Proceedings of the 10th International ModelicaConference DOI March 10-12, 2014, Lund, Sweden 10.3384/ECP1409617 Keynote simulation must be married to 3D and CAD. An in- 7 Modelica Future tense period of meetings and discussions led to a let- ter of intent signed before Christmas 2005. The deal This section discusses a few possible directions for was closed on April 2, 2006 and announced at the the future of Modelica. In most cases it is a matter of Dassault Systèmes DevCon Conference in June, both tool support and various extensions to Modeli- 2006. ca. The first years of joining such a big company As mentioned before, systems engineering also were somewhat turbulent for us. Dymola and Model- need to take 3D aspects into account, such as mass ica represented a new world for some of the manag- and inertia calculated from actual shape and materi- ers at Dassault Systèmes HQ and the Dynasim team als, collision handling, etc. It is also important to was too remote from HQ. The situation was correct- have consistent parameterization of the behavior ed in the beginning of 2010 with new manager for model and the shapes. It should be possible to initial- CATIA Systems, I was appointed as Chief Technol- ly use a simplified model for concept studies and ogy Officer for Systems reporting to Philippe Laufer, gradually replace submodels when CAD parts or a now CEO of CATIA. Dan Henriksson became man- kinematic model become available as illustrated be- ager of the Dassault Systèmes Lund team and Martin low: Malmheden relocated to Dassault Systèmes in Paris to help in the technology transfer. This enabled me to focus on technical aspects and in particular, together with Sven Erik Mattsson, to work on new features such as the synchronous extensions to Modelica and multi core simulation.

Modelica gives the possibility to compose more and 6 Modelica Community more detailed models since model components can be reused. This means that simulation needs to be The Modelica community is now growing rapidly. faster. One possibility is then to use multi-core tech- There are 9 tools having at least partial support for nology. Recent advances with more than 1000 cores the Modelica language, see www.Modelica.org/tools. (www.Kalray.com) show the potential. The problem There are more than 1300 models in the Modelica is then how to utilize this enormous processing pow- Standard Library. A Modelica compliance test suit er in a user friendly way. Partitioning needs to be with more than 1000 tricky models is available for made automatically. Modelica gives good possibility checking tool compliance. It is planned that a web to automatically partition the model equation execu- page with compliance status will be available. tion into separate threads since it is a declarative lan- We are now organizing the 10th Modelica Confer- guage based on equations. Early developments are ence. More than 22 Ph.D. theses, 800 papers and ar- described in (Aronsson, et.al. 2002). A new paper ticles have been published related to Modelica. (Elmqvist, Mattsson, 2014) describes a method to Several large EU projects have been activated: automatically parallelize model equations imple- RealSim, EuroSysLib, Modelisar, OpenProd, and mented in Dymola. A speed-up of 3.4 times has been Modrio with more than 100 man-years of effort. achieved using 4 cores/8 threads. The Modelica Association is also growing, now Modelica models and simulations is one part of having more than 100 individual members and more systems engineering. It is important to enable vari- than 10 industrial members. People from the syn- ous tool chains including sensitivity analysis, opti- chronous language community have joined after mization, Monte Carlo simulations, linear analysis, Philippe Laufer suggested I should attend a meeting code generation, etc. It should be possible to define a with them in Paris in October 2010. The synchro- process flow that can be reused if some early re- nous Modelica features were developed with the help quirements or designs need to be changed. It is im- of Albert Benveniste, Marc Pouzet, Francois Dupont portant with standardized interfaces. A subgroup of and others, (Elmqvist, et.al., 2012). Modelica Association is working on defining an The scope of Modelica Association is also grow- XML format for various levels of Modelica repre- ing to also incorporate the FMI development. sentation, source, flattened, solved, etc. This will enable various backend tools such as fault tree analy- sis and code generation. Another subgroup is work- ing on how to store meta information in a standard-

DOI Proceedings of the 10th International ModelicaConference 23 10.3384/ECP1409617 March 10-12, 2014, Lund, Sweden Modelica Evolution - From My Perspective ized way, for example, for optimization (Zimmer, 8 Conclusions et.al., 2014). A subtask within the MODRIO project is to ena- The Modelica effort is a truly multi-disciplinary ble modeling of multi-mode and stochastic sys- challenge involving compiler technology, graph the- tems, for example, to model failing components. A ory, computer algebra, numerical mathematics, etc. generalization of synchronous state machines to con- Furthermore, Modelica library development requires tinuous time and that the number of states of a sys- skills from many engineering domains such as elec- tem can change at events is proposed, (Elmqvist, tronics, mechanics, and thermo-dynamics. The beau- et.al., 2014). ty of Modelica is that it enables them all to express Modelica now has quite limited data structures, themselves in the same language. i.e. only arrays and records are allowed. It is not pos- An important driving force behind Modelica is to sible to define recursive data structures or maps. enable storing engineering knowledge in a form that Such advanced data structures are, for example, can be reused. This enables more realistic simula- needed for advanced controllers, scripting, and meta tions of the complex systems now being designed. It information for work flows. MetaModelica has suc- gives the engineers a more interesting work place cessfully incorporated such features already 2005 since tedious manual model development is not (Fritzson, 2005). needed. This also has the effect that many manual We in the Modelica Association also want to de- errors are avoided and the simulation results can be fine more features of Modelica using a Modelica better trusted. Kernel language. This would enable, for example, Another driving force has been and is the joy of defining connection semantics, state machine seman- being part of a community with the desire to change tics, etc. in the Modelica Kernel language. A prereq- the design methodology to become model based. uisite for this approach is that more advanced data Many hard problems have had to be solved which structures are available in the Modelica Kernel lan- means that there has been many exciting moments of guage. success. Most Modelica tools allow several views of a It seems fair to state that Modelica has already model or library such as Diagram, Icon, Modelica been proven as a means for storing engineering Text, Documentation, Package tree view. However, knowhow in a reusable form. The equation orienta- SysML offers several additional useful views such tion means that equations from engineering books as inheritance tree, component hierarchy, etc. Such can often be reused directly. There is no need to views can be automatically generated from Modeli- manually transform the equations since the tools do ca. For example a Block Definition Diagram (bdd) of that for you. It is a neutral form which already is SysML for the CoupledClutches example might look supported by many tools. So a good stable platform as shown below using a Layered Digraph layout al- has been established. gorithm.

9 Acknowledgements

I am thankful to all persons mentioned in this paper and to many others that enabled this saga to take place. In particular, I want to thank my thesis advisor and mentor Prof. Karl Johan Åström for guidance The question about standardization of Modelica as and for believing in me that this direction would be ANSI or IEEE standard is frequently raised. The possible and useful. He wrote in a certificate about members of Modelica Association want to wait be- me: “He walks his own ways”. It took several years cause we feel there are some unifications and en- until I understood how positive that was. hancements that need to be made first, such as sim- Thanks to Sture Lindahl for writing such a well- plification and extension of generics (redeclare) and structured and comprehensive report about power Modelica Kernel language. systems modeling which could be formalized. Francois Cellier was the first user to really under- stand the principles and power of Dymola, introduc- ing Dymola in his courses in Tucson and in his book. Thank you, Francois.

24 Proceedings of the 10th International ModelicaConference DOI March 10-12, 2014, Lund, Sweden 10.3384/ECP1409617 Keynote

I want to thank Georg Grübel for helping financ- Elmqvist H. (1977b): A New Model Language for ing the early developments and for introducing Continuous Systems. LUTFD2/(TFRT-7132), Dymola in Japan. Department of Automatic Control, Lund Institute Without the devoted work by Martin Otter, Mod- of Technology, Sweden. elica would not have succeeded. Thank you, Martin, Elmqvist, H. (1978): A Structured Model Lan- for your dedication, hard work and fantastic collabo- guage for Large Continuous Systems. PhD ration during 22 years. Thesis ISRN LUTFD2/TFRT--1015--SE, Depart- Yutaka Hirano and Akira Ohata understood the ment of Automatic Control, Lund University, industrial significance of Dymola but also under- Sweden, May 1978. stood that in order to succeed, financial support was Elmqvist, H. (1979a): DYMOLA - A Structured needed which I am very grateful for. Model Language for Large Continuous Sys- Francois Bichet followed the Modelica evolution tems. Proc. Summer Computer Simulation Con- for a long time before calling me. Thank you, Fran- ference, Toronto, Canada. cois, for promoting Modelica and Dymola internally in Dassault Systèmes. Elmqvist, H. (1979b): Manipulation of Continuous I want to thank my manager Philippe Laufer for Models Based on Equations to Assignment believing in me and letting me use my own judgment Statements. Proc. Simulation of Systems ’79, for advancing the Modelica, Dymola and FMI tech- IMACS Congress 1979, Sorrento. North Holland nologies. Publ. Comp. Dag Brück, Sven Erik Mattsson and Hans Olsson Hennessy, J.L., Elmquist, H. (1982): The Design were absolutely essential for our success. Thank you and Implementation of Parametric Types in for the creative, innovative and fun collaboration. I Pascal. Software: Practice and Experience also want to thank all the other past and present 12:169-184, 1982. members of the Dynasim/Dassault Systèmes Lund Elmqvist H. (1985): LICS - Language for Imple- team for a great collaboration. mentation of Control Systems. Technical Re- And most importantly, thanks to my wife Iréne port ISRN LUTFD2/TFRT--3179--SE, Depart- Lind Elmqvist who has supported and encouraged ment of Automatic Control, Lund University, me for more than 40 years and for coping with the Sweden, December 1985. uncertainties of a start-up company. Thank you, Pantelides C. (1988): The Consistent Initialization Iréne, for also taking me away from virtual reality to of Differential-Algebraic Systems, SIAM J. Sci. reality in places such as Namibia, South Africa, Tan- Stat. Comput., 9(2), pp. 213-231. zania, Botswana, Antarctica, Galapagos, New Zea- land, Cook Islands; finding tigers in India and skiing Cellier F. E. (1991): Continuous System Modeling. in Åre. Springer-Verlag, New York, USA. Elmqvist H. (1991a): Cooperating Distributed Control objects. IFAC Symposium on Distribut- References ed Intelligence Systems, August 13-15, 1991, Ar- lington, Virginia, USA. (In chronological order.) Elmqvist H. (1991b): A Uniform Architecture For Distributed Automation. ISA/91 International Elmqvist H. (1975): SIMNON— An interactive Conference & Exhibition, Anaheim, USA, Octo- simulation program for nonlinear systems — ber 28-31, Instrument Society of America. User’s manual. Technical Report TFRT-7502. Elmqvist H. (1992): An Object and Data-Flow Department of Automatic Control, Lund Institute based Visual Language for Process Control. of Technology, Lund, Sweden. ISA/92-Canada Conference & Exhibit, Toronto, Lindahl S. (1976): A Non-linear Drum-Boiler Canada, Instrument Society of America. Turbine Model. Technical Report ISRN Cellier, F.E., and H. Elmqvist (1992), The Need for LUTFD2/TFRT--3132--SE, Department of Auto- Automated Formula Manipulation in Object- matic Control, Lund University, Sweden, Oriented Continuous-System Modeling, Proc. March 1976. CACSD'92, IEEE Computer-Aided Control Sys- Elmqvist H. (1977a): SIMNON - An interactive tem Design Conference, Napa, CA, pp.1-8. simulation program for nonlinear systems. Mattsson S.E. and G. Söderlind (1992): A New Proc. Simulation ’77, Montreux, Switzerland. Technique for Solving High-index Differential- algebraic Equations. Proc. CACSD'92, IEEE

DOI Proceedings of the 10th International ModelicaConference 25 10.3384/ECP1409617 March 10-12, 2014, Lund, Sweden Modelica Evolution - From My Perspective

Computer-Aided Control System Design Confer- Fritzson P., P. Aronsson, P. Bunus, V. Engelson, H. ence, Napa, CA, pp. 218-224. Johansson, A. Karström, and L. Saldamli. (2002): Cellier, F.E., and H. Elmqvist (1993), Automated The Open Source Modelica Project. In Pro- Formula Manipulation Supports Object- ceedings of the 2nd International Modelica Con- Oriented Continuous-System Modeling, IEEE ference, Oberpfaffenhofen, Germany, Mar. 18– Control Systems, 13(2), pp.28-38. 19, 2002. Elmqvist, H., F.E. Cellier, and M. Otter (1993), Ob- Aronsson P., and P. Fritzson (2002): Multiprocessor ject-Oriented Modeling of Hybrid Systems, Scheduling of Simulation Code from Modelica Proc. ESS'93, SCS European Simulation Sympo- Models. In Proceedings of the 2nd International sium, Delft, The Netherlands, pp.xxxi-xli. Modelica Conference, Oberpfaffenhofen, Germa- ny, Mar. 18–19, 2002. Mattsson, S.E. and G. Söderlind (1993): Index re- duction in differential-algebraic equations us- Fritzson, P. (2003): Principles of Object Oriented ing dummy derivatives. SIAM Journal of Scien- Modeling and Simulation with Modelica 2.1, tific and Statistical Computing, Vol. 14 pp. 677- 940 pages, ISBN 0-471-471631, Wiley-IEEE 692, 1993. Press. Sept. 2003. Otter, M. (1994): Object-Oriented Modeling of Fritzson P., A. Pop, and P. Aronsson (2005): To- Drive Trains with Friction, Clutches and wards Comprehensive Meta-Modeling and Brakes, Proceedings of the European Simulation Meta-Programming Capabilities in Modelica. Multiconference, ESM'94, Barcelona, Spain, June In Proceedings of the 4th International Modelica 1-3, 1994, pp. 335-339. SCS, The Society for Conference, Hamburg, Germany, March 7-8, Computer Simulation. 2005. Elmqvist, H., and M. Otter (1994): Methods for Elmqvist H., Otter M., and Mattsson S.E. (2012): Tearing Systems of Equations in Object Ori- Fundamentals of Synchronous Control in ented Modeling, Proc. ESM'94, European Simu- Modelica. Proceedings of 9th International Mod- lation Multiconference, Barcelona, Spain, June 1- elica Conference, Munich, Germany, September 3, 1994, pp. 326-332. 3-5. Andersson M. (1994): Object-Oriented Modeling Zimmer D., Otter M., Elmqvist H., and Kurzbach G. and Simulation of Hybrid Systems. PhD thesis (2014): Custom Annotations: Handling Meta- ISRN LUTFD2/TFRT--1043--SE, Department of Information in Modelica. Proceedings of 10th Automatic Control, Lund Institute of Technology, International Modelica Conference, Lund, Swe- Lund, Sweden. den, March 10-12. Elmqvist H., M. Otter, and F.E. Cellier (1995), In- Elmqvist H., and Mattsson S.E. (2014): Parallel line Integration: A New Mixed Symbol- Model Execution on Many Cores. Proceedings ic/Numeric Approach for Solving Differential- of 10th International Modelica Conference, Lund, Algebraic Equation Systems, Proc. ESM'95, Sweden, March 10-12. SCS European Simulation MultiConference, Pra- Elmqvist H., Otter M., and Mattsson S.E. (2014): gue, Czech Republic, pp.xxiii-xxxiv. Modelica extensions for Multi-Mode DAE Sys- Otter, M., H. Elmqvist, and F.E. Cellier (1996), tems. Proceedings of 10th International Modeli- Modeling of Multibody Systems with the Ob- ca Conference, Lund, Sweden, March 10-12. ject-Oriented Modeling Language Dymola, J. Nonlinear Dynamics, 9(1), pp.91-112. Åström K.J., Elmqvist H., Mattsson S.E.: Evolution of Continuous-Time Modeling and Simulation, The 12th European Simulation Multiconference, ESM'98, June 16-19, 1998, Manchester, UK. Tiller M. (2001): Introduction to Physical Model- ing with Modelica, The Springer International Series in Engineering and Computer Science. Bowles P., M. Tiller, H. Elmqvist, D. Brück, S.E. Mattsson, A. Möller, H. Olsson, M. Otter (2001): Feasibility of Detailed Vehicle Modeling, SAE 2001 World Congress.

26 Proceedings of the 10th International ModelicaConference DOI March 10-12, 2014, Lund, Sweden 10.3384/ECP1409617