.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/post_process/algorithms/plot_pareto_front_binhkorn.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_post_process_algorithms_plot_pareto_front_binhkorn.py: Pareto front on Binh and Korn problem ===================================== In this example, we illustrate the use of the :class:`.ParetoFront` plot on the Binh and Korn multi-objective problem. .. GENERATED FROM PYTHON SOURCE LINES 28-35 .. code-block:: default from __future__ import annotations from gemseo.algos.doe.doe_factory import DOEFactory from gemseo.api import configure_logger from gemseo.post.post_factory import PostFactory from gemseo.problems.analytical.binh_korn import BinhKorn .. GENERATED FROM PYTHON SOURCE LINES 36-40 Import ------ The first step is to import some functions from the API and a method to get the design space. .. GENERATED FROM PYTHON SOURCE LINES 40-44 .. code-block:: default configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 45-48 Import the optimization problem ------------------------------- Then, we instantiate the BinkKorn optimization problem. .. GENERATED FROM PYTHON SOURCE LINES 48-51 .. code-block:: default problem = BinhKorn() .. GENERATED FROM PYTHON SOURCE LINES 52-56 Create and execute scenario --------------------------- Then, we create a Design of Experiment factory, and we request the execution a a full-factorial DOE using 100 samples .. GENERATED FROM PYTHON SOURCE LINES 56-59 .. code-block:: default doe_factory = DOEFactory() doe_factory.execute(problem, algo_name="OT_OPT_LHS", n_samples=100) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:55:30: Optimization problem: INFO - 16:55:30: minimize compute_binhkorn(x, y) = (4*x**2+ 4*y**2, (x-5.)**2 + (y-5.)**2) INFO - 16:55:30: with respect to x, y INFO - 16:55:30: subject to constraints: INFO - 16:55:30: ineq1(x, y): (x-5.)**2 + y**2 <= 25. <= 0.0 INFO - 16:55:30: ineq2(x, y): (x-8.)**2 + (y+3)**2 >= 7.7 <= 0.0 INFO - 16:55:30: over the design space: INFO - 16:55:30: +------+-------------+-------+-------------+-------+ INFO - 16:55:30: | name | lower_bound | value | upper_bound | type | INFO - 16:55:30: +------+-------------+-------+-------------+-------+ INFO - 16:55:30: | x | 0 | 1 | 5 | float | INFO - 16:55:30: | y | 0 | 1 | 3 | float | INFO - 16:55:30: +------+-------------+-------+-------------+-------+ INFO - 16:55:30: Solving optimization problem with algorithm OT_OPT_LHS: INFO - 16:55:30: ... 0%| | 0/100 [00:00 .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.457 seconds) .. _sphx_glr_download_examples_post_process_algorithms_plot_pareto_front_binhkorn.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_pareto_front_binhkorn.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_pareto_front_binhkorn.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_