-
Notifications
You must be signed in to change notification settings - Fork 35
Description
-
Instead of having to include all the components "manually", we can have a "components" directory from which all .jl files are included. I'm already doing this in the the core with a func defined in Mimi.jl
load_comps(dirname::String="./components")
. -
@defcomp
adds all components to a global registry. For the (presumably majority of) cases where this registry is exactly the list you want loaded, we can define something likeadd_all_components(model)
which does just that. I've already added a topological sort function based on internal connection dependencies. It probably needs some refinement, but it's close. This avoids having to manually add comps in a right order. (Are there any dependency loops where we would have to indicate dependence on the prior timestep? If not we can postpone solving that.) [See also Think about option to create model from all comps in a module #166] -
For data loading, we can add a little structure to the data directory so that the paths to files are
data/$(comp_name)/$(param_name).csv
. Then a commonload_all_data(model, my_validation_func)
could load and test everything as required.