# Microsimulation with Agents?

**URL:** https://discourse.julialang.org/t/microsimulation-with-agents/98119
**Category:** Modelling & Simulations
**Tags:** question, agents
**Created:** [April 30, 2023, 11:41am UTC](https://discourse.julialang.org/t/microsimulation-with-agents/98119 "2023-04-30T11:41:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)
#### Post date: [April 30, 2023, 11:41am UTC](https://discourse.julialang.org/t/microsimulation-with-agents/98119/1 "2023-04-30T11:41:00Z")

</div>

Is it possible to do a micro-simulation using `Agents.jl`? Some software pretend to do ABM and micro-simulation. Can it be real? What would be the right packages to do it in `Julia`?

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [April 30, 2023, 12:06pm UTC](https://discourse.julialang.org/t/microsimulation-with-agents/98119/2 "2023-04-30T12:06:39Z")

</div>

My guess is that `Agents.jl` would be a reasonable choice for micro-simulations, but I think its applicability could vary from case to case. ABM is generally well suited for modeling the interactions among discrete, heterogeneous entities. Is there a specific type of simulation that you are interested in performing? Having more information about your use case would give us a basis for specific recommendations.

---

<div class="post-metadata">

### Author: ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)
#### Post date: [April 30, 2023, 12:17pm UTC](https://discourse.julialang.org/t/microsimulation-with-agents/98119/3 "2023-04-30T12:17:42Z")

</div>

A possible example would be the estimation of the `gender pension gap` in my country in the next 20 years. I know that this has already been done using DYNAPOR and LIAM2 platform, but I am interested to see if there is any work done in `Julia`. I think there is some work on microsimulation in Julia done by Graham Stark on taxation, poverty and inequality.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [April 30, 2023, 1:10pm UTC](https://discourse.julialang.org/t/microsimulation-with-agents/98119/4 "2023-04-30T13:10:46Z")

</div>

I suppose there could be multiple ways to model the gender pension gap. So really, it would come down to the modeling approach and assumptions that you are using. For example, the spread of a virus could be modeled with [differential equations](https://docs.sciml.ai/DiffEqDocs/stable/) (e.g., SIR model), or [agent based models](https://juliadynamics.github.io/Agents.jl/stable/examples/sir/). Often times, differential equations are used when mathematical abstractions are a good approximation and you can describe how relevant quantities are changing. ABMs might be better when there is significant heterogeneity, or discreteness which is difficult to boil down to a set of equations.

Without knowing much about your specific model, its difficult to say whether Agents.jl would be a good fit. Nonetheless, its very flexible and has lots features, examples, and documentation.
