# Modelling & Simulations

**URL:** https://discourse.julialang.org/c/domain/models/21.md?page=8

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

**Page:** 9

---

## [How to remake a SteadyStateProblem efficiently](https://discourse.julialang.org/t/how-to-remake-a-steadystateproblem-efficiently/130376)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 2\
**Last updated:** [July 1, 2025, 6:11pm UTC](https://discourse.julialang.org/t/how-to-remake-a-steadystateproblem-efficiently/130376 "2025-07-01T18:11:28Z")

</div>

I am trying to efficiently reinitialize a SteadyStateProblem, built from a ModelingToolkit System. steady\_prob = SteadyStateProblem(prob) steady\_prob = remake(steady\_prob; u0=new\_u0) But this doesn’t actually change th…

---

## [MTK query when dealing with vector variables](https://discourse.julialang.org/t/mtk-query-when-dealing-with-vector-variables/130366)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 3\
**Last updated:** [July 1, 2025, 5:23pm UTC](https://discourse.julialang.org/t/mtk-query-when-dealing-with-vector-variables/130366 "2025-07-01T17:23:06Z")

</div>

Hello, When I run the following toy case I get the following problem: using ModelingToolkit, SteadyStateDiffEq @independent\_variables t function my\_fun(;name,N=100) vars = @variables begin x(t)\[1:N+1\], …

---

## [Unit Validation and Inspection with MTK - error in the documentation?](https://discourse.julialang.org/t/unit-validation-and-inspection-with-mtk-error-in-the-documentation/112145)

<div class="topic-metadata">

**Author:** [@kraqbi](https://discourse.julialang.org/u/kraqbi)\
**Replies:** 3\
**Last updated:** [July 1, 2025, 2:10pm UTC](https://discourse.julialang.org/t/unit-validation-and-inspection-with-mtk-error-in-the-documentation/112145 "2025-07-01T14:10:34Z")

</div>

Hello! This is my first post here, so please forgive me if I do not master all conventions yet. I plan to add units verification of my model using the available tools from ModelingToolkit. I was trying to reproduce th…

---

## [NeuralIntegrator: Spiking neural network and synaptic plasticity in DifferentialEquations.jl](https://discourse.julialang.org/t/neuralintegrator-spiking-neural-network-and-synaptic-plasticity-in-differentialequations-jl/130295)

<div class="topic-metadata">

**Author:** [@flmuk](https://discourse.julialang.org/u/flmuk)\
**Replies:** 1\
**Last updated:** [July 1, 2025, 8:09am UTC](https://discourse.julialang.org/t/neuralintegrator-spiking-neural-network-and-synaptic-plasticity-in-differentialequations-jl/130295 "2025-07-01T08:09:13Z")

</div>

NeuralIntegrator: simulating spiking neural networks with discontinuities I work in the field of computational neuroscience and model spiking neural networks (SNNs) with different synaptic plasticity rules, i.e. rules o…

---

## [Morris Screening Method reduces the number of parameters](https://discourse.julialang.org/t/morris-screening-method-reduces-the-number-of-parameters/130258)

<div class="topic-metadata">

**Author:** [@AlirezaMiraliakbar](https://discourse.julialang.org/u/AlirezaMiraliakbar)\
**Replies:** 1\
**Last updated:** [June 27, 2025, 11:09am UTC](https://discourse.julialang.org/t/morris-screening-method-reduces-the-number-of-parameters/130258 "2025-06-27T11:09:22Z")

</div>

Hello Everyone, I am new to GlobalSensitivity.jl. I am trying to find the most sensitive parameters in my large ODE system which has 37 parameters. I gave all parameter ranges and set p\_steps 10 for all parameters in a …

---

## [Bifurcation diagram 2D reaction diffusion type system on GPU](https://discourse.julialang.org/t/bifurcation-diagram-2d-reaction-diffusion-type-system-on-gpu/128490)

<div class="topic-metadata">

**Author:** [@mellever](https://discourse.julialang.org/u/mellever)\
**Replies:** 5\
**Last updated:** [June 25, 2025, 9:48am UTC](https://discourse.julialang.org/t/bifurcation-diagram-2d-reaction-diffusion-type-system-on-gpu/128490 "2025-06-25T09:48:56Z")

</div>

Hi all, This is my first time posting, so forgive me if I am not following the proper etiquette. I am currently working on computing bifurcation diagrams of 2D reaction diffusion type models (e.g. Brusselator model) wi…

---

## [Agent based network model using EventQueueABM](https://discourse.julialang.org/t/agent-based-network-model-using-eventqueueabm/129889)

<div class="topic-metadata">

**Author:** [@zoek](https://discourse.julialang.org/u/zoek)\
**Replies:** 15\
**Last updated:** [June 24, 2025, 7:33pm UTC](https://discourse.julialang.org/t/agent-based-network-model-using-eventqueueabm/129889 "2025-06-24T19:33:02Z")

</div>

Hello, I’m trying to use EventQueueABM from agents.jl on a completely connected network to model disease spread (susceptible, exposed, infected and recovered states). Since it’s completely connected, I believe I should b…

---

## [Nested loop in @mtkmodel / Matrix manipulation](https://discourse.julialang.org/t/nested-loop-in-mtkmodel-matrix-manipulation/130133)

<div class="topic-metadata">

**Author:** [@madtorresga](https://discourse.julialang.org/u/madtorresga)\
**Replies:** 2\
**Last updated:** [June 23, 2025, 4:56pm UTC](https://discourse.julialang.org/t/nested-loop-in-mtkmodel-matrix-manipulation/130133 "2025-06-23T16:56:09Z")

</div>

Hi :slight\_smile: I’m trying to automate the battery cells’ creation from an already defined ECM model: const Qs = \[4.8 4.4 4.2 ; 3.7 3.5 3.3\] @mtkmodel Series\_Connection begin @variables begin v\_max …

---

## [Modeling piecewise linear diodes (discontinuous behaviors) with Dyad?](https://discourse.julialang.org/t/modeling-piecewise-linear-diodes-discontinuous-behaviors-with-dyad/130058)

<div class="topic-metadata">

**Author:** [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Replies:** 5\
**Last updated:** [June 23, 2025, 9:45am UTC](https://discourse.julialang.org/t/modeling-piecewise-linear-diodes-discontinuous-behaviors-with-dyad/130058 "2025-06-23T09:45:47Z")

</div>

Hello, In the light of Dyad announcement, and perhaps as a continuation of the Ideal Diode and Ideal Switch instability problem or Diode model not working as expected with ModelingToolkit discussions, I’d like to know h…

---

## [Sensitivity of an ODEProblem defined by another package (QuantumToolbox)](https://discourse.julialang.org/t/sensitivity-of-an-odeproblem-defined-by-another-package-quantumtoolbox/129654)

<div class="topic-metadata">

**Author:** [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)\
**Replies:** 6\
**Last updated:** [June 23, 2025, 9:08am UTC](https://discourse.julialang.org/t/sensitivity-of-an-odeproblem-defined-by-another-package-quantumtoolbox/129654 "2025-06-23T09:08:12Z")

</div>

I am interested in calculating derivatives of a quantum state defined by QuantumToolbox with respect to system parameters in order to calculate quantum fisher information. I have found initial success with a finite diffe…

---

## [Catalyst.jl - what is the appropriate way to model energy?](https://discourse.julialang.org/t/catalyst-jl-what-is-the-appropriate-way-to-model-energy/130088)

<div class="topic-metadata">

**Author:** [@spackman](https://discourse.julialang.org/u/spackman)\
**Replies:** 6\
**Last updated:** [June 23, 2025, 1:33am UTC](https://discourse.julialang.org/t/catalyst-jl-what-is-the-appropriate-way-to-model-energy/130088 "2025-06-23T01:33:40Z")

</div>

Hi there! I’m interested in tracking the thermodynamics of a chemical system along with the kinetics, but I don’t see any example documentation that would indicate the best/native way to do this. I think in an older ve…

---

## [Building Catalyst.jl reaction network from a .csv file - error in construction?](https://discourse.julialang.org/t/building-catalyst-jl-reaction-network-from-a-csv-file-error-in-construction/130043)

<div class="topic-metadata">

**Author:** [@spackman](https://discourse.julialang.org/u/spackman)\
**Replies:** 6\
**Last updated:** [June 20, 2025, 8:51pm UTC](https://discourse.julialang.org/t/building-catalyst-jl-reaction-network-from-a-csv-file-error-in-construction/130043 "2025-06-20T20:51:51Z")

</div>

Hey Julia crew! I am trying to import a reaction network from a .csv file to use with Catalyst.jl via Reaction NetworkImporters.jl. I have been able to successfully construct a ReactionSystem object which can print its…

---

## [Continuous event detection with @mtkmodel - multiple events](https://discourse.julialang.org/t/continuous-event-detection-with-mtkmodel-multiple-events/130037)

<div class="topic-metadata">

**Author:** [@RThul](https://discourse.julialang.org/u/RThul)\
**Replies:** 2\
**Last updated:** [June 20, 2025, 8:11am UTC](https://discourse.julialang.org/t/continuous-event-detection-with-mtkmodel-multiple-events/130037 "2025-06-20T08:11:57Z")

</div>

I’m trying to detect multiple events in a system of ODEs. Basically, as soon as any variable crosses a threshold, the value of that variable is changed. I know I can achieve this by explicitly coding up these conditions …

---

## [Clarification on save/load\_checkpoint() and populate\_from\_csv!()](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 0\
**Last updated:** [June 18, 2025, 1:32pm UTC](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990 "2025-06-18T13:32:23Z")

</div>

Dear all, I’m working on a relatively large agent-based model (ABM) for fish populations, without explicit spatial structure, using Agents.jl. The model includes individual stochasticity in parameter values and uses mul…

---

## [SymbolicRegression stuck at version 0.22.2](https://discourse.julialang.org/t/symbolicregression-stuck-at-version-0-22-2/129823)

<div class="topic-metadata">

**Author:** [@Sam\_P](https://discourse.julialang.org/u/Sam_P)\
**Replies:** 6\
**Last updated:** [June 15, 2025, 5:23am UTC](https://discourse.julialang.org/t/symbolicregression-stuck-at-version-0-22-2/129823 "2025-06-15T05:23:05Z")

</div>

Hi all. Just playing around with SymbolicRegression.jl and notice the version kept getting stuck on v0.22.2 instead of the latest v1.11.1. And when I force install that version, the ForwardDiff.jl went from 1.0.1 down to…

---

## [Acausal component based modelling including neural network components](https://discourse.julialang.org/t/acausal-component-based-modelling-including-neural-network-components/99111)

<div class="topic-metadata">

**Author:** [@Dhruva2](https://discourse.julialang.org/u/Dhruva2)\
**Replies:** 9\
**Last updated:** [June 13, 2025, 8:58am UTC](https://discourse.julialang.org/t/acausal-component-based-modelling-including-neural-network-components/99111 "2025-06-13T08:58:18Z")

</div>

Hello all, A high level question. I want to do acausal, component-based modelling as on the ModelingToolkit.jl docs. In particular, I want to include some components that are neural networks. IE build a ‘universal dif…

---

## [LowLevelParticleFilters compatibility with ComponentArrays](https://discourse.julialang.org/t/lowlevelparticlefilters-compatibility-with-componentarrays/129830)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 4\
**Last updated:** [June 12, 2025, 2:51pm UTC](https://discourse.julialang.org/t/lowlevelparticlefilters-compatibility-with-componentarrays/129830 "2025-06-12T14:51:37Z")

</div>

I’m developing a Kalman Filter for a system that is made up of many components. Since the model is somewhat big I was hoping to use a ComponentArray to extract individual system (and subsystem) states from the state vec…

---

## [Array and clocked signal](https://discourse.julialang.org/t/array-and-clocked-signal/129778)

<div class="topic-metadata">

**Author:** [@yjr](https://discourse.julialang.org/u/yjr)\
**Replies:** 2\
**Last updated:** [June 11, 2025, 1:26pm UTC](https://discourse.julialang.org/t/array-and-clocked-signal/129778 "2025-06-11T13:26:54Z")

</div>

Hello, I m basically trying to implement a PRBS or similar signal generator using vector and discrete clock signal. But it does not seem that both can be handled simultaenously. Am I right or is there a way to use both …

---

## [TerminateSteadyState callback on DiscreteProblem?](https://discourse.julialang.org/t/terminatesteadystate-callback-on-discreteproblem/129670)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 5\
**Last updated:** [June 9, 2025, 2:27pm UTC](https://discourse.julialang.org/t/terminatesteadystate-callback-on-discreteproblem/129670 "2025-06-09T14:27:20Z")

</div>

Hi all, I’d like to use TerminateSteadyState from DiffEqCallbacks.jl on a DiscreteProblem, but the default test function is based on derivatives (which my model doesn’t have). I see that one can define their own test fu…

---

## [Symbolics & MTK Pipeline - Lagrangians](https://discourse.julialang.org/t/symbolics-mtk-pipeline-lagrangians/129730)

<div class="topic-metadata">

**Author:** [@Gray\_GALLANT](https://discourse.julialang.org/u/Gray_GALLANT)\
**Replies:** 2\
**Last updated:** [June 9, 2025, 4:04am UTC](https://discourse.julialang.org/t/symbolics-mtk-pipeline-lagrangians/129730 "2025-06-09T04:04:46Z")

</div>

Hello, I am trying to use Symbolics.jl with ModelingToolkit. I’m confused on how to properly use the two packages together to define a Lagrangian that can be integrated in MTK. I suspect that my approach (broadly) is in…

---

## [MTK : equations, unkowns and initial cond different lengths](https://discourse.julialang.org/t/mtk-equations-unkowns-and-initial-cond-different-lengths/129642)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 7\
**Last updated:** [June 6, 2025, 6:53am UTC](https://discourse.julialang.org/t/mtk-equations-unkowns-and-initial-cond-different-lengths/129642 "2025-06-06T06:53:13Z")

</div>

Hello, I am playing with a toy problem and I have a query with internal equation generation. The following will fail using ModelingToolkit using ModelingToolkit: t\_nounits as t, D\_nounits as D @component function m…

---

## [Why is the margin() function returning NaN?](https://discourse.julialang.org/t/why-is-the-margin-function-returning-nan/129561)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [June 2, 2025, 3:13pm UTC](https://discourse.julialang.org/t/why-is-the-margin-function-returning-nan/129561 "2025-06-02T15:13:51Z")

</div>

I have the following linear state space system for 8 m/s wind: julia\> @time include("mwes/mwe\_06.jl") StateSpace{Continuous, Float64} A = 0.0 0.0 0.217328 0.0 -142.50000000000003 -0.162450000…

---

## [DifferentialEquations.jl Mass Matrix DAE Explicit](https://discourse.julialang.org/t/differentialequations-jl-mass-matrix-dae-explicit/129447)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 3\
**Last updated:** [May 29, 2025, 8:07pm UTC](https://discourse.julialang.org/t/differentialequations-jl-mass-matrix-dae-explicit/129447 "2025-05-29T20:07:25Z")

</div>

Are any of the methods listed at Mass Matrix and Fully Implicit DAE Solvers · DifferentialEquations.jl explicit in time, and therefore not require a Jacobian? Reason for asking is that solving time-dependent Stokes flow…

---

## [BMS Current Control using Callbacks in ModelingToolKit](https://discourse.julialang.org/t/bms-current-control-using-callbacks-in-modelingtoolkit/129336)

<div class="topic-metadata">

**Author:** [@madtorresga](https://discourse.julialang.org/u/madtorresga)\
**Replies:** 2\
**Last updated:** [May 29, 2025, 1:38pm UTC](https://discourse.julialang.org/t/bms-current-control-using-callbacks-in-modelingtoolkit/129336 "2025-05-29T13:38:17Z")

</div>

I want to implement a battery management system that simulates the internal behaviour of a cell (ECM), and controls the incoming current based on a voltage limit (here 3.8V). I’m trying to do this using ModelingToolkit.j…

---

## [Remake problem with modeltoolkitized ODE function](https://discourse.julialang.org/t/remake-problem-with-modeltoolkitized-ode-function/118339)

<div class="topic-metadata">

**Author:** [@Vitor\_Patricio\_Canta](https://discourse.julialang.org/u/Vitor_Patricio_Canta)\
**Replies:** 1\
**Last updated:** [May 29, 2025, 12:08am UTC](https://discourse.julialang.org/t/remake-problem-with-modeltoolkitized-ode-function/118339 "2025-05-29T00:08:40Z")

</div>

Hi, I have a model that follows more or less the reccomendations of the “Solving Large Stiff Equations” tutorial that I was trying to optimize the parameters for. However I have encountered a problem with the remake app…

---

## [How to resolve a nonlinear equations system in GPU (parallel)](https://discourse.julialang.org/t/how-to-resolve-a-nonlinear-equations-system-in-gpu-parallel/118226)

<div class="topic-metadata">

**Author:** [@Juan\_jose](https://discourse.julialang.org/u/Juan_jose)\
**Replies:** 4\
**Last updated:** [May 29, 2025, 12:05am UTC](https://discourse.julialang.org/t/how-to-resolve-a-nonlinear-equations-system-in-gpu-parallel/118226 "2025-05-29T00:05:20Z")

</div>

Hello, I’m new using Julia and I’m trying to solve a large system of nonlinear equations (\>768 equations, \>200 unknowns). I was reading the documentation for NonlinearSolve.jl, and although it mentioned that for solvers …

---

## [BifurcationKit nd point periodic orbit](https://discourse.julialang.org/t/bifurcationkit-nd-point-periodic-orbit/129384)

<div class="topic-metadata">

**Author:** [@Mehmet\_On](https://discourse.julialang.org/u/Mehmet_On)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 9:58am UTC](https://discourse.julialang.org/t/bifurcationkit-nd-point-periodic-orbit/129384 "2025-05-28T09:58:32Z")

</div>

Hello, I am new to Julia and BifurcationKit.jl. I would like to simulate a model, 6 differential equations, 4 complex 2 real variables. Because I am new, I started from a simplified version, 2 equations, 2 complex variab…

---

## [Deriving the Jacobians without MTK](https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [May 26, 2025, 7:58pm UTC](https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203 "2025-05-26T19:58:46Z")

</div>

I have a nonlinear, numeric model. The model uses a non-linear solver internally. It has three inputs, one output and many parameters. How can I calculate the Jacobians of a linearized model? Can I use AutoFiniteDiff() …

---

## [Ordering of unknowns(system) in MTK when array-valued variables are scalarized via structural\_simplify](https://discourse.julialang.org/t/ordering-of-unknowns-system-in-mtk-when-array-valued-variables-are-scalarized-via-structural-simplify/129358)

<div class="topic-metadata">

**Author:** [@sass-jacob](https://discourse.julialang.org/u/sass-jacob)\
**Replies:** 3\
**Last updated:** [May 26, 2025, 9:41pm UTC](https://discourse.julialang.org/t/ordering-of-unknowns-system-in-mtk-when-array-valued-variables-are-scalarized-via-structural-simplify/129358 "2025-05-26T21:41:01Z")

</div>

What is the current rule for ordering of array-valued variables once structural\_simplify has been called and sort\_eqs is set to false? My current array has something like this: unknowns(sys)\[221:230\] (Φ\_s\_c(t))\[2\] (Φ…

---

## [Problem with upper absorbing boundary with MethodOfLines.jl](https://discourse.julialang.org/t/problem-with-upper-absorbing-boundary-with-methodoflines-jl/129333)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [May 26, 2025, 10:16am UTC](https://discourse.julialang.org/t/problem-with-upper-absorbing-boundary-with-methodoflines-jl/129333 "2025-05-26T10:16:41Z")

</div>

Hi everyone, the following code runs, but my system leaks mass, due to the upper boundary - N should be constant. using ModelingToolkit using DifferentialEquations using MethodOfLines using DomainSets using Plots @para…

[Previous page](https://discourse.julialang.org/c/domain/models/21.md?page=7)

[Next page](https://discourse.julialang.org/c/domain/models/21.md?page=9)
