
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import mesa
from mesa.experimental import JupyterViz
from mesa_models.boltzmann_wealth_model.model import BoltzmannWealthModel
def agent_portrayal(agent):
return {
"color": "tab:blue",
"size": 50,
}
model_params = {
"N": {
"type": "SliderInt",
"value": 50,
"label": "Number of agents:",
"min": 10,
"max": 100,
"step": 1,
},
"width": 10,
"height": 10,
}
page = JupyterViz(
BoltzmannWealthModel,
model_params,
measures=["Gini"],
name="Money Model",
agent_portrayal=agent_portrayal,
)