Conference article

Introducing Messages in Modelica for Facilitating Discrete-Event System Modeling

Victoria Sanz
Dpto. Informática y Automática, ETSII Informática, UNED, Spain

Alfonso Urquia
Dpto. Informática y Automática, ETSII Informática, UNED, Spain

Sebastian Dormido
Dpto. Informática y Automática, ETSII Informática, UNED, Spain

Download article;article=009

Published in: Proceedings of the 2nd International Workshop on Equation-Based Object-Oriented Languages and Tools

Linköping Electronic Conference Proceedings 29:9, s. 83-93

Show more +

Published: 2008-07-02

ISBN: 978-91-7519-823-1

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


The work performed by the authors to provide to Modelica more discrete-event system modeling functionalities is presented. These functionalities include the replication of the modeling capacities found in the Arena environment; the SIMAN language and the DEVS formalism. The implementation of these new functionalities is included in three freeModelica libraries called ARENALib; SIMANLib and DEVSLib. These libraries also include capacities for random number and variates generation; and dynamicmemory management. They are freely available for download at

As observed in the work performed; discrete-event system modelingwithModelica using the process-oriented approach is difficult and complex. The convenience to include a new concept in theModelica language has been observed and is discussed in this contribution. This new concept corresponds to themodel communicationmechanismusing messages. Messages help to describe the communication between components in a discrete-event system. They do not substitute the current discrete-event modeling capabilities of Modelica; but extend them. The proposed messages mechanism in Modelica is discussed in the manuscript. An implementation of the messages mechanism is also proposed.


Discrete events; process-oriented modeling; Modelica; Arena; SIMAN; DEVS; messages


[1] Dynasym AB. Dymola Dynamic Modeling Laboratory User’s Manual.; 2006.

[2] Tamara Beltrame. Design and Development of a Dymola/ Modelica Library for Discrete Event-Oriented Systems Using DEVS Methodology. Master’s thesis; ETH Zürich; March 2006.

[3] Tamara Beltrame and Francois E. Cellier. Quantised State System Simulation in Dymola/Modelica using the DEVS Formalism. In Proceedings of the 5th International Modelica Conference; pages 73–82; 2006.

[4] Francois E. Cellier and Ernesto Kofman. Continuous System Simulation. Springer-Verlag New York; Inc.; Secaucus; NJ; USA; 2006.

[5] Mariana C. D’Abreu and Gabriel A. Wainer. M/CD++: Modeling Continuous Systems Using Modelica and DEVS. In Proceedings of the 13th IEEE International Symposium on Modeling; Analysis; and Simulation of Computer and Telecommunication Systems; pages 229–236; 2005.


[7] J.A. Ferreira and J.P. Estima de Oliveira. Modelling Hybrid Systems using Statecharts and Modelica. In Proceedings of the 7th IEEE International Conference on Emerging Technologies and Factory Automation; pages 1063–1069; 1999.

[8] Peter Fritzson. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley-IEEE Computer Society Pr; 2003.

[9] Håkan Lundvall and Peter Fritzson. Modelling concurrent activities and resource sharing in Modelica. In Proceedings of the SIMS 2003 - 44th Conference on Simulation and Modeling; 2003.

[10] W. David Kelton; Randall P. Sadowski; and David T. Sturrock. Simulation with Arena (4th ed.). McGraw-Hill; Inc.; New York; NY; USA; 2007.

[11] Julio Kriger. Trabajo práctico 1: Antiguo reloj des- 92 pertador. wbgraf/samplesmain_1.htm.

[12] Averill M. Law. Simulation Modelling and Analysis (4th ed.). McGraw-Hill; 1221 Avenue of the Americas; New York; NY; 2007.

[13] Pierre L’Ecuyer. Good Parameters and Implementations for CombinedMultiple Recursive Random Number Generators. Oper. Res.; 47(1):159–164; 1999.

[14] Sven Erik Mattsson; Martin Otter; and Hilding Elmqvist. Modelica Hybrid Modeling and Efficient Simulation. In Proceedings of the 38th IEEE Conference on Decision and Control; pages 3502–3507; 1999.

[15] Pieter J. Mosterman; Martin Otter; and Hilding Elmqvist. Modelling Petri Nets as Local Constraint Equations for Hybrid Systems using Modelica. In Proceedings of the Summer Computer Simulation Conference; pages 314–319; 1998.

[16] Martin Otter; Hilding Elmqvist; and Sven Erik Mattsson. Hybrid Modeling in Modelica Based on the Synchronous Data Flow Principle. In CACSD’99; pages 151–157; 1999.

[17] Martin Otter; Karl-Erik Årzén; and Isolde Dressler. State- Graph - A Modelica Library for Hierarchical State Machines. In Proceedings of the 4th International Modelica Conference; pages 569–578; 2005.

[18] C. Dennis Pegden; Randall P. Sadowski; and Robert E. Shannon. Introduction to Simulation Using SIMAN. McGraw-Hill; Inc.; New York; NY; USA; 1995.

[19] Manuel A. Pereira Remelhe. Combining Discrete Event Models and Modelica - General Thoughts and a Special Modeling Environment. In Proceedings of the 2nd International Modelica Conference; pages 203–207; 2002.

[20] Victorino Sanz; Alfonso Urquia; and Sebastian Dormido. ARENALib:AModelica Library for Discrete-Event System Simulation. In Proceedings of the 5th International Modelica Conference; pages 539–548; 2006.

[21] Victorino Sanz; Alfonso Urquia; and Sebastian Dormido. DEVS Specification and Implementation of SIMAN Blocks Using Modelica Language. In Proceedings of the Winter Simulation Conference 2007; pages 2374–2374; 2007.

[22] Gabriel Wainer. CD++: A Toolkit to Develop DEVS Models. Softw. Pract. Exper.; 32(13):1261–1306; 2002.

[23] Bernard P. Zeigler; Tag Gon Kim; and Herbert Praehofer. Theory of Modeling and Simulation. Academic Press; Inc.; Orlando; FL; USA; 2000.

[24] Bernard P. Zeigler and Hessam S. Sarjoughian. Introduction to DEVS Modeling & Simulation with JAVA: Developing Component-based Simulation Models. -

Citations in Crossref