python - Pythonic way to store/record agent-specific values in agent-based models? -
i want keep track of agent-specific variables , i'm not sure pythonic way it.
for example, have 400 households receive , spend money on time. each household unique id, household-specific variables (income, consumption) should callable , mutable. have keep track of specific variables because actual agent decisions depends on decisions in past (spending in time-step before example).
so 1 variable create 400 lists (by typing them? no way), or create numpy array 400 columns (rows = values in time-step t) , column index corresponds household id, or could... , of course agent-specific variables should accesable math operations, sum or mean.
any better suggestions?
Comments
Post a Comment