# Modelling & Simulations

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

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

**Page:** 46

---

## [Simulation with Mamba.jl or something else](https://discourse.julialang.org/t/simulation-with-mamba-jl-or-something-else/84331)

<div class="topic-metadata">

**Author:** [@bwanab](https://discourse.julialang.org/u/bwanab)\
**Replies:** 0\
**Last updated:** [July 16, 2022, 7:33pm UTC](https://discourse.julialang.org/t/simulation-with-mamba-jl-or-something-else/84331 "2022-07-16T19:33:35Z")

</div>

As background, I’m going through Allen Downey’s ThinkBayes 2nd edition. My double pedagogical approach is that I’m translating all the examples and exercises to equivalent Julia code from the original python. Through cha…

---

## [ModelingToolkitStandardLibrary and Optimization](https://discourse.julialang.org/t/modelingtoolkitstandardlibrary-and-optimization/84146)

<div class="topic-metadata">

**Author:** [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Replies:** 6\
**Last updated:** [July 16, 2022, 5:15am UTC](https://discourse.julialang.org/t/modelingtoolkitstandardlibrary-and-optimization/84146 "2022-07-16T05:15:06Z")

</div>

Hi All, I want to optimize the Model created based on ModelingToolkitStandardLibrary. So I have a small RC-Model copied from the official documentation to ModelingToolkitStandardLibrary. module Grid export get\_model …

---

## [Stability issue with MethodOfLines](https://discourse.julialang.org/t/stability-issue-with-methodoflines/84133)

<div class="topic-metadata">

**Author:** [@marcofrancis](https://discourse.julialang.org/u/marcofrancis)\
**Replies:** 9\
**Last updated:** [July 13, 2022, 6:33pm UTC](https://discourse.julialang.org/t/stability-issue-with-methodoflines/84133 "2022-07-13T18:33:31Z")

</div>

Hi! I’m trying to solve a (I would think) simple PDE with MethodOfLines.jl The PDE in question is: \\partial\_\\tau g(τ,x) = \\frac{1}{2}σ^2\\partial^2\_{x} g(τ,x)+ λ(\\bar{x} - x)\*\\partial\_x g(τ,x) - r\*g(τ,x) g(0,x) = e^{…

---

## [Degree modification of multivariate polynomial chaos surrogate model](https://discourse.julialang.org/t/degree-modification-of-multivariate-polynomial-chaos-surrogate-model/84145)

<div class="topic-metadata">

**Author:** [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Replies:** 2\
**Last updated:** [July 13, 2022, 9:00am UTC](https://discourse.julialang.org/t/degree-modification-of-multivariate-polynomial-chaos-surrogate-model/84145 "2022-07-13T09:00:22Z")

</div>

Hello, I am using Surrogate.jl to build my polynomial choas surrogate model. The model is multivariate, with 4 input parameters, and 1D output. I want to change the parameter op = SurrogatesPolyChaos.GaussOrthoPoly(5) o…

---

## [Sample from csv to build surrogate model](https://discourse.julialang.org/t/sample-from-csv-to-build-surrogate-model/84031)

<div class="topic-metadata">

**Author:** [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Replies:** 4\
**Last updated:** [July 12, 2022, 6:15am UTC](https://discourse.julialang.org/t/sample-from-csv-to-build-surrogate-model/84031 "2022-07-12T06:15:30Z")

</div>

Hello I attempt to use Surrogate.jl to build a surrogate model of a set of measurement data, coming from a csv file. For the model, there will be 5 inputs and 1 output. I review the user manual of Surrogate.jl and I fin…

---

## [Need some help/review on ants model](https://discourse.julialang.org/t/need-some-help-review-on-ants-model/83790)

<div class="topic-metadata">

**Author:** [@reyman](https://discourse.julialang.org/u/reyman)\
**Replies:** 4\
**Last updated:** [July 9, 2022, 9:14am UTC](https://discourse.julialang.org/t/need-some-help-review-on-ants-model/83790 "2022-07-09T09:14:29Z")

</div>

Hi there, Last year i start to replicate the famous “Ants” model using Agents.jl with version 4.x The result was not bad, see the video and original repo : This year, to finish integration of Julia with…

---

## [Optimize a big model containing modules with different stiffness](https://discourse.julialang.org/t/optimize-a-big-model-containing-modules-with-different-stiffness/83530)

<div class="topic-metadata">

**Author:** [@Amarantine](https://discourse.julialang.org/u/Amarantine)\
**Replies:** 3\
**Last updated:** [July 9, 2022, 4:21am UTC](https://discourse.julialang.org/t/optimize-a-big-model-containing-modules-with-different-stiffness/83530 "2022-07-09T04:21:59Z")

</div>

Hello people! I have a few modules that I connected together as a big model. The modules have different stiffness. For example, module A is not stiff but runs very slowly for each time step (it has a delay component), bu…

---

## [Warnings on importing BifurcationKit with Julia 1.5.3](https://discourse.julialang.org/t/warnings-on-importing-bifurcationkit-with-julia-1-5-3/83755)

<div class="topic-metadata">

**Author:** [@BThomas](https://discourse.julialang.org/u/BThomas)\
**Replies:** 4\
**Last updated:** [July 7, 2022, 3:39pm UTC](https://discourse.julialang.org/t/warnings-on-importing-bifurcationkit-with-julia-1-5-3/83755 "2022-07-07T15:39:36Z")

</div>

I have the following packages installed for Julia 1.5.3 that ships with Debian/stable. (@v1.5) pkg\> status Status \`~/.julia/environments/v1.5/Project.toml\` \[aae01518\] BandedMatrices v0.16.13 \[0f109fa4\] BifurcationKi…

---

## [Questions on NeuralPDE.jl](https://discourse.julialang.org/t/questions-on-neuralpde-jl/83846)

<div class="topic-metadata">

**Author:** [@marcofrancis](https://discourse.julialang.org/u/marcofrancis)\
**Replies:** 5\
**Last updated:** [July 7, 2022, 3:31pm UTC](https://discourse.julialang.org/t/questions-on-neuralpde-jl/83846 "2022-07-07T15:31:17Z")

</div>

Hi, I’m quite new to Julia and I discovered this amazing package. I have a couple of questions regarding it: 1 - Should I use Lux or Flux? It seems that Lux is used in almost all examples, but when using the gpu one sho…

---

## [Callbacks on EnsembleProblem rather then on ODEProblem within Ensemble](https://discourse.julialang.org/t/callbacks-on-ensembleproblem-rather-then-on-odeproblem-within-ensemble/79359)

<div class="topic-metadata">

**Author:** [@mochell](https://discourse.julialang.org/u/mochell)\
**Replies:** 3\
**Last updated:** [July 6, 2022, 11:16am UTC](https://discourse.julialang.org/t/callbacks-on-ensembleproblem-rather-then-on-odeproblem-within-ensemble/79359 "2022-07-06T11:16:04Z")

</div>

Hi, I have an EnsembleProblem, or at least I want to model a system of equations with that. I want the ensemble member’s parameters to modify based on the solutions of some ensemble members every N timesteps. It is lik…

---

## [Instability in system with low abstol and "Larger maxiters is needed" DifferentialEquations.jl; DynamicalSystems.jl](https://discourse.julialang.org/t/instability-in-system-with-low-abstol-and-larger-maxiters-is-needed-differentialequations-jl-dynamicalsystems-jl/83741)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 13\
**Last updated:** [July 5, 2022, 7:54am UTC](https://discourse.julialang.org/t/instability-in-system-with-low-abstol-and-larger-maxiters-is-needed-differentialequations-jl-dynamicalsystems-jl/83741 "2022-07-05T07:54:40Z")

</div>

I have system Lienard with fixed parametres. I use alpha 0.20 and w = 0.7315 with t = 500000, when using default algorithm result is uncorrect. I use Feagin12 with abstol 20 and have problem with Instability, if i …

---

## [Delay Differential Equations Networks with different delay per edge](https://discourse.julialang.org/t/delay-differential-equations-networks-with-different-delay-per-edge/69787)

<div class="topic-metadata">

**Author:** [@Ger](https://discourse.julialang.org/u/Ger)\
**Replies:** 38\
**Last updated:** [July 4, 2022, 5:28pm UTC](https://discourse.julialang.org/t/delay-differential-equations-networks-with-different-delay-per-edge/69787 "2022-07-04T17:28:11Z")

</div>

Hi everyone! While Julia-evangelizing (as usual) in my research group, in order to encourage them to move to Julia I offered to convert some of their Python codes for solving a network of Kuramoto oscillators with delay …

---

## [Social Force equations in agents.jl](https://discourse.julialang.org/t/social-force-equations-in-agents-jl/82622)

<div class="topic-metadata">

**Author:** [@Fatima](https://discourse.julialang.org/u/Fatima)\
**Replies:** 2\
**Last updated:** [July 4, 2022, 11:17am UTC](https://discourse.julialang.org/t/social-force-equations-in-agents-jl/82622 "2022-07-04T11:17:24Z")

</div>

Hello, I’m new to agents.jl and am planning on creating an agent based model for an evacuation simulation that integrates the impacts of psychological factors on agent velocity. Does the agents.jl package utilize the soc…

---

## [Plug flow with ModelingToolkit?](https://discourse.julialang.org/t/plug-flow-with-modelingtoolkit/82547)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 14\
**Last updated:** [July 3, 2022, 1:18pm UTC](https://discourse.julialang.org/t/plug-flow-with-modelingtoolkit/82547 "2022-07-03T13:18:32Z")

</div>

Hi, Let’s say I have the following system: A reactor with volume V and two ports (in & out) Two fluid reservoirs, say of oil and water (with different specific densities) A valve selecting which of the reservoirs is c…

---

## [How to draw simulated data from a given turing model given specific parameters](https://discourse.julialang.org/t/how-to-draw-simulated-data-from-a-given-turing-model-given-specific-parameters/83413)

<div class="topic-metadata">

**Author:** [@neuro\_enthusiast](https://discourse.julialang.org/u/neuro_enthusiast)\
**Replies:** 3\
**Last updated:** [July 2, 2022, 3:04pm UTC](https://discourse.julialang.org/t/how-to-draw-simulated-data-from-a-given-turing-model-given-specific-parameters/83413 "2022-07-02T15:04:18Z")

</div>

I was wondering how I can simulate data given parameter values using a turing model? Any help would be great! ex. using Turing, Distributions @model function logistic\_regression(x, y, n, σ) intercept ~ Normal(0, σ)…

---

## [Speedup over cython/GSL ODE/SDE solvers?](https://discourse.julialang.org/t/speedup-over-cython-gsl-ode-sde-solvers/83490)

<div class="topic-metadata">

**Author:** [@kjohnsen](https://discourse.julialang.org/u/kjohnsen)\
**Replies:** 4\
**Last updated:** [July 1, 2022, 6:28pm UTC](https://discourse.julialang.org/t/speedup-over-cython-gsl-ode-sde-solvers/83490 "2022-07-01T18:28:30Z")

</div>

Hello there! I’m somewhat new to Julia. I’m scoping out a spiking neural network/ML project, and I’ve been using Brian 2 simulator a lot in Python. It would consist of training recurrent spiking neural networks to perfor…

---

## [Symbolic Arrays have issues with Complex Numbers](https://discourse.julialang.org/t/symbolic-arrays-have-issues-with-complex-numbers/83538)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 1\
**Last updated:** [June 30, 2022, 9:35am UTC](https://discourse.julialang.org/t/symbolic-arrays-have-issues-with-complex-numbers/83538 "2022-06-30T09:35:11Z")

</div>

I can’t work with complex numbers multiplying Symbolic Arrays. Here an example: using Symbolics, SpecialFunctions N = 3 @variables r\[1:N, 1:N\], ϕ\[1:N, 1:N\] H = hankelh1.(0, r) P = cos.(ϕ) Q = im.\*cos.(ϕ)# also does n…

---

## [Generalized affects in MTK - what's a good interface?](https://discourse.julialang.org/t/generalized-affects-in-mtk-whats-a-good-interface/83390)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 4\
**Last updated:** [June 29, 2022, 4:57pm UTC](https://discourse.julialang.org/t/generalized-affects-in-mtk-whats-a-good-interface/83390 "2022-06-29T16:57:08Z")

</div>

Hi, I’ve recently started a pull request in an attempt to add more generalized affect! support to MTK (and also to support discrete\_events, which is taken on by others) The reason I think this is needed is that in some…

---

## [We need more helpful error messages in ModelingToolkit](https://discourse.julialang.org/t/we-need-more-helpful-error-messages-in-modelingtoolkit/82917)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 11\
**Last updated:** [June 29, 2022, 4:13pm UTC](https://discourse.julialang.org/t/we-need-more-helpful-error-messages-in-modelingtoolkit/82917 "2022-06-29T16:13:58Z")

</div>

Hi, Trying to solve a model, I’m getting a really unhelpful message: @named x = MixingVolume() sys = structural\_simplify(x) prob = ODAEProblem(sys, \[\], (0, 10.0)) sol = solve(prob, Tsit5()) MethodError: no method …

---

## [Favorite lectures on the Finite Element Method?](https://discourse.julialang.org/t/favorite-lectures-on-the-finite-element-method/83211)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 4\
**Last updated:** [June 29, 2022, 3:22pm UTC](https://discourse.julialang.org/t/favorite-lectures-on-the-finite-element-method/83211 "2022-06-29T15:22:12Z")

</div>

Do you have a favorite set of lectures on the Finite Element Method? Possibly a set of lectures with a heavy list of programming exercises that encourages students to build all the building blocks of a modern software li…

---

## [Where can I find documentation for instream()](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 3\
**Last updated:** [June 26, 2022, 2:30pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355 "2022-06-26T14:30:36Z")

</div>

It seems that MTK has an instream() operator. I think this is inspired by Modelica’s similarly named operator. Are there any examples using instream()? I could only find a single test using it (in state\_selection.jl). …

---

## [Parameter estimation with ODEProblem/Turing error](https://discourse.julialang.org/t/parameter-estimation-with-odeproblem-turing-error/83281)

<div class="topic-metadata">

**Author:** [@jae0](https://discourse.julialang.org/u/jae0)\
**Replies:** 2\
**Last updated:** [June 25, 2022, 6:29pm UTC](https://discourse.julialang.org/t/parameter-estimation-with-odeproblem-turing-error/83281 "2022-06-25T18:29:11Z")

</div>

Hi, Trying to do parameter estimation and running into an error that I am not finding from a web search: type or paste code hereERROR: MethodError: no method matching translate!!(::Core.SSAValue, ::Tuple{Symbol, Symbol}…

---

## [Loss function with symbolic selection of variable parameters](https://discourse.julialang.org/t/loss-function-with-symbolic-selection-of-variable-parameters/64289)

<div class="topic-metadata">

**Author:** [@lamorton](https://discourse.julialang.org/u/lamorton)\
**Replies:** 2\
**Last updated:** [June 24, 2022, 11:26pm UTC](https://discourse.julialang.org/t/loss-function-with-symbolic-selection-of-variable-parameters/64289 "2022-06-24T23:26:57Z")

</div>

I’m trying to create a loss function with a reduced set of adjustable parameters. I’m using LabelledArrays to keep track of the parameters using symbolic names. What I’d like is to be able to say “hold this set of parame…

---

## [@variables parsing breaks on default value?](https://discourse.julialang.org/t/variables-parsing-breaks-on-default-value/82970)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 3\
**Last updated:** [June 18, 2022, 6:18pm UTC](https://discourse.julialang.org/t/variables-parsing-breaks-on-default-value/82970 "2022-06-18T18:18:39Z")

</div>

This code snippet: sts = @variables begin m\_flow(t), \[connect=Flow\], T(t)=T0, \[connect=Stream\] end Fails with: LoadError: AssertionError: @variables expects a tuple of expressions or an expression of a tuple (…

---

## [Catalyst Jump model and callbacks](https://discourse.julialang.org/t/catalyst-jump-model-and-callbacks/82967)

<div class="topic-metadata">

**Author:** [@jae0](https://discourse.julialang.org/u/jae0)\
**Replies:** 7\
**Last updated:** [June 18, 2022, 1:46pm UTC](https://discourse.julialang.org/t/catalyst-jump-model-and-callbacks/82967 "2022-06-18T13:46:57Z")

</div>

Hello, this is a question that looks related to the following: I am hoping to perturb the system state at multiple times using Catalyst / DiscreteProblem / JumpProblem. I have found the above answer as well as the re…

---

## [Parallelizing GSA - A size issue](https://discourse.julialang.org/t/parallelizing-gsa-a-size-issue/82964)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 1\
**Last updated:** [June 18, 2022, 12:43pm UTC](https://discourse.julialang.org/t/parallelizing-gsa-a-size-issue/82964 "2022-06-18T12:43:27Z")

</div>

Hi, I am looking to try and speed up my code and trying to following the example in the documentation here On running the below x = \[prob.u0;prob.p\] function circ(x) prob\_func(prob,i,repeat) = remake(prob;u0 = x\[1…

---

## [MTK and JuMP](https://discourse.julialang.org/t/mtk-and-jump/58161)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 6\
**Last updated:** [June 16, 2022, 3:15pm UTC](https://discourse.julialang.org/t/mtk-and-jump/58161 "2022-06-16T15:15:24Z")

</div>

I would like to use MTK to build a physical model and than use the equations and convert them into a JuMP model. Any ideas how to do that? My thoughs (based on Automatic Conversion of Julia Code to C Functions · Symboli…

---

## [RFC: Mitsuba2.jl - differentiable physics-based renderer](https://discourse.julialang.org/t/rfc-mitsuba2-jl-differentiable-physics-based-renderer/82879)

<div class="topic-metadata">

**Author:** [@alhirzel](https://discourse.julialang.org/u/alhirzel)\
**Replies:** 0\
**Last updated:** [June 16, 2022, 2:21pm UTC](https://discourse.julialang.org/t/rfc-mitsuba2-jl-differentiable-physics-based-renderer/82879 "2022-06-16T14:21:24Z")

</div>

Hey all, I wanted to share a package I started, and I am hoping to get feedback from anyone who is interested in physics-based rendering. My package, Mitsuba2.jl, brings the Mitsuba 2 renderer into Julia via its Python i…

---

## [ODE solver algorithms that exploit massive parallelism (eg GPU)?](https://discourse.julialang.org/t/ode-solver-algorithms-that-exploit-massive-parallelism-eg-gpu/82726)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 4\
**Last updated:** [June 15, 2022, 6:00am UTC](https://discourse.julialang.org/t/ode-solver-algorithms-that-exploit-massive-parallelism-eg-gpu/82726 "2022-06-15T06:00:03Z")

</div>

My scenario is that I’m solving some stiff ODE of O(100) variables with an ensemble of O(200) parameters. KenCarp4 or Rodas5 work the best that we’ve found. The problem is mildly sparse, but not super disconnected, and o…

---

## [Why are only ContinuousCallbacks exposed in ODESystem?](https://discourse.julialang.org/t/why-are-only-continuouscallbacks-exposed-in-odesystem/82623)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 11\
**Last updated:** [June 13, 2022, 4:49pm UTC](https://discourse.julialang.org/t/why-are-only-continuouscallbacks-exposed-in-odesystem/82623 "2022-06-13T16:49:12Z")

</div>

DifferentialEquations support both discrete and continuous callbacks - but it seems only the latter kind is available when using ModelingToolkit: function ODESystem(deqs::AbstractVector{\<:Equation}, iv, dvs, ps; …

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

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