2024-07-10 –, Else (1.3)
The idea behind the JuliaSim Modeling Language (JSML) was to rethink how we describe the composition of complex system models in ModelingToolkit.jl (MTK). JSML takes a strictly declarative approach and focuses on encapsulating behavior into reusable component models and then composing them into complex hierarchical system models. All imperative aspects of the modeling and still handled via Julia.
There are several methods for creating models for ModelingToolkit. The simplest way is to declare whatever variables or parameters the model includes along with the equations used to describe the systems behavior. From here, ModelingToolkit finds the most efficient approach for solving that system. It is also possible to use a collection of Julia macros to describe reusable component models and systems composed of these reusable component models.
The JuliaSim Modeling Language (JSML) approach adds yet another way of composing ModelingToolkit models. Instead of building on top of Julia imperative semantics to describe and construct models, JSML takes a declarative approach. It provides a domain specific language (DSL) for defining reusable component models (their equations, parameters, connectors) and how these components are connected in order to define systems. The hope is that this DSL provides a very focused way of describing the behavior and composition of models that makes for an easier learning curve, better diagnostics, static analysis and a greater ability to reason about such models. These components will leverage Julia functions for any imperative semantics they require.
JSML models are fully compatible with both ModelingToolkit.jl as well as the JuliaSim modeling environment. In practice this means that JSML defines not just how the components behave, but also how they are rendered in a graphical environment. Model libraries leverage the Julia package manager and can therefore be fully versioned and dependent on other model libraries.
Michael Tiller has a Ph.D. in Mechanical Engineering from the University of Illinois, Urbana-Champaign. He is the Secretary of the Modelica Association, President of the North America Modelica Users' Group, author of two books on Modelica and currently Senior Director of Product Management for JuliaSim at JuliaHub.