mdo_study_analysis module¶
An MDO study analysis generating N2 and XDSM from an Excel specification.
- class gemseo.utils.study_analyses.mdo_study_analysis.MDOStudyAnalysis(xls_study_path)[source]
Bases:
CouplingStudyAnalysis
An MDO study analysis from an Excel specification.
Based on an Excel file defining disciplines in terms of input and output names and an MDO problem in terms of names of design variables, objectives, constraints and formulation, this analysis generates an N2 (equivalent to the Design Structure Matrix) diagram, showing the couplings between the disciplines, and an XDSM (Extended Design Structure Matrix), showing the MDO process.
The Excel file shall contain one sheet per discipline:
the name of the sheet shall have the discipline name,
the sheet shall define the input names of the discipline as a vertical succession of cells starting with
"Inputs"
:¶ Inputs
input_name_1
…
input_name_N
the sheet shall define the output names of the discipline as a vertical succession of cells starting with
"Outputs"
:
¶ Outputs
output_name_1
…
output_name_N
the empty lines of the series
Inputs
andOutputs
are ignored,the sheet may contain other data, but these will not be taken into account.
The scenarios (at least one, or multiple for distributed formulations) must appear in a Excel sheet with a name starting by
Scenario
.The sheet shall have the following columns:
¶ Design variables
Objective function
Constraints
Disciplines
Formulation
Options
Options values
in1
out1
out2
Disc1
MDF
tolerance
0.1
Disc2
main_mda_name
MDAJacobi
These columns must satisfy some constraints:
all of them are mandatory, even if empty for the constraints,
their order does not matter,
one and only one formulation must be declared,
at least one objective must be provided,
at least one design variable must be provided,
all the objective functions and constraints must be outputs of a discipline, not necessarily the one of the current sheet,
all the design variables must be inputs of a discipline, not necessarily the one of the current sheet.
The columns
Options
andOptions values
are used to pass the formulation options. Note that for string typeOption values
, the value can be written with or without the""
characters.To use multi-level MDO formulations, create multiple scenarios, and add the name of the sub-scenarios in the list of disciplines of the main (system) scenario.
An arbitrary number of levels can be generated this way (three, four, …, n, level formulations).
- Parameters:
xls_study_path (str | Path) – The path to the Excel file describing the study.
- generate_xdsm(directory_path='.', save_pdf=False, show_html=False)[source]
Create an XDSM diagram of the
main_scenario
.- Parameters:
- Returns:
The XDSM diagram of the
main_scenario
.- Return type:
- disciplines: dict[str, MDODiscipline]
The disciplines.
- main_scenario: MDOScenario
The main scenario.
- scenarios: dict[str, MDOScenario]
The sub-scenarios and the main scenario in the last position.
- study: XLSStudyParser
The XLSStudyParser instance built from the Excel file.
Examples using MDOStudyAnalysis¶
Generate N2 and XDSM diagrams from an Excel description of the MDO problem