fastoad.module_management.openmdao_system_registry module¶
The base layer for registering and retrieving OpenMDAO systems
-
class
fastoad.module_management.openmdao_system_registry.
OpenMDAOSystemRegistry
[source]¶ Bases:
object
Class for registering and providing OpenMDAO System objects.
-
classmethod
explore_folder
(folder_path: str)[source]¶ Explores provided folder for Systems to register (i.e. modules that use
register_system()
)- Parameters
folder_path –
-
classmethod
get_system
(identifier: str, options: dict = None) → SystemSubclass[source]¶ - Parameters
identifier – identifier of the registered class
options – option values at system instantiation
- Returns
an OpenMDAO system instantiated from the registered class
-
classmethod
get_system_description
(system_or_id: Union[str, SystemSubclass]) → str[source]¶ - Parameters
system_or_id – an identifier of a registered OpenMDAO System class or an instance of a registered OpenMDAO System class
- Returns
the description associated to given system or system identifier
-
classmethod
get_system_domain
(system_or_id: Union[str, SystemSubclass]) → fastoad.module_management.constants.ModelDomain[source]¶ - Parameters
system_or_id – an identifier of a registered OpenMDAO System class or an instance of a registered OpenMDAO System class
- Returns
the model domain associated to given system or system identifier
-
classmethod
get_system_ids
(properties: dict = None) → List[str][source]¶ - Parameters
properties – if provided, only factories that match all provided properties will be returned
- Returns
the list of identifiers for registered factories.
-
classmethod
register_system
(system_class: type, identifier: str, domain: fastoad.module_management.constants.ModelDomain = None, desc=None, options: dict = None)[source]¶ Registers the System (or subclass) so it can later be retrieved and instantiated.
- Parameters
system_class –
identifier –
domain – information about model domain
desc – description of the model. If not provided, the docstring of the class will be used.
options – options to be transmitted to OpenMDAO class at run-time
- Raises
-
classmethod