reinitialize button in Agents.jl interactive apps
It would be nice if we had a button that has functionality similar to reset, but a bit different. Sometimes, you would like to reset a model, but to a different state that the original one. This new initial state would typically depend on the model parameters that are being adjusted by sliders.
I propose that we allow a new keyword, reinit whose value is a function that takes in current model and returns a new one (current model also has current parameter configuration). If the keyword is given, we have one more button that is reinit.
A typical application scenario: I have a simulation of the schelling model set up, and I would like to change the initial agent distribution so that I have 2 groups instead of 3.
I think this is a good idea, but the naming might need to be given a little more thought.
Basically what you're proposing is that instead of having to hit reset then update, you can just hit this new button, so it saves you a click.
Maybe the naming could be: update -> update in-place reinit -> update and reset
Basically what you're proposing is that instead of having to hit reset then update, you can just hit this new button, so it saves you a click.
No, not at all. Reset allways brings system to default initial state and changing the parameter container. Reinit generates a brand new initial state that is a function of the current parameter status.
Oh good, this is more in line with the kind of functionality I initially thought would be available when I started looking into the interactivity options. Are you imagining being able to also alter the space, and number of agents, etc?
I propose that we allow a new keyword, reinit whose value is a function that takes in current model and returns a new one (current model also has current parameter configuration). If the keyword is given, we have one more button that is reinit.
You can change the values of anything you want. You can't change types. Space is a type.