# Simulating MJPs many times with different parameters as inner loop

**URL:** <https://discourse.julialang.org/t/simulating-mjps-many-times-with-different-parameters-as-inner-loop/49061>\
**Category:** New to Julia\
**Tags:** diffeq\
**Created:** [October 26, 2020, 5:37pm UTC](https://discourse.julialang.org/t/simulating-mjps-many-times-with-different-parameters-as-inner-loop/49061 "2020-10-26T17:37:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 26, 2020, 6:25pm UTC](https://discourse.julialang.org/t/simulating-mjps-many-times-with-different-parameters-as-inner-loop/49061/2 "2020-10-26T18:25:51Z")

</div>

I cannot go deeply in your code to see if this makes sense, but maybe this thread is useful to give you insights:

> [@Define data-dependent function, various ways](https://discourse.julialang.org/t/define-data-dependent-function-various-ways/48988):
>
> This is a topic that is frequently raised here (I have asked this before). The problem is that of defining a function that will be input as a parameter for a solver, but the function depends on data while the function call inside the solver does not have a field to accept the data. Usually, the first try of a new programmer is to set the data on global variables, which is very detrimental to performance. Soon one finds out that if one declares the data as a constant global the performance is goo…

---

_[View the full topic](https://discourse.julialang.org/t/simulating-mjps-many-times-with-different-parameters-as-inner-loop/49061)._
