dependency_graph module¶
Graphs of the disciplines dependencies and couplings.
- class gemseo.core.dependency_graph.DependencyGraph(disciplines)[source]¶
Bases:
object
Graph of dependencies between disciplines.
This class can create the sequence of execution of the disciplines. This is done by determining the strongly connected components (scc) of the graph. The disciplines in the components of a scc have the same order as in the passed disciplines passed when instantiating the class.
The couplings between the disciplines can also be computed.
- Parameters
disciplines – The disciplines to build the graph with.
- export_initial_graph(file_path)¶
Write a representation of the full graph.
- Parameters
file_path (str) – A path to the file.
- export_reduced_graph(file_path)¶
Write a representation of the condensed graph.
- Parameters
file_path (str) – A path to the file.
- get_disciplines_couplings()[source]¶
Return the couplings between the disciplines.
- Returns
The disciplines couplings, a coupling is composed of a discipline, one of its successor and the sorted variables names.
- get_execution_sequence()[source]¶
Compute the execution sequence of the disciplines.
- Returns
list(set(tuple(set(MDODisciplines))))
- write_condensed_graph(file_path)[source]¶
Write a representation of the condensed graph.
- Parameters
file_path (str) – A path to the file.
- write_full_graph(file_path)[source]¶
Write a representation of the full graph.
- Parameters
file_path (str) – A path to the file.
- property disciplines: Iterator[gemseo.core.discipline.MDODiscipline]¶
The disciplines used to build the graph.