# \#modelingtoolkit

**URL:** https://discourse.julialang.org/tag/modelingtoolkit/535.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Solving ModelingToolkit models with EnsembleGPUArray](https://discourse.julialang.org/t/solving-modelingtoolkit-models-with-ensemblegpuarray/139647)

<div class="topic-metadata">

**Author:** [@hochbean](https://discourse.julialang.org/u/hochbean)\
**Replies:** 4\
**Last updated:** [September 25, 2026, 12:19pm UTC](https://discourse.julialang.org/t/solving-modelingtoolkit-models-with-ensemblegpuarray/139647 "2026-09-25T12:19:34Z")

</div>

Hi everyone, I’m running an ensemble of small (2–6 state) stiff/DAE thermal RC-network models (ModelingToolkit-built, many independent “buildings” of the same model structure with their own physical parameters) and tryi…

---

## [Understanding jump model preparation cost](https://discourse.julialang.org/t/understanding-jump-model-preparation-cost/138472)

<div class="topic-metadata">

**Author:** [@lmshk](https://discourse.julialang.org/u/lmshk)\
**Replies:** 19\
**Last updated:** [September 23, 2026, 1:32pm UTC](https://discourse.julialang.org/t/understanding-jump-model-preparation-cost/138472 "2026-09-23T13:32:43Z")

</div>

I am using Catalyst.jl to make JumpProblems of around 160k species and a fairly sparse interaction structure that includes what JumpProcesses.jl calls “constant-rate jump” (CRJ) reactions. This works, but JumpProblem con…

---

## [How to compose discrete-time static and dynamic models for systems simulation similar to Simulink?](https://discourse.julialang.org/t/how-to-compose-discrete-time-static-and-dynamic-models-for-systems-simulation-similar-to-simulink/74858)

<div class="topic-metadata">

**Author:** [@JanKap](https://discourse.julialang.org/u/JanKap)\
**Replies:** 9\
**Last updated:** [September 11, 2026, 6:19pm UTC](https://discourse.julialang.org/t/how-to-compose-discrete-time-static-and-dynamic-models-for-systems-simulation-similar-to-simulink/74858 "2026-09-11T18:19:36Z")

</div>

Hi all, I’m searching for a Simulink replacement. The main purpose is to have a simplified system simulation for quick prototyping. The domain is mechanical/electrical Usually, I have 4 kinds of models/subsystems Sen…

---

## [\[ANN\] Tethers.jl](https://discourse.julialang.org/t/ann-tethers-jl/118376)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [September 11, 2026, 3:16pm UTC](https://discourse.julialang.org/t/ann-tethers-jl/118376 "2026-09-11T15:16:58Z")

</div>

I am proud that I can release a new tutorial for physical modelling with Julia using ModelingToolkit.jl: GitHub - ufechner7/Tethers.jl: Tether models · GitHub This is not really a package, but a project with a lot of e…

---

## [Meaning of "maybe" in function names and types](https://discourse.julialang.org/t/meaning-of-maybe-in-function-names-and-types/139317)

<div class="topic-metadata">

**Author:** [@mark.garnett](https://discourse.julialang.org/u/mark.garnett)\
**Replies:** 4\
**Last updated:** [September 11, 2026, 12:55am UTC](https://discourse.julialang.org/t/meaning-of-maybe-in-function-names-and-types/139317 "2026-09-11T00:55:17Z")

</div>

Hi all, I often see the word “maybe” in function names especially in ModelingToolkit. for example “maybe\_build\_initialization\_problem()” or “MaybeArrayIndexT” Is this a common convention in Julia? What does it mean?

---

## [ModelingToolkit: Internal error in runtime](https://discourse.julialang.org/t/modelingtoolkit-internal-error-in-runtime/139291)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [September 9, 2026, 9:39am UTC](https://discourse.julialang.org/t/modelingtoolkit-internal-error-in-runtime/139291 "2026-09-09T09:39:43Z")

</div>

When creating a system image of Tethers.jl on Windows, I got this error: Precompiling packages finished. 503 dependencies successfully precompiled in 342 seconds. 26 already precompiled. 23 dependencies precompiled …

---

## [MTK SDDE ArgumentError when Connecting two Components](https://discourse.julialang.org/t/mtk-sdde-argumenterror-when-connecting-two-components/138861)

<div class="topic-metadata">

**Author:** [@bebrunn](https://discourse.julialang.org/u/bebrunn)\
**Replies:** 7\
**Last updated:** [August 18, 2026, 11:38am UTC](https://discourse.julialang.org/t/mtk-sdde-argumenterror-when-connecting-two-components/138861 "2026-08-18T11:38:45Z")

</div>

Hi, I am trying to connect two MTK components and then solve the resulting SDDE system. However, I am getting an ArgumentsError that I don’t understand. using ModelingToolkit using DifferentialEquations using ModelingT…

---

## [Precompiled native code seems unused when a package is sourced from a git rev instead of a local path](https://discourse.julialang.org/t/precompiled-native-code-seems-unused-when-a-package-is-sourced-from-a-git-rev-instead-of-a-local-path/138584)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [August 5, 2026, 4:09am UTC](https://discourse.julialang.org/t/precompiled-native-code-seems-unused-when-a-package-is-sourced-from-a-git-rev-instead-of-a-local-path/138584 "2026-08-05T04:09:29Z")

</div>

On Julia 1.12.6, the same package at the same commit runs ~20x slower when it comes from Pkg.add(url=..., rev=...) than from a local path. The hot workload is a ModelingToolkit-generated, RuntimeGeneratedFunctions-wrappe…

---

## [Non conservation of energy in ModelingToolkit with flexible bouncing ball example](https://discourse.julialang.org/t/non-conservation-of-energy-in-modelingtoolkit-with-flexible-bouncing-ball-example/138423)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 9\
**Last updated:** [August 3, 2026, 8:54am UTC](https://discourse.julialang.org/t/non-conservation-of-energy-in-modelingtoolkit-with-flexible-bouncing-ball-example/138423 "2026-08-03T08:54:36Z")

</div>

Question Based on the examples in the ModelingToolkit documentation I’m trying to expand a bit and model the impact behavior between two masses, one being connected to a base through a spring. To make it simple, an exam…

---

## [\[ANN\] SolarPosition.jl](https://discourse.julialang.org/t/ann-solarposition-jl/134263)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 24\
**Last updated:** [July 31, 2026, 6:59pm UTC](https://discourse.julialang.org/t/ann-solarposition-jl/134263 "2026-07-31T18:59:20Z")

</div>

I am excited to announce the release of my first public Julia package, SolarPosition.jl. TLDR SolarPosition.jl is a common interface to a variety of solar positioning algorithms which have been rewritten from scratch in…

---

## [Can Symbolics/MTK split the generated RHS into multiple smaller functions?](https://discourse.julialang.org/t/can-symbolics-mtk-split-the-generated-rhs-into-multiple-smaller-functions/138469)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 1\
**Last updated:** [July 26, 2026, 7:39pm UTC](https://discourse.julialang.org/t/can-symbolics-mtk-split-the-generated-rhs-into-multiple-smaller-functions/138469 "2026-07-26T19:39:39Z")

</div>

I have a large ModelingToolkit model. mtkcompile inlines ~32k observed equations into a single big RHS function in around 60 seconds, and first-call compilation of that one function takes \>1000 s (dominated by type infer…

---

## [ModelingToolkit.jl / Multibody.jl with interpolated joint properties](https://discourse.julialang.org/t/modelingtoolkit-jl-multibody-jl-with-interpolated-joint-properties/133754)

<div class="topic-metadata">

**Author:** [@Jskacines](https://discourse.julialang.org/u/Jskacines)\
**Replies:** 11\
**Last updated:** [July 8, 2026, 2:52pm UTC](https://discourse.julialang.org/t/modelingtoolkit-jl-multibody-jl-with-interpolated-joint-properties/133754 "2026-07-08T14:52:43Z")

</div>

Hello Julia community, I am working on a multibody dynamics simulation, and was looking to use ModelingToolkit.jl along with Multibody.jl The specific problem I am working on involves an externally solved mapping of jo…

---

## [Update initialization guesses on an existing problem without rebuilding?](https://discourse.julialang.org/t/update-initialization-guesses-on-an-existing-problem-without-rebuilding/137694)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 0\
**Last updated:** [June 19, 2026, 11:06am UTC](https://discourse.julialang.org/t/update-initialization-guesses-on-an-existing-problem-without-rebuilding/137694 "2026-06-19T11:06:55Z")

</div>

I have a DAE built with ModelingToolkit. Between solves I re-initialize from a new operating point. For variables that have an initial constraint\*I can update them in place via the Initial parameter: prob.ps\[Initial(x)\]…

---

## [Splited ODE system in ModelingToolkit](https://discourse.julialang.org/t/splited-ode-system-in-modelingtoolkit/101258)

<div class="topic-metadata">

**Author:** [@sabbraxcaddabra](https://discourse.julialang.org/u/sabbraxcaddabra)\
**Replies:** 4\
**Last updated:** [June 15, 2026, 10:45pm UTC](https://discourse.julialang.org/t/splited-ode-system-in-modelingtoolkit/101258 "2026-06-15T22:45:06Z")

</div>

I have a simple system of equations: dx\_dt = k \* x + l \* y dy\_dt = n \* x + m \* y and I want to compute right side functions separately: dx\_dt = f1(t, x, y) + f2(t, x, y) dy\_dt = f3(t, x, y) + f4(t, x, y) Example is s…

---

## [Changes in mtkcompile between v9.54 and v11.26](https://discourse.julialang.org/t/changes-in-mtkcompile-between-v9-54-and-v11-26/137536)

<div class="topic-metadata">

**Author:** [@rveynde](https://discourse.julialang.org/u/rveynde)\
**Replies:** 3\
**Last updated:** [June 11, 2026, 1:05am UTC](https://discourse.julialang.org/t/changes-in-mtkcompile-between-v9-54-and-v11-26/137536 "2026-06-11T01:05:40Z")

</div>

I am in the process of updating from MTK version 9.54 to 11.26 for my model. In general it looks like many things have sped up, which is great! There is one issue that I’m running into, namely that during mtkcompile I n…

---

## [\[ANN\] SymbolicAWEModels.jl — a compiler for mechanical systems, built for Airborne Wind Energy](https://discourse.julialang.org/t/ann-symbolicawemodels-jl-a-compiler-for-mechanical-systems-built-for-airborne-wind-energy/137473)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 2\
**Last updated:** [June 7, 2026, 8:17am UTC](https://discourse.julialang.org/t/ann-symbolicawemodels-jl-a-compiler-for-mechanical-systems-built-for-airborne-wind-energy/137473 "2026-06-07T08:17:42Z")

</div>

Hi all, I’m happy to announce SymbolicAWEModels.jl (registered, currently v0.11.1). It’s best thought of as a compiler for flexible mechanical systems. You describe a structure — point masses, spring-damper segments…

---

## [Inconsistent unknown selection in MTK with identical systems (@mtkcompile)](https://discourse.julialang.org/t/inconsistent-unknown-selection-in-mtk-with-identical-systems-mtkcompile/137225)

<div class="topic-metadata">

**Author:** [@celia.bat](https://discourse.julialang.org/u/celia.bat)\
**Replies:** 3\
**Last updated:** [May 22, 2026, 5:01pm UTC](https://discourse.julialang.org/t/inconsistent-unknown-selection-in-mtk-with-identical-systems-mtkcompile/137225 "2026-05-22T17:01:13Z")

</div>

I encountered an inconsistent behavior with ModelingToolkit.jl regarding the selected unknowns after structural simplification / compilation. I built a minimal working example (MWE) where simply changing the name of one…

---

## [ModelingToolkit V11 Library Split and Licensing, Community Feedback Requested](https://discourse.julialang.org/t/modelingtoolkit-v11-library-split-and-licensing-community-feedback-requested/134396)

<div class="topic-metadata">

**Author:** [@isaacsas](https://discourse.julialang.org/u/isaacsas)\
**Replies:** 137\
**Last updated:** [May 22, 2026, 4:01pm UTC](https://discourse.julialang.org/t/modelingtoolkit-v11-library-split-and-licensing-community-feedback-requested/134396 "2026-05-22T16:01:21Z")

</div>

Dear MTK Community, I am posting today in my role as a member of the SciML Steering Council about a decision the council has been discussing regarding the future of ModelingToolkit (MTK). As this decision impacts the MT…

---

## [Ideal diode switching with multiple voltage sources in ModelingToolkit , solver gets stuck at t=0](https://discourse.julialang.org/t/ideal-diode-switching-with-multiple-voltage-sources-in-modelingtoolkit-solver-gets-stuck-at-t-0/137086)

<div class="topic-metadata">

**Author:** [@JaviJR](https://discourse.julialang.org/u/JaviJR)\
**Replies:** 48\
**Last updated:** [May 20, 2026, 10:59am UTC](https://discourse.julialang.org/t/ideal-diode-switching-with-multiple-voltage-sources-in-modelingtoolkit-solver-gets-stuck-at-t-0/137086 "2026-05-20T10:59:57Z")

</div>

Hi everyone, My research team and I have been working with Julia and ModelingToolkit for a while now and have obtained quite satisfactory results overall (our focus is on wind turbine modeling). Recently, however, we st…

---

## [Unpredictable Compilation Performance of MTK-Generated Functions](https://discourse.julialang.org/t/unpredictable-compilation-performance-of-mtk-generated-functions/136827)

<div class="topic-metadata">

**Author:** [@chen\_hardworking](https://discourse.julialang.org/u/chen_hardworking)\
**Replies:** 19\
**Last updated:** [April 24, 2026, 5:14am UTC](https://discourse.julialang.org/t/unpredictable-compilation-performance-of-mtk-generated-functions/136827 "2026-04-24T05:14:18Z")

</div>

Problem Statement: I am reporting a critical bottleneck regarding the compilation and loading stability of functions generated by ModelingToolkit.jl. My experience shows that the complexity of the generated symbolic Jaco…

---

## [How to improve structural\_simplify performance?](https://discourse.julialang.org/t/how-to-improve-structural-simplify-performance/127260)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 17\
**Last updated:** [April 23, 2026, 4:08am UTC](https://discourse.julialang.org/t/how-to-improve-structural-simplify-performance/127260 "2026-04-23T04:08:24Z")

</div>

Modelingtoolkits structural\_simplify can be very slow on bigger systems. What can I do to improve it’s performance? Should I write my equations in a certain way, should I split up big equations into smaller ones, or shou…

---

## [Time to build system and problem is slower in Julia 1.12 with MTKv11](https://discourse.julialang.org/t/time-to-build-system-and-problem-is-slower-in-julia-1-12-with-mtkv11/135536)

<div class="topic-metadata">

**Author:** [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Replies:** 12\
**Last updated:** [April 17, 2026, 3:23pm UTC](https://discourse.julialang.org/t/time-to-build-system-and-problem-is-slower-in-julia-1-12-with-mtkv11/135536 "2026-04-17T15:23:38Z")

</div>

Hi, while I was trying the new version (v11) of ModelingToolkit.jl , I noticed it took longer to build the ODE system and problem under Julia 1.12. Here is the GitHub actions workflow running the script using ModelingT…

---

## [Vibe-coded modelingtoolkit code generation for PDEs](https://discourse.julialang.org/t/vibe-coded-modelingtoolkit-code-generation-for-pdes/136701)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 0\
**Last updated:** [April 13, 2026, 4:55pm UTC](https://discourse.julialang.org/t/vibe-coded-modelingtoolkit-code-generation-for-pdes/136701 "2026-04-13T16:55:53Z")

</div>

The current released version of ModelingToolkit.jl + MethodOfLines.jl doesn’t really work when the number of variables x the number of grid points is more than ~1,000. In case it is of interest, I’ve created some vibe-c…

---

## [Does a very large number of observed variables (3207 vs 1188 equations) significantly increase ODEProblem memory?](https://discourse.julialang.org/t/does-a-very-large-number-of-observed-variables-3207-vs-1188-equations-significantly-increase-odeproblem-memory/136618)

<div class="topic-metadata">

**Author:** [@chen\_hardworking](https://discourse.julialang.org/u/chen_hardworking)\
**Replies:** 2\
**Last updated:** [April 10, 2026, 7:57am UTC](https://discourse.julialang.org/t/does-a-very-large-number-of-observed-variables-3207-vs-1188-equations-significantly-increase-odeproblem-memory/136618 "2026-04-10T07:57:18Z")

</div>

Hi SciML team and community, I’m developing PowerEMT.jl, an open-source Julia package for Electromagnetic Transient (EMT) simulation of large power systems using ModelingToolkit.jl, specifically for IBR-dominated power …

---

## [Create a delay element with DelayDiffEq](https://discourse.julialang.org/t/create-a-delay-element-with-delaydiffeq/136349)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 8:09pm UTC](https://discourse.julialang.org/t/create-a-delay-element-with-delaydiffeq/136349 "2026-03-23T20:09:21Z")

</div>

Hi, I am trying to simulate this simple example of a step input signal to a First Order Plus Delay process with ModelingToolkit and DelayDiffEq but it runs into an error. I wonder if it is possible to make this approach…

---

## [Evaluating arbitrary symbolic expression on ODE solution](https://discourse.julialang.org/t/evaluating-arbitrary-symbolic-expression-on-ode-solution/136130)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 2\
**Last updated:** [March 11, 2026, 9:23am UTC](https://discourse.julialang.org/t/evaluating-arbitrary-symbolic-expression-on-ode-solution/136130 "2026-03-11T09:23:56Z")

</div>

If I have an ODESolution, I can evaluate some variable at some t=5 with sol(5, idxs=sys.some\_variable), but what if I have EvalAt(15)(sys.some\_variable) - EvalAt(10)(sys.other\_variable). This is a reasonable expression t…

---

## [Bisecting regressions across dependencies](https://discourse.julialang.org/t/bisecting-regressions-across-dependencies/135985)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 6\
**Last updated:** [March 6, 2026, 6:54am UTC](https://discourse.julialang.org/t/bisecting-regressions-across-dependencies/135985 "2026-03-06T06:54:07Z")

</div>

I have this medium-sized industrial model written in ModelingToolkit, optimized via Optimization.jl. When I run it (warm) in my environment from January 22nd, it completes in less than a second. However, after updating m…

---

## [Precompilation error with Catalyst (Circular dependency)](https://discourse.julialang.org/t/precompilation-error-with-catalyst-circular-dependency/136013)

<div class="topic-metadata">

**Author:** [@Luca\_Maria\_Moccia](https://discourse.julialang.org/u/Luca_Maria_Moccia)\
**Replies:** 3\
**Last updated:** [March 4, 2026, 4:23pm UTC](https://discourse.julialang.org/t/precompilation-error-with-catalyst-circular-dependency/136013 "2026-03-04T16:23:37Z")

</div>

Hello everyone, I am currently working on a biology modeling project for my Master’s internship, using an environment provided by my lab. When trying to load our local package (which depends heavily on the SciML ecosys…

---

## [MTK - Any models of electrical machines?](https://discourse.julialang.org/t/mtk-any-models-of-electrical-machines/135446)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 4, 2026, 2:23pm UTC](https://discourse.julialang.org/t/mtk-any-models-of-electrical-machines/135446 "2026-02-04T14:23:51Z")

</div>

Are there any models of electrical machines already available that are programmed using MTK? I am looking for: DC machine asynchronous machine synchronous machine two-speed Dahlander motor

---

## [Direct collocation, stiff dynamics, and discrete adjoints — where does the instability go?](https://discourse.julialang.org/t/direct-collocation-stiff-dynamics-and-discrete-adjoints-where-does-the-instability-go/135385)

<div class="topic-metadata">

**Author:** [@PhysicsBender](https://discourse.julialang.org/u/PhysicsBender)\
**Replies:** 3\
**Last updated:** [February 1, 2026, 1:33pm UTC](https://discourse.julialang.org/t/direct-collocation-stiff-dynamics-and-discrete-adjoints-where-does-the-instability-go/135385 "2026-02-01T13:33:00Z")

</div>

Hi all, I’ve been experimenting with ModelingToolkit.jl and InfiniteOpt.jl for direct-collocation optimal control problems. In my model I am using smooth boolean logic that is based on hyperbolic functions quite extensi…

[Next page](https://discourse.julialang.org/tag/modelingtoolkit/535.md?match_all_tags=true&page=1&tags%5B%5D=modelingtoolkit)
