.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/formulations/plot_sobieski_bilevel_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_formulations_plot_sobieski_bilevel_example.py: BiLevel-based MDO on the Sobieski SSBJ test case ================================================ .. GENERATED FROM PYTHON SOURCE LINES 24-38 .. code-block:: Python from __future__ import annotations from copy import deepcopy from logging import WARNING from gemseo import configure_logger from gemseo import create_discipline from gemseo import create_scenario from gemseo import execute_post from gemseo.problems.mdo.sobieski.core.design_space import SobieskiDesignSpace configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 39-46 Instantiate the disciplines ---------------------------- First, we instantiate the four disciplines of the use case: :class:`.SobieskiPropulsion`, :class:`.SobieskiAerodynamics`, :class:`.SobieskiMission` and :class:`.SobieskiStructure`. .. GENERATED FROM PYTHON SOURCE LINES 46-53 .. code-block:: Python propu, aero, mission, struct = create_discipline([ "SobieskiPropulsion", "SobieskiAerodynamics", "SobieskiMission", "SobieskiStructure", ]) .. GENERATED FROM PYTHON SOURCE LINES 54-62 Build, execute and post-process the scenario -------------------------------------------- Then, we build the scenario which links the disciplines with the formulation and the optimization algorithm. Here, we use the :class:`.BiLevel` formulation. We tell the scenario to minimize -y_4 instead of minimizing y_4 (range), which is the default option. We need to define the design space. .. GENERATED FROM PYTHON SOURCE LINES 62-64 .. code-block:: Python design_space = SobieskiDesignSpace() .. GENERATED FROM PYTHON SOURCE LINES 65-68 Then, we build a sub-scenario for each strongly coupled disciplines, using the following algorithm, maximum number of iterations and algorithm options: .. GENERATED FROM PYTHON SOURCE LINES 68-76 .. code-block:: Python algo_options = { "xtol_rel": 1e-7, "xtol_abs": 1e-7, "ftol_rel": 1e-7, "ftol_abs": 1e-7, "ineq_tolerance": 1e-4, } sub_sc_opts = {"max_iter": 30, "algo": "SLSQP", "algo_options": algo_options} .. GENERATED FROM PYTHON SOURCE LINES 77-80 Build a sub-scenario for Propulsion ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This sub-scenario will minimize SFC. .. GENERATED FROM PYTHON SOURCE LINES 80-90 .. code-block:: Python sc_prop = create_scenario( propu, "DisciplinaryOpt", "y_34", design_space.filter("x_3", copy=True), name="PropulsionScenario", ) sc_prop.default_inputs = sub_sc_opts sc_prop.add_constraint("g_3", constraint_type="ineq") .. GENERATED FROM PYTHON SOURCE LINES 91-94 Build a sub-scenario for Aerodynamics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This sub-scenario will minimize L/D. .. GENERATED FROM PYTHON SOURCE LINES 94-105 .. code-block:: Python sc_aero = create_scenario( aero, "DisciplinaryOpt", "y_24", design_space.filter("x_2", copy=True), name="AerodynamicsScenario", maximize_objective=True, ) sc_aero.default_inputs = sub_sc_opts sc_aero.add_constraint("g_2", constraint_type="ineq") .. GENERATED FROM PYTHON SOURCE LINES 106-110 Build a sub-scenario for Structure ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This sub-scenario will maximize log(aircraft total weight / (aircraft total weight - fuel weight)). .. GENERATED FROM PYTHON SOURCE LINES 110-121 .. code-block:: Python sc_str = create_scenario( struct, "DisciplinaryOpt", "y_11", design_space.filter("x_1", copy=True), name="StructureScenario", maximize_objective=True, ) sc_str.add_constraint("g_1", constraint_type="ineq") sc_str.default_inputs = sub_sc_opts .. GENERATED FROM PYTHON SOURCE LINES 122-126 Build a scenario for Mission ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This scenario is based on the three previous sub-scenarios and on the Mission and aims to maximize the range (Breguet). .. GENERATED FROM PYTHON SOURCE LINES 126-141 .. code-block:: Python system_scenario = create_scenario( [sc_prop, sc_aero, sc_str, mission], "BiLevel", "y_4", design_space.filter("x_shared", copy=True), apply_cstr_tosub_scenarios=False, parallel_scenarios=False, multithread_scenarios=True, tolerance=1e-14, max_mda_iter=30, maximize_objective=True, sub_scenarios_log_level=WARNING, ) system_scenario.add_constraint(["g_1", "g_2", "g_3"], constraint_type="ineq") .. GENERATED FROM PYTHON SOURCE LINES 142-149 Visualize the XDSM ^^^^^^^^^^^^^^^^^^ Generate the XDSM on the fly: - ``log_workflow_status=True`` will log the status of the workflow in the console, - ``save_html`` (default ``True``) will generate a self-contained HTML file, that can be automatically opened using ``show_html=True``. .. GENERATED FROM PYTHON SOURCE LINES 149-151 .. code-block:: Python system_scenario.xdsmize(save_html=False) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 152-154 Execute the main scenario ^^^^^^^^^^^^^^^^^^^^^^^^^ .. GENERATED FROM PYTHON SOURCE LINES 154-160 .. code-block:: Python system_scenario.execute({ "max_iter": 50, "algo": "NLOPT_COBYLA", "algo_options": algo_options, }) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 08:56:50: INFO - 08:56:50: *** Start MDOScenario execution *** INFO - 08:56:50: MDOScenario INFO - 08:56:50: Disciplines: AerodynamicsScenario PropulsionScenario SobieskiMission StructureScenario INFO - 08:56:50: MDO formulation: BiLevel INFO - 08:56:50: Optimization problem: INFO - 08:56:50: minimize -y_4(x_shared) INFO - 08:56:50: with respect to x_shared INFO - 08:56:50: subject to constraints: INFO - 08:56:50: g_1_g_2_g_3(x_shared) <= 0.0 INFO - 08:56:50: over the design space: INFO - 08:56:50: +-------------+-------------+-------+-------------+-------+ INFO - 08:56:50: | Name | Lower bound | Value | Upper bound | Type | INFO - 08:56:50: +-------------+-------------+-------+-------------+-------+ INFO - 08:56:50: | x_shared[0] | 0.01 | 0.05 | 0.09 | float | INFO - 08:56:50: | x_shared[1] | 30000 | 45000 | 60000 | float | INFO - 08:56:50: | x_shared[2] | 1.4 | 1.6 | 1.8 | float | INFO - 08:56:50: | x_shared[3] | 2.5 | 5.5 | 8.5 | float | INFO - 08:56:50: | x_shared[4] | 40 | 55 | 70 | float | INFO - 08:56:50: | x_shared[5] | 500 | 1000 | 1500 | float | INFO - 08:56:50: +-------------+-------------+-------+-------------+-------+ INFO - 08:56:50: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 08:56:50: 2%|▏ | 1/50 [00:00<00:16, 3.03 it/sec, obj=-553] WARNING - 08:56:50: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:50: The solution is not feasible. INFO - 08:56:50: 4%|▍ | 2/50 [00:00<00:13, 3.45 it/sec, obj=-574] WARNING - 08:56:51: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:51: The solution is not feasible. INFO - 08:56:51: 6%|▌ | 3/50 [00:00<00:12, 3.69 it/sec, obj=-813] WARNING - 08:56:51: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:51: The solution is not feasible. INFO - 08:56:51: 8%|▊ | 4/50 [00:01<00:12, 3.78 it/sec, obj=-751] WARNING - 08:56:51: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:51: The solution is not feasible. INFO - 08:56:51: 10%|█ | 5/50 [00:01<00:12, 3.57 it/sec, obj=-734] WARNING - 08:56:51: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:51: The solution is not feasible. INFO - 08:56:51: 12%|█▏ | 6/50 [00:01<00:11, 3.70 it/sec, obj=-977] WARNING - 08:56:52: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:52: The solution is not feasible. INFO - 08:56:52: 14%|█▍ | 7/50 [00:01<00:11, 3.69 it/sec, obj=-1.05e+3] WARNING - 08:56:52: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:52: The solution is not feasible. INFO - 08:56:52: 16%|█▌ | 8/50 [00:02<00:11, 3.67 it/sec, obj=-1.67e+3] INFO - 08:56:52: 18%|█▊ | 9/50 [00:02<00:11, 3.68 it/sec, obj=-1.73e+3] WARNING - 08:56:52: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:52: The solution is not feasible. INFO - 08:56:53: 20%|██ | 10/50 [00:02<00:11, 3.62 it/sec, obj=-2.59e+3] INFO - 08:56:53: 22%|██▏ | 11/50 [00:03<00:10, 3.63 it/sec, obj=-2.94e+3] WARNING - 08:56:53: MDAJacobi has reached its maximum number of iterations but the normed residual 2.189447656198491e-13 is still above the tolerance 1e-14. INFO - 08:56:53: 24%|██▍ | 12/50 [00:03<00:10, 3.51 it/sec, obj=-2.64e+3] WARNING - 08:56:53: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:53: The solution is not feasible. INFO - 08:56:54: 26%|██▌ | 13/50 [00:03<00:10, 3.56 it/sec, obj=-2.85e+3] WARNING - 08:56:54: MDAJacobi has reached its maximum number of iterations but the normed residual 1.8505396985126146e-13 is still above the tolerance 1e-14. INFO - 08:56:54: 28%|██▊ | 14/50 [00:03<00:10, 3.54 it/sec, obj=-2.79e+3] WARNING - 08:56:54: MDAJacobi has reached its maximum number of iterations but the normed residual 3.0145345591022575e-14 is still above the tolerance 1e-14. WARNING - 08:56:54: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:54: The solution is not feasible. INFO - 08:56:54: 30%|███ | 15/50 [00:04<00:10, 3.45 it/sec, obj=-2.4e+3] INFO - 08:56:54: 32%|███▏ | 16/50 [00:04<00:09, 3.50 it/sec, obj=-3.07e+3] WARNING - 08:56:55: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:55: The solution is not feasible. INFO - 08:56:55: 34%|███▍ | 17/50 [00:04<00:09, 3.55 it/sec, obj=-3.01e+3] INFO - 08:56:55: 36%|███▌ | 18/50 [00:05<00:08, 3.59 it/sec, obj=-3.39e+3] INFO - 08:56:55: 38%|███▊ | 19/50 [00:05<00:08, 3.64 it/sec, obj=-3.84e+3] WARNING - 08:56:55: MDAJacobi has reached its maximum number of iterations but the normed residual 3.8877123894689336e-14 is still above the tolerance 1e-14. INFO - 08:56:55: 40%|████ | 20/50 [00:05<00:08, 3.64 it/sec, obj=-3.58e+3] INFO - 08:56:56: 42%|████▏ | 21/50 [00:05<00:07, 3.68 it/sec, obj=-3.66e+3] INFO - 08:56:56: 44%|████▍ | 22/50 [00:05<00:07, 3.72 it/sec, obj=-3.77e+3] WARNING - 08:56:56: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:56: The solution is not feasible. INFO - 08:56:56: 46%|████▌ | 23/50 [00:06<00:07, 3.75 it/sec, obj=-3.75e+3] INFO - 08:56:56: 48%|████▊ | 24/50 [00:06<00:06, 3.76 it/sec, obj=-2.94e+3] WARNING - 08:56:56: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:56: The solution is not feasible. INFO - 08:56:56: 50%|█████ | 25/50 [00:06<00:06, 3.77 it/sec, obj=-3.71e+3] INFO - 08:56:57: 52%|█████▏ | 26/50 [00:06<00:06, 3.84 it/sec, obj=-3.96e+3] INFO - 08:56:57: 54%|█████▍ | 27/50 [00:06<00:05, 3.89 it/sec, obj=-3.87e+3] WARNING - 08:56:57: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:57: The solution is not feasible. INFO - 08:56:57: 56%|█████▌ | 28/50 [00:07<00:05, 3.94 it/sec, obj=-3.95e+3] INFO - 08:56:57: 58%|█████▊ | 29/50 [00:07<00:05, 3.98 it/sec, obj=-3.93e+3] WARNING - 08:56:57: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:57: The solution is not feasible. INFO - 08:56:57: 60%|██████ | 30/50 [00:07<00:04, 4.03 it/sec, obj=-3.97e+3] INFO - 08:56:57: 62%|██████▏ | 31/50 [00:07<00:04, 4.06 it/sec, obj=-3.96e+3] INFO - 08:56:58: 64%|██████▍ | 32/50 [00:07<00:04, 4.11 it/sec, obj=-3.96e+3] INFO - 08:56:58: 66%|██████▌ | 33/50 [00:07<00:04, 4.16 it/sec, obj=-3.95e+3] INFO - 08:56:58: 68%|██████▊ | 34/50 [00:08<00:03, 4.22 it/sec, obj=-3.94e+3] WARNING - 08:56:58: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:58: The solution is not feasible. INFO - 08:56:58: 70%|███████ | 35/50 [00:08<00:03, 4.26 it/sec, obj=-3.97e+3] WARNING - 08:56:58: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:56:58: The solution is not feasible. INFO - 08:56:58: 72%|███████▏ | 36/50 [00:08<00:03, 4.29 it/sec, obj=-3.98e+3] INFO - 08:56:58: 74%|███████▍ | 37/50 [00:08<00:03, 4.33 it/sec, obj=-3.96e+3] INFO - 08:56:59: 76%|███████▌ | 38/50 [00:08<00:02, 4.39 it/sec, obj=-3.95e+3] INFO - 08:56:59: 78%|███████▊ | 39/50 [00:08<00:02, 4.43 it/sec, obj=-3.95e+3] INFO - 08:56:59: 80%|████████ | 40/50 [00:08<00:02, 4.47 it/sec, obj=-3.96e+3] INFO - 08:56:59: 82%|████████▏ | 41/50 [00:09<00:01, 4.51 it/sec, obj=-3.96e+3] INFO - 08:56:59: 84%|████████▍ | 42/50 [00:09<00:01, 4.56 it/sec, obj=-3.96e+3] INFO - 08:56:59: 86%|████████▌ | 43/50 [00:09<00:01, 4.58 it/sec, obj=-3.95e+3] WARNING - 08:56:59: MDAJacobi has reached its maximum number of iterations but the normed residual 3.8001101574110354e-14 is still above the tolerance 1e-14. INFO - 08:56:59: 88%|████████▊ | 44/50 [00:09<00:01, 4.57 it/sec, obj=-3.96e+3] INFO - 08:57:00: 90%|█████████ | 45/50 [00:09<00:01, 4.59 it/sec, obj=-3.96e+3] INFO - 08:57:00: 92%|█████████▏| 46/50 [00:09<00:00, 4.64 it/sec, obj=-3.96e+3] INFO - 08:57:00: 94%|█████████▍| 47/50 [00:10<00:00, 4.67 it/sec, obj=-3.96e+3] WARNING - 08:57:00: Optimization found no feasible point ! The least infeasible point is selected. WARNING - 08:57:00: The solution is not feasible. INFO - 08:57:00: 96%|█████████▌| 48/50 [00:10<00:00, 4.70 it/sec, obj=-3.96e+3] INFO - 08:57:00: 98%|█████████▊| 49/50 [00:10<00:00, 4.74 it/sec, obj=-3.96e+3] INFO - 08:57:00: 100%|██████████| 50/50 [00:10<00:00, 4.78 it/sec, obj=-3.96e+3] INFO - 08:57:00: Optimization result: INFO - 08:57:00: Optimizer info: INFO - 08:57:00: Status: None INFO - 08:57:00: Message: Maximum number of iterations reached. GEMSEO Stopped the driver INFO - 08:57:00: Number of calls to the objective function by the optimizer: 52 INFO - 08:57:00: Solution: INFO - 08:57:00: The solution is feasible. INFO - 08:57:00: Objective: -3963.3800122701787 INFO - 08:57:00: Standardized constraints: INFO - 08:57:00: g_1_g_2_g_3 = [-0.01805093 -0.03333915 -0.04424381 -0.05182998 -0.05732217 -0.13720865 INFO - 08:57:00: -0.10279135 0. -0.76718646 -0.23281354 0. -0.183255 ] INFO - 08:57:00: Design space: INFO - 08:57:00: +-------------+-------------+---------------------+-------------+-------+ INFO - 08:57:00: | Name | Lower bound | Value | Upper bound | Type | INFO - 08:57:00: +-------------+-------------+---------------------+-------------+-------+ INFO - 08:57:00: | x_shared[0] | 0.01 | 0.05999999999999999 | 0.09 | float | INFO - 08:57:00: | x_shared[1] | 30000 | 60000 | 60000 | float | INFO - 08:57:00: | x_shared[2] | 1.4 | 1.4 | 1.8 | float | INFO - 08:57:00: | x_shared[3] | 2.5 | 2.5 | 8.5 | float | INFO - 08:57:00: | x_shared[4] | 40 | 70 | 70 | float | INFO - 08:57:00: | x_shared[5] | 500 | 1500 | 1500 | float | INFO - 08:57:00: +-------------+-------------+---------------------+-------------+-------+ INFO - 08:57:00: *** End MDOScenario execution (time: 0:00:10.472100) *** {'max_iter': 50, 'algo_options': {'xtol_rel': 1e-07, 'xtol_abs': 1e-07, 'ftol_rel': 1e-07, 'ftol_abs': 1e-07, 'ineq_tolerance': 0.0001}, 'algo': 'NLOPT_COBYLA'} .. GENERATED FROM PYTHON SOURCE LINES 161-164 Plot the history of the MDA residuals ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For the first MDA: .. GENERATED FROM PYTHON SOURCE LINES 164-168 .. code-block:: Python system_scenario.formulation.mda1.plot_residual_history(save=False, show=True) # For the second MDA: system_scenario.formulation.mda2.plot_residual_history(save=False, show=True) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_001.png :alt: MDAJacobi: residual plot :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_002.png :alt: MDAJacobi: residual plot :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_002.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 169-171 Plot the system optimization history view ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. GENERATED FROM PYTHON SOURCE LINES 171-173 .. code-block:: Python system_scenario.post_process("OptHistoryView", save=False, show=True) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_003.png :alt: Evolution of the optimization variables :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_003.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_004.png :alt: Evolution of the objective value :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_004.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_005.png :alt: Distance to the optimum :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_005.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_006.png :alt: Evolution of the inequality constraints :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_006.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 174-176 Plot the structure optimization histories of the 2 first iterations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. GENERATED FROM PYTHON SOURCE LINES 176-185 .. code-block:: Python struct_databases = system_scenario.formulation.scenario_adapters[2].databases for database in struct_databases[:2]: opt_problem = deepcopy(sc_str.formulation.opt_problem) opt_problem.database = database execute_post(opt_problem, "OptHistoryView", save=False, show=True) for disc in [propu, aero, mission, struct]: print(f"{disc.name}: {disc.n_calls} calls.") .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_007.png :alt: Evolution of the optimization variables :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_007.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_008.png :alt: Evolution of the objective value :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_008.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_009.png :alt: Distance to the optimum :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_009.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_010.png :alt: Hessian diagonal approximation :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_010.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_011.png :alt: Evolution of the inequality constraints :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_011.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_012.png :alt: Evolution of the optimization variables :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_012.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_013.png :alt: Evolution of the objective value :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_013.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_014.png :alt: Distance to the optimum :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_014.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_015.png :alt: Hessian diagonal approximation :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_015.png :class: sphx-glr-multi-img * .. image-sg:: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_016.png :alt: Evolution of the inequality constraints :srcset: /examples/formulations/images/sphx_glr_plot_sobieski_bilevel_example_016.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none SobieskiPropulsion: 1290 calls. SobieskiAerodynamics: 1343 calls. SobieskiMission: 50 calls. SobieskiStructure: 1394 calls. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 14.663 seconds) .. _sphx_glr_download_examples_formulations_plot_sobieski_bilevel_example.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_sobieski_bilevel_example.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_sobieski_bilevel_example.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_