navigate.model.features.feature_container.load_features
- navigate.model.features.feature_container.load_features(model, feature_list)
Load and organize a list of feature modules into a child-sibling tree structure.
This function takes a list of feature modules and organizes them into a child-sibling tree structure, creating SignalNodes and DataNodes for each feature module. It also handles shared variables and cleanup functions for the nodes.
Parameters:
- modelobject
The model or system to which the features are applied.
- feature_listlist
A list of dictionaries or tuples representing the feature modules and their configurations.
Returns:
- SignalContainer
A container containing the root of the SignalNode tree and a cleanup list for signal nodes.
- DataContainer
A container containing the root of the DataNode tree and a cleanup list for data nodes.
Notes:
This function creates SignalNodes and DataNodes for each feature module in the feature_list, organizing them into a child-sibling tree structure.
Shared variables are handled by creating or updating variables in the shared_variables dictionary.
Cleanup functions are added to the cleanup lists for signal and data nodes as needed.
The nested functions create_node and build_feature_tree assist in creating and organizing the nodes.
This function returns SignalContainer and DataContainer instances containing the root nodes and cleanup lists for signal and data nodes.
SignalNodes represent signal processing tasks, and DataNodes represent data processing tasks within the feature modules.