.. 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 :ref:`Go to the end ` 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-34 .. code-block:: default from __future__ import annotations from gemseo import configure_logger from gemseo import create_discipline from gemseo import create_scenario from gemseo.problems.sobieski.core.problem import SobieskiProblem configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 35-37 Instantiate the discipline -------------------------- .. GENERATED FROM PYTHON SOURCE LINES 37-39 .. code-block:: default discipline = create_discipline("SobieskiMission") .. GENERATED FROM PYTHON SOURCE LINES 40-42 Create the design space ----------------------- .. GENERATED FROM PYTHON SOURCE LINES 42-45 .. code-block:: default design_space = SobieskiProblem().design_space design_space.filter(["y_24", "y_34"]) .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 46-50 Create the scenario ----------------------- Build scenario which links the disciplines with the formulation and The DOE algorithm. .. GENERATED FROM PYTHON SOURCE LINES 50-59 .. 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 60-63 Execute the scenario ----------------------- Here we use a latin hypercube sampling algorithm with 30 samples. .. GENERATED FROM PYTHON SOURCE LINES 63-65 .. code-block:: default scenario.execute({"n_samples": 30, "algo": "lhs"}) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:29:09: INFO - 16:29:09: *** Start DOEScenario execution *** INFO - 16:29:09: DOEScenario INFO - 16:29:09: Disciplines: SobieskiMission INFO - 16:29:09: MDO formulation: DisciplinaryOpt INFO - 16:29:09: Optimization problem: INFO - 16:29:09: minimize -y_4(y_24, y_34) INFO - 16:29:09: with respect to y_24, y_34 INFO - 16:29:09: over the design space: INFO - 16:29:09: +------+-------------+------------+-------------+-------+ INFO - 16:29:09: | name | lower_bound | value | upper_bound | type | INFO - 16:29:09: +------+-------------+------------+-------------+-------+ INFO - 16:29:09: | y_24 | 0.44 | 4.15006276 | 11.13 | float | INFO - 16:29:09: | y_34 | 0.44 | 1.10754577 | 1.98 | float | INFO - 16:29:09: +------+-------------+------------+-------------+-------+ INFO - 16:29:09: Solving optimization problem with algorithm lhs: INFO - 16:29:09: ... 0%| | 0/30 [00:00 .. GENERATED FROM PYTHON SOURCE LINES 71-73 Plot parallel coordinates ------------------------- .. GENERATED FROM PYTHON SOURCE LINES 73-79 .. code-block:: default scenario.post_process( "ScatterPlotMatrix", variable_names=["y_4", "y_24", "y_34"], save=False, show=True, ) .. 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-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.619 seconds) .. _sphx_glr_download_examples_doe_plot_sobieski_doe_disc_example.py: .. only:: html .. container:: sphx-glr-footer 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 `_