The framework was not offering the component contributor with the opportunity to perform pre-processing tasks in initialise and use the outcome of these in e.g. run. The initialise method was dedicated to providing initial conditions for the component states, and only called if the states initial conditions were not already set by the component user (through a dump file).
To remedy this, the Component must feature an attribute to store pre-processed data in initialise accessible in run. In turn, this means that the initialise method will be called regardless of the status of the component states (i.e. initialised or not), so there needs to be another Component property to tell the component contributor whether this is the case. Finally, as part of the pre-processing, the initialise method is likely to require access to "ancillary" data. Since ancillary data is part of the component inputs alongside the driving data, the component inputs must be given to the initialise method too.
This PR implements the following:
addition of a new attribute shelf, a dictionary to store information between component methods (resolve #68)
addition of a new property initialised_states, a boolean indicating whether component states have already been given initial conditions by the component user
provision of component inputs to initialise method
Note that states are either all considered initialised or none considered initialised, there is no in between (i.e. initialise some states from dump and some states from default contributor value).
The framework was not offering the component contributor with the opportunity to perform pre-processing tasks in
initialise
and use the outcome of these in e.g.run
. Theinitialise
method was dedicated to providing initial conditions for the component states, and only called if the states initial conditions were not already set by the component user (through a dump file).To remedy this, the
Component
must feature an attribute to store pre-processed data ininitialise
accessible inrun
. In turn, this means that theinitialise
method will be called regardless of the status of the component states (i.e. initialised or not), so there needs to be anotherComponent
property to tell the component contributor whether this is the case. Finally, as part of the pre-processing, theinitialise
method is likely to require access to "ancillary" data. Since ancillary data is part of the component inputs alongside the driving data, the component inputs must be given to theinitialise
method too.This PR implements the following:
shelf
, a dictionary to store information between component methods (resolve #68)initialised_states
, a boolean indicating whether component states have already been given initial conditions by the component userinitialise
methodNote that states are either all considered initialised or none considered initialised, there is no in between (i.e. initialise some states from dump and some states from default contributor value).