# Modelling & Simulations

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

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

**Page:** 15

---

## [Global sensitivity analysis in a large parameter space - computational cost](https://discourse.julialang.org/t/global-sensitivity-analysis-in-a-large-parameter-space-computational-cost/93598)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 15\
**Last updated:** [November 26, 2024, 9:05pm UTC](https://discourse.julialang.org/t/global-sensitivity-analysis-in-a-large-parameter-space-computational-cost/93598 "2024-11-26T21:05:06Z")

</div>

Hi everyone, I have been working in a large biochemical reaction network and I try to perform Global sensitivity analysis (GSA) (see my last post). I was wondering if there are any advice, or suggestions regarding the e…

---

## [Using ForwardDiff for Symbolic.derivative() definition](https://discourse.julialang.org/t/using-forwarddiff-for-symbolic-derivative-definition/123035)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 7\
**Last updated:** [November 26, 2024, 12:49pm UTC](https://discourse.julialang.org/t/using-forwarddiff-for-symbolic-derivative-definition/123035 "2024-11-26T12:49:20Z")

</div>

I’ve only been playing with MTK.jl for a day or two, but I’m really impressed - the workflow here is so much nicer than using a dedicated acausal modelling language! I’m running into situations where judicious function r…

---

## [Simulating membrane Julia](https://discourse.julialang.org/t/simulating-membrane-julia/123084)

<div class="topic-metadata">

**Author:** [@Alma\_Thindberg](https://discourse.julialang.org/u/Alma_Thindberg)\
**Replies:** 0\
**Last updated:** [November 26, 2024, 9:36am UTC](https://discourse.julialang.org/t/simulating-membrane-julia/123084 "2024-11-26T09:36:10Z")

</div>

using Pkg Pkg.add("ModelingToolkit") Pkg.add("MethodOfLines") Pkg.add("DomainSets") Pkg.add("OrdinaryDiffEq") using ModelingToolkit, MethodOfLines, DomainSets, OrdinaryDiffEq include("Properties2.jl") import ModelingTo…

---

## [BifurcationKit: PeriodicOrbitOCollProblem Failure to converge with given tolerances](https://discourse.julialang.org/t/bifurcationkit-periodicorbitocollproblem-failure-to-converge-with-given-tolerances/123048)

<div class="topic-metadata">

**Author:** [@mmplac14](https://discourse.julialang.org/u/mmplac14)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 3:26pm UTC](https://discourse.julialang.org/t/bifurcationkit-periodicorbitocollproblem-failure-to-converge-with-given-tolerances/123048 "2024-11-25T15:26:10Z")

</div>

Hello! I am new to bifurcation analyis and I am working with BifurcationKit to reproduce the bifurcation analysis performed by Grimbert Faugueras on the Jansen-Rit model. I have managed to get the continuation graph. …

---

## [How to determine whether the rule of an DynamicalSystem instance is inplace?](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041)

<div class="topic-metadata">

**Author:** [@andreasmorr](https://discourse.julialang.org/u/andreasmorr)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 8:59am UTC](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041 "2024-11-25T08:59:01Z")

</div>

I would like to define a function that takes a DynamicalSystem ds as an argument and computes the Jacobian of dynamic\_rule(ds) for further analysis. For this, it would be good to know whether dynamic\_rule(ds) returns an …

---

## [Possibility of factorization for ODEs produced by a mass action chemical reaction network](https://discourse.julialang.org/t/possibility-of-factorization-for-odes-produced-by-a-mass-action-chemical-reaction-network/122950)

<div class="topic-metadata">

**Author:** [@adhalanay](https://discourse.julialang.org/u/adhalanay)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 11:29am UTC](https://discourse.julialang.org/t/possibility-of-factorization-for-odes-produced-by-a-mass-action-chemical-reaction-network/122950 "2024-11-22T11:29:12Z")

</div>

In the algebraic approach to mass action chemical reaction networks there is a very useful factorization of the RHS of the ODE system \\frac{dx}{dt}=Y\\cdot A\_k \\cdot \\Phi(x), where Y is the complex stoichiometric matr…

---

## [Solve can not solve nonlinear symbolic equations](https://discourse.julialang.org/t/solve-can-not-solve-nonlinear-symbolic-equations/122942)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 2\
**Last updated:** [November 22, 2024, 11:27am UTC](https://discourse.julialang.org/t/solve-can-not-solve-nonlinear-symbolic-equations/122942 "2024-11-22T11:27:37Z")

</div>

It seems like symbolic\_solve doesn’t symbolically solve nonlinear equations yet. Is this a feature that will be added in the future, so that I for example could do the following? Or is there some alternative way to do th…

---

## [Is it possible to simulate a resistive network using ModelingToolkit?](https://discourse.julialang.org/t/is-it-possible-to-simulate-a-resistive-network-using-modelingtoolkit/122690)

<div class="topic-metadata">

**Author:** [@Ricardo\_Borges](https://discourse.julialang.org/u/Ricardo_Borges)\
**Replies:** 16\
**Last updated:** [November 21, 2024, 12:15pm UTC](https://discourse.julialang.org/t/is-it-possible-to-simulate-a-resistive-network-using-modelingtoolkit/122690 "2024-11-21T12:15:15Z")

</div>

Hi, I’m trying to simulate a simple circuit of a constant voltage source connected to a resistor, using MTK. But I’m getting empty results when I solve the problem. Bear in mind this is a simple, toy problem, which I co…

---

## [Getting Catalyst and Oscar to work together](https://discourse.julialang.org/t/getting-catalyst-and-oscar-to-work-together/121299)

<div class="topic-metadata">

**Author:** [@adhalanay](https://discourse.julialang.org/u/adhalanay)\
**Replies:** 10\
**Last updated:** [November 20, 2024, 9:34pm UTC](https://discourse.julialang.org/t/getting-catalyst-and-oscar-to-work-together/121299 "2024-11-20T21:34:06Z")

</div>

This more of an extension of the previous topic https://discourse.julialang.org/t/finding-steady-states-symbolicaly/119545/18. First some background: commutative algebra is of great use for studying mass-action chemical…

---

## [Getting the symbolic solution of system of equations using ModelingToolKit](https://discourse.julialang.org/t/getting-the-symbolic-solution-of-system-of-equations-using-modelingtoolkit/122786)

<div class="topic-metadata">

**Author:** [@Ricardo\_Borges](https://discourse.julialang.org/u/Ricardo_Borges)\
**Replies:** 6\
**Last updated:** [November 20, 2024, 12:06pm UTC](https://discourse.julialang.org/t/getting-the-symbolic-solution-of-system-of-equations-using-modelingtoolkit/122786 "2024-11-20T12:06:03Z")

</div>

Hi, I have the following circuit, which is used to estimate the isolation resistance of high-voltage battery packs to the chassis / low-voltage reference. The switch SW is turned on and off, so there are 2 equations, to…

---

## [Tutorial on the portfolio liquidation problem with PDE deep learning - NeuralPDEs and MTK](https://discourse.julialang.org/t/tutorial-on-the-portfolio-liquidation-problem-with-pde-deep-learning-neuralpdes-and-mtk/122583)

<div class="topic-metadata">

**Author:** [@finmod](https://discourse.julialang.org/u/finmod)\
**Replies:** 1\
**Last updated:** [November 20, 2024, 11:07am UTC](https://discourse.julialang.org/t/tutorial-on-the-portfolio-liquidation-problem-with-pde-deep-learning-neuralpdes-and-mtk/122583 "2024-11-20T11:07:27Z")

</div>

I seek to bring to NeuralPDEs.jl and MTK as a tutorial combining the PDE system and the integro-differential demos the portfolio liquidation problem of the Mean Field Control literature. Here we consider the model propo…

---

## [Universal Differential Equations with Ensemble Problem](https://discourse.julialang.org/t/universal-differential-equations-with-ensemble-problem/121663)

<div class="topic-metadata">

**Author:** [@Piyush](https://discourse.julialang.org/u/Piyush)\
**Replies:** 6\
**Last updated:** [November 20, 2024, 11:03am UTC](https://discourse.julialang.org/t/universal-differential-equations-with-ensemble-problem/121663 "2024-11-20T11:03:43Z")

</div>

I am facing issues trying to develop UDE model using the Ensemble interface Kindly help me out. Here is the sample code and error I get using CSV, DataFrames, XLSX using Optimization, OptimizationPolyalgorithms,Optimiz…

---

## [Reinitializing the InitializationProb of an ODEProblem](https://discourse.julialang.org/t/reinitializing-the-initializationprob-of-an-odeproblem/122778)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 6\
**Last updated:** [November 20, 2024, 7:27am UTC](https://discourse.julialang.org/t/reinitializing-the-initializationprob-of-an-odeproblem/122778 "2024-11-20T07:27:57Z")

</div>

I am trying to re-initialize an ODEProblem with a new x-position on the last point pos\[1, end\]. A bit like in the example here: Initialization of ODESystems · ModelingToolkit.jl dt = 0.05 tol = 1e-6 tspan = …

---

## [\`@assert\` handling for symbolically registered functions in MTK](https://discourse.julialang.org/t/assert-handling-for-symbolically-registered-functions-in-mtk/122783)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 6:45pm UTC](https://discourse.julialang.org/t/assert-handling-for-symbolically-registered-functions-in-mtk/122783 "2024-11-18T18:45:57Z")

</div>

Hello, I would like to know if it is possible to have assert statements on parameters of an MTK component. For general @assert a \>1 cases it hit the error where symbolic expression appears in Boolean context. Toy Exam…

---

## [Linearization & ModelingToolkit -- what is wrong?](https://discourse.julialang.org/t/linearization-modelingtoolkit-what-is-wrong/122766)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 1:15pm UTC](https://discourse.julialang.org/t/linearization-modelingtoolkit-what-is-wrong/122766 "2024-11-18T13:15:18Z")

</div>

I’m simulating two nonlinear RC circuits in series (nonlinear resistances, ipp(u) instead of ipp=u/R). ModelingToolkit code + simulation# Importing packages using ModelingToolkit using ModelingToolkit: t\_nounits as t, D…

---

## [ModellingToolkit/ optimal control training](https://discourse.julialang.org/t/modellingtoolkit-optimal-control-training/122751)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 5:34am UTC](https://discourse.julialang.org/t/modellingtoolkit-optimal-control-training/122751 "2024-11-18T05:34:58Z")

</div>

A colleague of me is going to attend a three-day CASADI training. I told him: Only advantage of CASADI over ModingToolkit is: “CASADI supports special functionality for quadratic programming problems”, in all other asp…

---

## [Generating C code from JuMP.jl model](https://discourse.julialang.org/t/generating-c-code-from-jump-jl-model/122736)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 7\
**Last updated:** [November 17, 2024, 10:20pm UTC](https://discourse.julialang.org/t/generating-c-code-from-jump-jl-model/122736 "2024-11-17T22:20:53Z")

</div>

I have defined an MILP model in JuMP.jl. This model works great. Now I would like to implement it on a real time controller in C. Is there a way to generate C code for my model so that I can just copy paste it into my p…

---

## [Adding PID controller to a MIMO state space system](https://discourse.julialang.org/t/adding-pid-controller-to-a-mimo-state-space-system/122681)

<div class="topic-metadata">

**Author:** [@victor](https://discourse.julialang.org/u/victor)\
**Replies:** 7\
**Last updated:** [November 17, 2024, 6:55pm UTC](https://discourse.julialang.org/t/adding-pid-controller-to-a-mimo-state-space-system/122681 "2024-11-17T18:55:12Z")

</div>

I have a state space process with two inputs and one output. The inputs are highly coupled. I would like to add a PID controller to one of the inputs with the output as measurement value. But I’m having a hard time with …

---

## [Julia ❤️ ABM tutorial series](https://discourse.julialang.org/t/julia-abm-tutorial-series/99300)

<div class="topic-metadata">

**Author:** [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Replies:** 1\
**Last updated:** [November 17, 2024, 5:23pm UTC](https://discourse.julialang.org/t/julia-abm-tutorial-series/99300 "2024-11-17T17:23:37Z")

</div>

Julia :heart: ABM is a tutorial series on coding agent-based models in Julia. I write on it in irregular intervals - basically whenever I find some time to extend on it. List of issues so far: Julia :heart: ABM #0: Ag…

---

## [Initial condition underdefined in NonlinearProblem](https://discourse.julialang.org/t/initial-condition-underdefined-in-nonlinearproblem/122619)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 7\
**Last updated:** [November 15, 2024, 9:36am UTC](https://discourse.julialang.org/t/initial-condition-underdefined-in-nonlinearproblem/122619 "2024-11-15T09:36:24Z")

</div>

The following works: using ModelingToolkit, NonlinearSolve # Define a nonlinear system @variables x y z @parameters σ ρ β eqs = \[0 ~ σ \* (y - x) 0 ~ x \* (ρ - z) - y 0 ~ x \* y - β \* z\] @mtkbuild ns = Nonli…

---

## [Specifying analytical jacobian in NonlinearProblem](https://discourse.julialang.org/t/specifying-analytical-jacobian-in-nonlinearproblem/112932)

<div class="topic-metadata">

**Author:** [@askprash](https://discourse.julialang.org/u/askprash)\
**Replies:** 2\
**Last updated:** [April 14, 2024, 8:14pm UTC](https://discourse.julialang.org/t/specifying-analytical-jacobian-in-nonlinearproblem/112932 "2024-04-14T20:14:54Z")

</div>

Hi! I’m new to using NonlinearSolve.jl and trying to understand how to provide an analytical jacobian to the problem. I realize that this is unnecessary if we have autodiff in the mix since that will be enough - but in c…

---

## [Continuation of periodic orbits for full pendulum revolution in BifurcationKit.jl](https://discourse.julialang.org/t/continuation-of-periodic-orbits-for-full-pendulum-revolution-in-bifurcationkit-jl/122550)

<div class="topic-metadata">

**Author:** [@gplaar](https://discourse.julialang.org/u/gplaar)\
**Replies:** 3\
**Last updated:** [November 12, 2024, 3:58pm UTC](https://discourse.julialang.org/t/continuation-of-periodic-orbits-for-full-pendulum-revolution-in-bifurcationkit-jl/122550 "2024-11-12T15:58:39Z")

</div>

Hello everyone! I am new to bifurcation analysis and I am trying to work with BifurcationKit.jl for my Master’s project. The system I’m working on consists of a freely moving excentric mass coupled to a 2-dof aeroelast…

---

## [GSA with the Sobol method for steady-state solution error](https://discourse.julialang.org/t/gsa-with-the-sobol-method-for-steady-state-solution-error/122264)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 4\
**Last updated:** [November 7, 2024, 6:04pm UTC](https://discourse.julialang.org/t/gsa-with-the-sobol-method-for-steady-state-solution-error/122264 "2024-11-07T18:04:36Z")

</div>

I perform GSA with the Sobol method for a system of ODEs for steady-state but I get the following error: ERROR: TaskFailedException nested task error: MethodError: Cannot \`convert\` an object of type Vector{Float64} to…

---

## [MTK - equation with sqrt(x) vs. x^0.5?](https://discourse.julialang.org/t/mtk-equation-with-sqrt-x-vs-x-0-5/122341)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 8\
**Last updated:** [November 6, 2024, 8:06pm UTC](https://discourse.julialang.org/t/mtk-equation-with-sqrt-x-vs-x-0-5/122341 "2024-11-06T20:06:35Z")

</div>

I run a model (MTK) where one term of an equation does log(x^0.5). This seems to work sometimes, but also crashes for some parameter values when I do Monte Carlo simulation. If I change the term to log(sqrt(x)), the sim…

---

## [DCMotor example @named output throwing Latex error on analysis points](https://discourse.julialang.org/t/dcmotor-example-named-output-throwing-latex-error-on-analysis-points/121752)

<div class="topic-metadata">

**Author:** [@RobbesU](https://discourse.julialang.org/u/RobbesU)\
**Replies:** 10\
**Last updated:** [November 6, 2024, 3:57pm UTC](https://discourse.julialang.org/t/dcmotor-example-named-output-throwing-latex-error-on-analysis-points/121752 "2024-11-06T15:57:11Z")

</div>

Running the ModelingtoolkitStandardLibrary example DCMotor https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/tutorials/dc\_motor\_pi/ Running the code as is it throws below error in the @named model = DCMotor(): …

---

## [Computing sensitivity to Dirichlet data in Gridap.jl](https://discourse.julialang.org/t/computing-sensitivity-to-dirichlet-data-in-gridap-jl/108145)

<div class="topic-metadata">

**Author:** [@instant0n](https://discourse.julialang.org/u/instant0n)\
**Replies:** 1\
**Last updated:** [November 4, 2024, 12:42pm UTC](https://discourse.julialang.org/t/computing-sensitivity-to-dirichlet-data-in-gridap-jl/108145 "2024-11-04T12:42:03Z")

</div>

Hi all, happy holidays- I’m trying to use Gridap to invert the Laplace problem to determine Dirichlet data on the boundaries given some point measurements on the interior. The idea is to minimize the squared residual be…

---

## [StochasticDiffEq with Acausal modeling](https://discourse.julialang.org/t/stochasticdiffeq-with-acausal-modeling/121998)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 4\
**Last updated:** [November 3, 2024, 1:26pm UTC](https://discourse.julialang.org/t/stochasticdiffeq-with-acausal-modeling/121998 "2024-11-03T13:26:00Z")

</div>

Hello, I am trying to have a SDESystem instead of ODESystem for my acausal framework. The following block of code fails: using ModelingToolkit, Plots, DifferentialEquations, StochasticDiffEq using ModelingToolkit: t\_n…

---

## [SymbolicRegression via DataDrivenDiffEq throws error](https://discourse.julialang.org/t/symbolicregression-via-datadrivendiffeq-throws-error/122180)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [November 3, 2024, 10:59am UTC](https://discourse.julialang.org/t/symbolicregression-via-datadrivendiffeq-throws-error/122180 "2024-11-03T10:59:40Z")

</div>

I’m trying to fit a data-driven differential equation system via DataDrivenDiffEq. DMD and Sindy work fine, but symbolic regression fails. Any ideas what’s wrong? # Load libraries using OrdinaryDiffEq using DataDrivenDi…

---

## [Real-time input and plotting with ModelingToolkit](https://discourse.julialang.org/t/real-time-input-and-plotting-with-modelingtoolkit/120713)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 9\
**Last updated:** [November 1, 2024, 8:37am UTC](https://discourse.julialang.org/t/real-time-input-and-plotting-with-modelingtoolkit/120713 "2024-11-01T08:37:00Z")

</div>

I’d like to have an MTK model like D(x) = k\*x, and plot the solution in real time (after 1 second, the plot shows the solution from t=0 to t=1, etc.) I’d like k to be supplied by a real-time interactive slider (so that …

---

## [Tooling for inference and simulation on temporal point processes?](https://discourse.julialang.org/t/tooling-for-inference-and-simulation-on-temporal-point-processes/121885)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 0\
**Last updated:** [October 28, 2024, 5:08pm UTC](https://discourse.julialang.org/t/tooling-for-inference-and-simulation-on-temporal-point-processes/121885 "2024-10-28T17:08:27Z")

</div>

Hi all, I’m looking for advice (statistical and computational) to do something like the following simulation/inference for nonhomogeneous point processes (temporal, not considering space): Specify a “prior” for the in…

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

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