Best way to get dimension keys within run_timestep

I would like to get information from the Model within run_timestep and init. In particular, I want to call dim_keys. Is this information available in the d object? Or what is the accepted way to get model information within these functions?

In the past, I have been set up things up outside of these functions, but I now have a case where the relevant work needs to be done differently for each Monte Carlo. I like to avoid storing the relevant information in a parameter (regionnames = Parameter{String}()) since these functions should know what model they are being called on.

Hi @jrising sorry for the long delay on this! This is something that I have been frustrated with as well with the current implementation, in models like MimiGIVE and MimiSSPs we did as you said and stored relevant information in a parameter, but as you suggest this is a bit fragile since if one changes the other roan’t automatically change, necessitating extra checks.

I opened this issue a while ago focused on exactly this (Add access to time information in the `init` function; Add Dimensions keys to `d` · Issue #948 · mimiframework/Mimi.jl · GitHub) and will put this at the top of the todo stack! @davidanthoff let us know if you have any thoughts on this though.