# Why step function doesn't recognise local model initialisation inside a function?

**URL:** <https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586>\
**Category:** Modelling & Simulations\
**Tags:** question, agents, agentsjl, eventqueueabm\
**Created:** [July 29, 2024, 9:10am UTC](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586 "2024-07-29T09:10:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [July 29, 2024, 9:29am UTC](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586/2 "2024-07-29T09:29:15Z")

</div>

Please refer to my comment here:

> [@Running EBM model in a function](https://discourse.julialang.org/t/running-ebm-model-in-a-function/117512/2):
>
> As usual, please provide a complete MWE, full stacktrace, and a proper description of your experienced issue and the expected behaviour.

---

_[View the full topic](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586)._
