pik-copan / pycopancore

reference implementation of the copan:CORE World-Earth modelling framework
http://www.pik-potsdam.de/copan
Other
45 stars 10 forks source link

hooks for the runner #80

Closed timziebart closed 6 years ago

timziebart commented 7 years ago

For the next dev-treff: I would suggest, we introduce a mechanism so model components, models and scripts can register functions ("hooks") that are called:

  1. at runner startup
  2. when the runner stops inbetween, e.g. for a step or an event
  3. at runner end

Reasons are:

  1. sometimes analysis before the run have to be done, e.g. the small speed-up for the adaptive voter model needs to analyze the graph at start-up
  2. for active plotting
  3. clean-up procedures, e.g. free ram
timziebart commented 7 years ago

78982b6d8d8a5a2e7fc6e759ba766c98fae901b0 done

timziebart commented 7 years ago

still, they need to be added to the runner scheme