.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/post_process/algorithms/plot_obj_constr_hist.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_post_process_algorithms_plot_obj_constr_hist.py: Objective and constraints history ================================= In this example, we illustrate the use of the :class:`.ObjConstrHist` post-processing on the Sobieski's SSBJ problem. The :class:`.ObjConstrHist` post-processing plots the history of the objective function with respect to the iterations. The background color provides information on the most violated constraint: red if the constraint is violated, white if it is active and green if it is satisfied. .. GENERATED FROM PYTHON SOURCE LINES 33-43 .. image-sg:: /examples/post_process/algorithms/images/sphx_glr_plot_obj_constr_hist_001.png :alt: Evolution of the objective and maximum constraint :srcset: /examples/post_process/algorithms/images/sphx_glr_plot_obj_constr_hist_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:25:46: Importing the optimization problem from the file sobieski_mdf_scenario.h5 | .. code-block:: Python from __future__ import annotations from gemseo import execute_post from gemseo.settings.post import ObjConstrHist_Settings execute_post( "sobieski_mdf_scenario.h5", settings_model=ObjConstrHist_Settings(save=False, show=True), ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.306 seconds) .. _sphx_glr_download_examples_post_process_algorithms_plot_obj_constr_hist.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_obj_constr_hist.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_obj_constr_hist.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_obj_constr_hist.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_