.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/doe/plot_sobieski_doe_disc_example.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_doe_plot_sobieski_doe_disc_example.py: Simple disciplinary DOE example on the Sobieski SSBJ test case ============================================================== .. GENERATED FROM PYTHON SOURCE LINES 26-36 .. code-block:: default from __future__ import division, unicode_literals from matplotlib import pyplot as plt from gemseo.api import configure_logger, create_discipline, create_scenario from gemseo.problems.sobieski.core import SobieskiProblem configure_logger() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 37-39 Instantiate the discipline -------------------------- .. GENERATED FROM PYTHON SOURCE LINES 39-41 .. code-block:: default discipline = create_discipline("SobieskiMission") .. GENERATED FROM PYTHON SOURCE LINES 42-44 Create the design space ----------------------- .. GENERATED FROM PYTHON SOURCE LINES 44-47 .. code-block:: default design_space = SobieskiProblem().read_design_space() design_space.filter(["y_24", "y_34"]) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 48-52 Create the scenario ----------------------- Build scenario which links the disciplines with the formulation and The DOE algorithm. .. GENERATED FROM PYTHON SOURCE LINES 52-61 .. code-block:: default scenario = create_scenario( [discipline], formulation="DisciplinaryOpt", objective_name="y_4", design_space=design_space, maximize_objective=True, scenario_type="DOE", ) .. GENERATED FROM PYTHON SOURCE LINES 62-65 Execute the scenario ----------------------- Here we use a latin hypercube sampling algorithm with 30 samples. .. GENERATED FROM PYTHON SOURCE LINES 65-67 .. code-block:: default scenario.execute({"n_samples": 30, "algo": "lhs"}) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none INFO - 12:56:25: INFO - 12:56:25: *** Start DOE Scenario execution *** INFO - 12:56:25: DOEScenario INFO - 12:56:25: Disciplines: SobieskiMission INFO - 12:56:25: MDOFormulation: DisciplinaryOpt INFO - 12:56:25: Algorithm: lhs INFO - 12:56:25: Optimization problem: INFO - 12:56:25: Minimize: -y_4(y_24, y_34) INFO - 12:56:25: With respect to: y_24, y_34 INFO - 12:56:25: DOE sampling: 0%| | 0/30 [00:00 .. GENERATED FROM PYTHON SOURCE LINES 73-75 Plot parallel coordinates ------------------------- .. GENERATED FROM PYTHON SOURCE LINES 75-80 .. code-block:: default scenario.post_process( "ScatterPlotMatrix", save=False, show=False, variables_list=["y_4", "y_24", "y_34"] ) # Workaround for HTML rendering, instead of ``show=True`` plt.show() .. image:: /examples/doe/images/sphx_glr_plot_sobieski_doe_disc_example_004.png :alt: plot sobieski doe disc example :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.332 seconds) .. _sphx_glr_download_examples_doe_plot_sobieski_doe_disc_example.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_sobieski_doe_disc_example.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_sobieski_doe_disc_example.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_