Note
Click here to download the full example code
Generate a N2 and XDSM from an Excel description of the MDO problem¶
from __future__ import absolute_import, division, print_function, unicode_literals
from os import mkdir
from os.path import exists, join
from future import standard_library
from gemseo.api import configure_logger
from gemseo.utils.study_analysis import StudyAnalysis
configure_logger()
standard_library.install_aliases()
Describe your MDO problem in an Excel file¶
Visualize this study¶
study = StudyAnalysis("disciplines_spec.xlsx")
if not exists("outputs"):
mkdir("outputs")
Generate N2 chrt¶
study.generate_n2(file_path=join("outputs", "n2.png"), save=False, show=True)
Generate XDSM¶
study.generate_xdsm("outputs")
Out:
<gemseo.core.mdo_scenario.MDOScenario object at 0x7fc2a087e130>
Visualize this study from command line¶
We can create the same figures using command line inputs:
gemseo-study disciplines_spec.xlsx -o outputs -s '(5,5)' -x -l
where:
gemseo-study
is an executable provided by GEMSEO,disciplines_spec.xlsx
is the Excel file path,-o outputs
is the output directory,-s '(5,5)'
is the size of the N2 chart,-x
is an option to create of the XDSM,-l
is an option to create a PDF file with the creation of the XDSM.
Total running time of the script: ( 0 minutes 0.356 seconds)