metawards.iterators.iterate_custom¶
-
metawards.iterators.
iterate_custom
(custom_function, setup=False, **kwargs)[source]¶ This returns the default list of ‘advance_XXX’ functions that are called in sequence for each iteration of the model run. This iterator provides a custom iterator that uses ‘custom_function’ passed from the user. This iterator makes sure that ‘setup’ is called correctly and that the functions needed by ‘iterate_core’ are called first.
Parameters: - custom_function – A custom user-supplied function that returns the functions that the user would like to be called for each step.
- setup (bool) – Whether or not to return the functions used to setup the space and input for the advance_XXX functions returned by this iterator. This is called once at the start of a run to return the functions that must be called to setup the model
Returns: funcs – The list of functions that
`iterate`
will call in sequenceReturn type: List[function]