.. 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 24-33 .. code-block:: default from gemseo.api import configure_logger from gemseo.api import create_discipline from gemseo.api import create_scenario from gemseo.problems.sobieski.core.problem import SobieskiProblem from matplotlib import pyplot as plt configure_logger() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 34-36 Instantiate the discipline -------------------------- .. GENERATED FROM PYTHON SOURCE LINES 36-38 .. code-block:: default discipline = create_discipline("SobieskiMission") .. GENERATED FROM PYTHON SOURCE LINES 39-41 Create the design space ----------------------- .. GENERATED FROM PYTHON SOURCE LINES 41-44 .. code-block:: default design_space = SobieskiProblem().design_space design_space.filter(["y_24", "y_34"]) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 45-49 Create the scenario ----------------------- Build scenario which links the disciplines with the formulation and The DOE algorithm. .. GENERATED FROM PYTHON SOURCE LINES 49-58 .. 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 59-62 Execute the scenario ----------------------- Here we use a latin hypercube sampling algorithm with 30 samples. .. GENERATED FROM PYTHON SOURCE LINES 62-64 .. code-block:: default scenario.execute({"n_samples": 30, "algo": "lhs"}) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none INFO - 07:18:59: INFO - 07:18:59: *** Start DOEScenario execution *** INFO - 07:18:59: DOEScenario INFO - 07:18:59: Disciplines: SobieskiMission INFO - 07:18:59: MDO formulation: DisciplinaryOpt INFO - 07:18:59: Optimization problem: INFO - 07:18:59: minimize -y_4(y_24, y_34) INFO - 07:18:59: with respect to y_24, y_34 INFO - 07:18:59: over the design space: INFO - 07:18:59: +------+-------------+------------+-------------+-------+ INFO - 07:18:59: | name | lower_bound | value | upper_bound | type | INFO - 07:18:59: +------+-------------+------------+-------------+-------+ INFO - 07:18:59: | y_24 | 0.44 | 4.15006276 | 11.13 | float | INFO - 07:18:59: | y_34 | 0.44 | 1.10754577 | 1.98 | float | INFO - 07:18:59: +------+-------------+------------+-------------+-------+ INFO - 07:18:59: Solving optimization problem with algorithm lhs: INFO - 07:18:59: ... 0%| | 0/30 [00:00 .. GENERATED FROM PYTHON SOURCE LINES 70-72 Plot parallel coordinates ------------------------- .. GENERATED FROM PYTHON SOURCE LINES 72-77 .. code-block:: default scenario.post_process( "ScatterPlotMatrix", save=False, show=False, variable_names=["y_4", "y_24", "y_34"] ) # Workaround for HTML rendering, instead of ``show=True`` plt.show() .. image-sg:: /examples/doe/images/sphx_glr_plot_sobieski_doe_disc_example_004.png :alt: plot sobieski doe disc example :srcset: /examples/doe/images/sphx_glr_plot_sobieski_doe_disc_example_004.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.204 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 `_