# 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:** 3

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**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/3 "2024-07-29T09:29:39Z")

</div>

See [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757) , especially the point about **making a minimal working example**. What’s `random_model()`?

p.s.: Please don’t tag me to your posts. I do not know you on a personal level and tagging someone happens on an individual level.

---

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