.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/mdo/plot_mixed_optimization.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_mdo_plot_mixed_optimization.py: Solve a mixed optimization problem. =================================== .. _mixed_optimization_scenario: .. GENERATED FROM PYTHON SOURCE LINES 27-42 Introduction ------------ In this example, we will solve a very simple mixed optimization problem with a full factorial approach. To do so, we will split the problem into a discrete optimization problem to enumerate all the combinations and a continuous one to solve the associated sub-problem. Thus, we will use the :class:`.MDOScenarioAdapter` to wrap a :class:`.BaseScenario` and treat it as a discipline whose inputs are some or all of its design space variables and whose outputs are some or all of its functions (objective, constraints or observables). Keep in mind that this approach may be very time-consuming. It works well when the dimension of the integers to explore is not too large. Otherwise, a dedicated algorithm may be better suited, such as the ones available in the ``gemseo-pymoo`` plugin. .. GENERATED FROM PYTHON SOURCE LINES 44-47 Imports ------- All the imports needed for the tutorial are performed here. .. GENERATED FROM PYTHON SOURCE LINES 47-65 .. code-block:: Python from __future__ import annotations from numpy import ndarray # noqa: TC002 from numpy.linalg import norm from gemseo import configure_logger from gemseo import create_design_space from gemseo import create_discipline from gemseo import create_scenario from gemseo.disciplines.scenario_adapters.mdo_scenario_adapter import MDOScenarioAdapter from gemseo.settings.doe import PYDOE_FULLFACT_Settings from gemseo.settings.formulations import DisciplinaryOpt_Settings from gemseo.settings.opt import NLOPT_COBYLA_Settings from gemseo.settings.post import OptHistoryView_Settings configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 66-91 Optimization problem definition. -------------------------------- We define the following optimization problem: .. math:: \begin{aligned} \text{minimize the objective function }&\text{f(x,y)}=|x| + |y| \\ \text{with respect to the design variables }&x,\,y \\ \text{subject to the general constraint } & g(x,y) \geq 2\\ \text{subject to the bound constraints } & 0.0 \leq x \leq 1.0\\ & 0 \leq y_0 \leq 1\\ & 0 \leq y_2 \leq 2 \end{aligned} and where the general constraint is: .. math:: g(x,y) = x + y Where :math:`y` is an integer vector with two components and :math:`x` is a float vector with two components. .. GENERATED FROM PYTHON SOURCE LINES 93-134 Optimization problem reformulation. ----------------------------------- The problem can be split using the :class:`.MDOScenarioAdapter`. To do this we will divide the design space in two, a continuous one and a discrete one. The :class:`.MDOScenarioAdapter` will wrap the continuous inner scenario as a discipline to be executed taking the inputs from the discrete design space. These inputs are generated by the outer :class:`.DOEScenario` using a full factorial method. It is possible of course to use different DOE algorithms or even generate the samples first, filter them, and then launch a class:`.CustomDOE` with the filtered samples. The reformulated optimization problem would read as follows: For the outer DOE Scenario: .. math:: \begin{aligned} \text{minimize the objective function }&\text{f(x,y)}=|x| + |y| \\ \text{with respect to the design variables }&y \\ \text{subject to the general constraint } & g(x,y) \geq 2\\ \text{subject to the bound constraints } & 0 \leq y_0 \leq 1\\ & 0 \leq y_2 \leq 2 \end{aligned} For the inner MDO Scenario: .. math:: \begin{aligned} \text{minimize the objective function }&\text{f(x,y)}=|x| + |y| \\ \text{with respect to the design variables }&x \\ \text{subject to the general constraint } & g(x,y) \geq 2\\ \text{subject to the bound constraints } & 0.0 \leq x \leq 1.0 \end{aligned} In the next steps, we will build both scenarios and connect them to solve the full problem. .. GENERATED FROM PYTHON SOURCE LINES 137-143 Create an :class:`.AutoPyDiscipline` to compute the objective and the constraints. ---------------------------------------------------------------------------------- Since the expressions of our toy problem are very simple, we can use an :class:`.AutoPyDiscipline` to compute the objective and constraints. Note that there are no strong couplings in our expressions, which means we could also compute both the objective and constraints with a single discipline if we wished to. .. GENERATED FROM PYTHON SOURCE LINES 143-158 .. code-block:: Python def obj(x: ndarray, y: ndarray) -> float: """A simple Python function to compute f(x,y).""" f = norm(x) + norm(y) return f # noqa: RET504 def const(x: ndarray, y: ndarray) -> ndarray: """A simple Python function to compute g(x,y).""" g = x + y return g # noqa: RET504 objective = create_discipline("AutoPyDiscipline", name="f(x,y)", py_func=obj) constraint = create_discipline("AutoPyDiscipline", name="g(x,y)", py_func=const) .. rst-class:: sphx-glr-script-out .. code-block:: none WARNING - 20:38:27: The Args section is missing. WARNING - 20:38:27: The Args section is missing. .. GENERATED FROM PYTHON SOURCE LINES 159-163 Create the design space for the entire problem. ----------------------------------------------- We can define a :class:`.DesignSpace` for the whole problem and then filter either the continuous variables or the discrete ones. .. GENERATED FROM PYTHON SOURCE LINES 163-169 .. code-block:: Python design_space = create_design_space() design_space.add_variable("x", lower_bound=0, upper_bound=1, value=1.0, size=2) design_space.add_variable( "y", lower_bound=[0, 0], upper_bound=[1, 2], value=1, size=2, type_="integer" ) .. GENERATED FROM PYTHON SOURCE LINES 170-176 Create the design space for the inner scenario. ----------------------------------------------- The inner scenario is the one that solves the continuous optimization problem, and as such, it only needs to include the continuous design variables. We use the :meth:`.DesignSpace.filter` method to keep ``x`` and we set ``copy`` to ``True`` to keep the original ``design_space`` unchanged, as we will use it later. .. GENERATED FROM PYTHON SOURCE LINES 176-178 .. code-block:: Python design_space_inner_scenario = design_space.filter(keep_variables=["x"], copy=True) .. GENERATED FROM PYTHON SOURCE LINES 179-181 Create the inner MDO scenario. ------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 181-190 .. code-block:: Python inner_scenario = create_scenario( [objective, constraint], "f", design_space_inner_scenario, formulation_settings_model=DisciplinaryOpt_Settings(), ) inner_scenario.set_algorithm(NLOPT_COBYLA_Settings(max_iter=100)) inner_scenario.add_constraint("g", constraint_type="ineq", value=2) .. GENERATED FROM PYTHON SOURCE LINES 191-199 Create the scenario adapter. ---------------------------- An :class:`.MDOScenarioAdapter` wraps an entire :class:`.BaseScenario` as a :class:`.Discipline`, its inputs are all or part of the design space variables and its outputs are all or part of the objective values, constraints or observables. Here we select the variables of the inner scenario that we wish to set as inputs/outputs for the adapter. .. GENERATED FROM PYTHON SOURCE LINES 199-202 .. code-block:: Python input_names = ["y"] output_names = ["f", "g"] .. GENERATED FROM PYTHON SOURCE LINES 203-205 The argument ``set_x0_before_opt`` allows us to set the starting point of the adapted scenario from the outer DOE scenario values. .. GENERATED FROM PYTHON SOURCE LINES 205-211 .. code-block:: Python adapted_inner_scenario = MDOScenarioAdapter( inner_scenario, input_names, output_names, set_x0_before_opt=True, ) .. GENERATED FROM PYTHON SOURCE LINES 212-227 .. tip:: You may be interested in keeping the optimization history of the inner scenario for each of the executions launched by the outer scenario. To do this, set the argument ``keep_opt_history`` to ``True``, this option will store the databases in memory and make them accessible via the :attr:`.MDOScenarioAdapter.databases` attribute. Keep in mind that depending on the size of the database, storing it in memory may lead to a significant increase in memory usage. If you prefer to store the databases on disk instead, set the argument ``save_opt_history`` to ``True``. An ``hdf5`` file will be saved on the disk at each new execution. You may also choose a prefix for the name of these files with the argument ``opt_history_file_prefix``. If no prefix is given, the default prefix is ``"database"``. Both ``keep_opt_history`` and ``save_opt_history`` are independent of each-other. .. GENERATED FROM PYTHON SOURCE LINES 230-237 Create the design space for the outer DOE scenario. --------------------------------------------------- The outer scenario is the one that solves the discrete optimization problem, and as such, it only needs to include the integer design variables. Once again, we use the :meth:`.DesignSpace.filter` method to keep ``y``, the ``copy`` argument ensures that the original ``design_space`` remains unchanged in case you need it for other purposes. .. GENERATED FROM PYTHON SOURCE LINES 237-239 .. code-block:: Python design_space_outer_scenario = design_space.filter(keep_variables="y", copy=True) .. GENERATED FROM PYTHON SOURCE LINES 240-242 Create the outer DOE scenario. ------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 242-250 .. code-block:: Python outer_scenario = create_scenario( adapted_inner_scenario, "f", design_space_outer_scenario, formulation_settings_model=DisciplinaryOpt_Settings(), scenario_type="DOE", ) .. GENERATED FROM PYTHON SOURCE LINES 251-254 Here, we add the constraints on the outer scenario in order to be able to know if a given set of integers returns a feasible solution once the inner scenario has been executed. .. GENERATED FROM PYTHON SOURCE LINES 254-256 .. code-block:: Python outer_scenario.add_constraint("g", constraint_type="ineq", value=2) .. GENERATED FROM PYTHON SOURCE LINES 257-258 Show an xDSM of the process, including the outer and inner scenarios. .. GENERATED FROM PYTHON SOURCE LINES 258-260 .. code-block:: Python outer_scenario.xdsmize(save_html=False) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 261-265 Execute the outer scenario (which contains the inner scenario) and solve the whole problem. The console will show the progress of the optimization. For each DOE point it will show the optimization of the continuous problem and its optimal result. .. GENERATED FROM PYTHON SOURCE LINES 265-267 .. code-block:: Python outer_scenario.execute(PYDOE_FULLFACT_Settings(n_samples=9)) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 20:38:27: *** Start DOEScenario execution *** INFO - 20:38:27: DOEScenario INFO - 20:38:27: Disciplines: MDOScenario_adapter INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(y) INFO - 20:38:27: with respect to y INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(y) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: | y[0] | 0 | 1 | 1 | integer | INFO - 20:38:27: | y[1] | 0 | 1 | 2 | integer | INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: Solving optimization problem with algorithm PYDOE_FULLFACT: INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 313.12 it/sec, obj=0.707] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 497.34 it/sec, obj=0.901] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 671.91 it/sec, obj=0.901] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 768.89 it/sec, obj=0.457] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 852.09 it/sec, obj=0.914] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 922.03 it/sec, obj=1.57e-16] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 978.05 it/sec, obj=0.254] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1024.22 it/sec, obj=0.29] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1059.11 it/sec, obj=0.206] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1093.18 it/sec, obj=0.0948] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1124.04 it/sec, obj=0.186] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1154.32 it/sec, obj=0.289] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1179.37 it/sec, obj=0.121] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1200.75 it/sec, obj=0.304] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1222.95 it/sec, obj=0.266] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1241.10 it/sec, obj=0.399] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1259.93 it/sec, obj=0.0323] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1274.07 it/sec, obj=0.0929] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1286.33 it/sec, obj=0.06] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1300.96 it/sec, obj=0.00983] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1312.97 it/sec, obj=0.00655] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1326.01 it/sec, obj=0.00145] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1334.47 it/sec, obj=0.000321] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1344.53 it/sec, obj=0.000178] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1355.22 it/sec, obj=0.000255] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1362.98 it/sec, obj=0.00065] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1370.19 it/sec, obj=0.000193] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1376.66 it/sec, obj=3.21e-6] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1382.47 it/sec, obj=0.00012] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1389.67 it/sec, obj=5.79e-7] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1394.44 it/sec, obj=2.78e-6] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1398.83 it/sec, obj=7.05e-6] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1404.21 it/sec, obj=2.64e-5] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1408.37 it/sec, obj=6.43e-6] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1412.37 it/sec, obj=4.54e-6] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1417.95 it/sec, obj=7.42e-6] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1421.41 it/sec, obj=7.02e-6] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1424.87 it/sec, obj=7.54e-6] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1429.70 it/sec, obj=2.19e-6] INFO - 20:38:27: 40%|████ | 40/100 [00:00<00:00, 1433.40 it/sec, obj=4.27e-6] INFO - 20:38:27: 41%|████ | 41/100 [00:00<00:00, 1438.29 it/sec, obj=8.58e-6] INFO - 20:38:27: 42%|████▏ | 42/100 [00:00<00:00, 1441.52 it/sec, obj=1.5e-6] INFO - 20:38:27: 43%|████▎ | 43/100 [00:00<00:00, 1444.62 it/sec, obj=8.66e-7] INFO - 20:38:27: 44%|████▍ | 44/100 [00:00<00:00, 1448.93 it/sec, obj=2.39e-6] INFO - 20:38:27: 45%|████▌ | 45/100 [00:00<00:00, 1451.99 it/sec, obj=1.17e-6] INFO - 20:38:27: 46%|████▌ | 46/100 [00:00<00:00, 1454.94 it/sec, obj=2.62e-7] INFO - 20:38:27: 47%|████▋ | 47/100 [00:00<00:00, 1458.46 it/sec, obj=9.02e-8] INFO - 20:38:27: 48%|████▊ | 48/100 [00:00<00:00, 1460.39 it/sec, obj=8.52e-8] INFO - 20:38:27: 49%|████▉ | 49/100 [00:00<00:00, 1463.73 it/sec, obj=1.32e-7] INFO - 20:38:27: 50%|█████ | 50/100 [00:00<00:00, 1465.96 it/sec, obj=4.06e-8] INFO - 20:38:27: 51%|█████ | 51/100 [00:00<00:00, 1468.54 it/sec, obj=1.5e-8] INFO - 20:38:27: 52%|█████▏ | 52/100 [00:00<00:00, 1471.81 it/sec, obj=4.22e-9] INFO - 20:38:27: 53%|█████▎ | 53/100 [00:00<00:00, 1473.91 it/sec, obj=1.15e-9] INFO - 20:38:27: 54%|█████▍ | 54/100 [00:00<00:00, 1477.11 it/sec, obj=7.62e-10] INFO - 20:38:27: 55%|█████▌ | 55/100 [00:00<00:00, 1478.90 it/sec, obj=2.17e-10] INFO - 20:38:27: 56%|█████▌ | 56/100 [00:00<00:00, 1480.90 it/sec, obj=1.16e-10] INFO - 20:38:27: 57%|█████▋ | 57/100 [00:00<00:00, 1483.30 it/sec, obj=1.65e-11] INFO - 20:38:27: 58%|█████▊ | 58/100 [00:00<00:00, 1484.97 it/sec, obj=9.78e-12] INFO - 20:38:27: 59%|█████▉ | 59/100 [00:00<00:00, 1486.86 it/sec, obj=3.55e-12] INFO - 20:38:27: 60%|██████ | 60/100 [00:00<00:00, 1489.07 it/sec, obj=2.06e-13] INFO - 20:38:27: 61%|██████ | 61/100 [00:00<00:00, 1490.46 it/sec, obj=1.42e-12] INFO - 20:38:27: 62%|██████▏ | 62/100 [00:00<00:00, 1492.75 it/sec, obj=1.19e-13] INFO - 20:38:27: 63%|██████▎ | 63/100 [00:00<00:00, 1493.89 it/sec, obj=3e-14] INFO - 20:38:27: 64%|██████▍ | 64/100 [00:00<00:00, 1494.93 it/sec, obj=1.85e-13] INFO - 20:38:27: 65%|██████▌ | 65/100 [00:00<00:00, 1496.72 it/sec, obj=3.51e-13] INFO - 20:38:27: 66%|██████▌ | 66/100 [00:00<00:00, 1497.47 it/sec, obj=2.18e-13] INFO - 20:38:27: 67%|██████▋ | 67/100 [00:00<00:00, 1498.29 it/sec, obj=4.71e-15] INFO - 20:38:27: 68%|██████▊ | 68/100 [00:00<00:00, 1500.17 it/sec, obj=1.74e-14] INFO - 20:38:27: 69%|██████▉ | 69/100 [00:00<00:00, 1501.31 it/sec, obj=2.39e-14] INFO - 20:38:27: 70%|███████ | 70/100 [00:00<00:00, 1503.29 it/sec, obj=5.02e-14] INFO - 20:38:27: 71%|███████ | 71/100 [00:00<00:00, 1504.41 it/sec, obj=1.61e-14] INFO - 20:38:27: 72%|███████▏ | 72/100 [00:00<00:00, 1505.67 it/sec, obj=6.98e-15] INFO - 20:38:27: 73%|███████▎ | 73/100 [00:00<00:00, 1507.46 it/sec, obj=2.31e-15] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 1.5700924586837752e-16 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-2. -2.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 11%|█ | 1/9 [00:00<00:00, 19.38 it/sec, obj=2.31e-15] INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 2766.69 it/sec, obj=1.71] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 1984.06 it/sec, obj=1.9] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 2078.45 it/sec, obj=1.9] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 1866.00 it/sec, obj=1.46] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 1659.66 it/sec, obj=1.91] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 1615.68 it/sec, obj=1] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 1601.84 it/sec, obj=1.25] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1590.33 it/sec, obj=1.29] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1592.24 it/sec, obj=1.21] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1587.01 it/sec, obj=1.09] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1590.28 it/sec, obj=1.19] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1588.85 it/sec, obj=1.29] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1587.78 it/sec, obj=1.12] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1590.90 it/sec, obj=1.3] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1589.51 it/sec, obj=1.27] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1590.79 it/sec, obj=1.4] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1592.02 it/sec, obj=1.03] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1591.26 it/sec, obj=1.09] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1594.31 it/sec, obj=1.06] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1594.52 it/sec, obj=1.01] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1588.04 it/sec, obj=1.01] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1590.64 it/sec, obj=1] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1588.52 it/sec, obj=1] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1589.53 it/sec, obj=1] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1591.69 it/sec, obj=1] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1591.12 it/sec, obj=1] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1592.46 it/sec, obj=1] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1590.84 it/sec, obj=1] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1589.27 it/sec, obj=1] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1589.69 it/sec, obj=1] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1588.79 it/sec, obj=1] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1588.56 it/sec, obj=1] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1589.10 it/sec, obj=1] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1583.56 it/sec, obj=1] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1582.72 it/sec, obj=1] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1584.07 it/sec, obj=1] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1584.00 it/sec, obj=1] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1585.72 it/sec, obj=1] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1585.66 it/sec, obj=1] INFO - 20:38:27: 40%|████ | 40/100 [00:00<00:00, 1585.28 it/sec, obj=1] INFO - 20:38:27: 41%|████ | 41/100 [00:00<00:00, 1586.45 it/sec, obj=1] INFO - 20:38:27: 42%|████▏ | 42/100 [00:00<00:00, 1586.75 it/sec, obj=1] INFO - 20:38:27: 43%|████▎ | 43/100 [00:00<00:00, 1586.99 it/sec, obj=1] INFO - 20:38:27: 44%|████▍ | 44/100 [00:00<00:00, 1588.23 it/sec, obj=1] INFO - 20:38:27: 45%|████▌ | 45/100 [00:00<00:00, 1587.86 it/sec, obj=1] INFO - 20:38:27: 46%|████▌ | 46/100 [00:00<00:00, 1589.14 it/sec, obj=1] INFO - 20:38:27: 47%|████▋ | 47/100 [00:00<00:00, 1586.18 it/sec, obj=1] INFO - 20:38:27: 48%|████▊ | 48/100 [00:00<00:00, 1586.17 it/sec, obj=1] INFO - 20:38:27: 49%|████▉ | 49/100 [00:00<00:00, 1587.56 it/sec, obj=1] INFO - 20:38:27: 50%|█████ | 50/100 [00:00<00:00, 1588.16 it/sec, obj=1] INFO - 20:38:27: 51%|█████ | 51/100 [00:00<00:00, 1588.14 it/sec, obj=1] INFO - 20:38:27: 52%|█████▏ | 52/100 [00:00<00:00, 1589.45 it/sec, obj=1] INFO - 20:38:27: 53%|█████▎ | 53/100 [00:00<00:00, 1589.43 it/sec, obj=1] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 1.0000000000000002 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-1. -2.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 22%|██▏ | 2/9 [00:00<00:00, 22.69 it/sec, obj=1] INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 2894.62 it/sec, obj=1.71] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 2009.25 it/sec, obj=1.9] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 2133.42 it/sec, obj=1.9] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 1914.11 it/sec, obj=1.46] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 1789.84 it/sec, obj=1.91] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 1756.16 it/sec, obj=1] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 1728.49 it/sec, obj=1.25] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1700.51 it/sec, obj=1.29] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1690.49 it/sec, obj=1.21] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1678.26 it/sec, obj=1.09] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1667.41 it/sec, obj=1.19] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1664.52 it/sec, obj=1.29] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1656.52 it/sec, obj=1.12] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1655.82 it/sec, obj=1.3] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1649.27 it/sec, obj=1.27] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1645.07 it/sec, obj=1.4] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1643.54 it/sec, obj=1.03] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1639.65 it/sec, obj=1.09] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1634.43 it/sec, obj=1.06] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1634.89 it/sec, obj=1.01] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1631.75 it/sec, obj=1.01] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1632.40 it/sec, obj=1] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1629.43 it/sec, obj=1] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1627.72 it/sec, obj=1] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1622.48 it/sec, obj=1] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1620.29 it/sec, obj=1] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1617.41 it/sec, obj=1] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1613.86 it/sec, obj=1] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1612.40 it/sec, obj=1] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1610.53 it/sec, obj=1] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1609.98 it/sec, obj=1] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1608.96 it/sec, obj=1] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1607.55 it/sec, obj=1] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1606.14 it/sec, obj=1] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1601.26 it/sec, obj=1] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1601.73 it/sec, obj=1] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1600.73 it/sec, obj=1] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1600.27 it/sec, obj=1] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1601.08 it/sec, obj=1] INFO - 20:38:27: 40%|████ | 40/100 [00:00<00:00, 1600.07 it/sec, obj=1] INFO - 20:38:27: 41%|████ | 41/100 [00:00<00:00, 1586.48 it/sec, obj=1] INFO - 20:38:27: 42%|████▏ | 42/100 [00:00<00:00, 1586.65 it/sec, obj=1] INFO - 20:38:27: 43%|████▎ | 43/100 [00:00<00:00, 1585.93 it/sec, obj=1] INFO - 20:38:27: 44%|████▍ | 44/100 [00:00<00:00, 1586.47 it/sec, obj=1] INFO - 20:38:27: 45%|████▌ | 45/100 [00:00<00:00, 1588.06 it/sec, obj=1] INFO - 20:38:27: 46%|████▌ | 46/100 [00:00<00:00, 1587.90 it/sec, obj=1] INFO - 20:38:27: 47%|████▋ | 47/100 [00:00<00:00, 1587.92 it/sec, obj=1] INFO - 20:38:27: 48%|████▊ | 48/100 [00:00<00:00, 1589.03 it/sec, obj=1] INFO - 20:38:27: 49%|████▉ | 49/100 [00:00<00:00, 1588.87 it/sec, obj=1] INFO - 20:38:27: 50%|█████ | 50/100 [00:00<00:00, 1589.32 it/sec, obj=1] INFO - 20:38:27: 51%|█████ | 51/100 [00:00<00:00, 1588.75 it/sec, obj=1] INFO - 20:38:27: 52%|█████▏ | 52/100 [00:00<00:00, 1587.99 it/sec, obj=1] INFO - 20:38:27: 53%|█████▎ | 53/100 [00:00<00:00, 1588.54 it/sec, obj=1] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 1.0000000000000002 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-2. -1.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 33%|███▎ | 3/9 [00:00<00:00, 24.07 it/sec, obj=1] INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 2721.81 it/sec, obj=2.12] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 2042.02 it/sec, obj=2.32] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 2118.34 it/sec, obj=2.32] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 1912.37 it/sec, obj=1.87] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 1832.37 it/sec, obj=2.33] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 1773.37 it/sec, obj=1.41] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 1749.50 it/sec, obj=1.67] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1723.83 it/sec, obj=1.7] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1707.47 it/sec, obj=1.62] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1699.20 it/sec, obj=1.51] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1686.98 it/sec, obj=1.6] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1679.91 it/sec, obj=1.7] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1678.39 it/sec, obj=1.54] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1671.70 it/sec, obj=1.72] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1671.44 it/sec, obj=1.68] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1667.34 it/sec, obj=1.81] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1662.47 it/sec, obj=1.45] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1661.51 it/sec, obj=1.51] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1657.34 it/sec, obj=1.47] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1656.88 it/sec, obj=1.42] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1652.32 it/sec, obj=1.42] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1648.97 it/sec, obj=1.42] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1648.85 it/sec, obj=1.41] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1646.65 it/sec, obj=1.41] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1644.52 it/sec, obj=1.41] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1644.06 it/sec, obj=1.41] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1639.40 it/sec, obj=1.41] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1637.35 it/sec, obj=1.41] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1637.03 it/sec, obj=1.41] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1634.65 it/sec, obj=1.41] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1634.86 it/sec, obj=1.41] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1634.27 it/sec, obj=1.41] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1629.74 it/sec, obj=1.41] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1629.99 it/sec, obj=1.41] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1628.58 it/sec, obj=1.41] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1628.33 it/sec, obj=1.41] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1628.91 it/sec, obj=1.41] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1627.99 it/sec, obj=1.41] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1628.60 it/sec, obj=1.41] INFO - 20:38:27: 40%|████ | 40/100 [00:00<00:00, 1627.26 it/sec, obj=1.41] INFO - 20:38:27: 41%|████ | 41/100 [00:00<00:00, 1626.01 it/sec, obj=1.41] INFO - 20:38:27: 42%|████▏ | 42/100 [00:00<00:00, 1626.89 it/sec, obj=1.41] INFO - 20:38:27: 43%|████▎ | 43/100 [00:00<00:00, 1626.12 it/sec, obj=1.41] INFO - 20:38:27: 44%|████▍ | 44/100 [00:00<00:00, 1627.12 it/sec, obj=1.41] INFO - 20:38:27: 45%|████▌ | 45/100 [00:00<00:00, 1625.97 it/sec, obj=1.41] INFO - 20:38:27: 46%|████▌ | 46/100 [00:00<00:00, 1625.12 it/sec, obj=1.41] INFO - 20:38:27: 47%|████▋ | 47/100 [00:00<00:00, 1625.85 it/sec, obj=1.41] INFO - 20:38:27: 48%|████▊ | 48/100 [00:00<00:00, 1624.81 it/sec, obj=1.41] INFO - 20:38:27: 49%|████▉ | 49/100 [00:00<00:00, 1624.08 it/sec, obj=1.41] INFO - 20:38:27: 50%|█████ | 50/100 [00:00<00:00, 1624.63 it/sec, obj=1.41] INFO - 20:38:27: 51%|█████ | 51/100 [00:00<00:00, 1620.02 it/sec, obj=1.41] INFO - 20:38:27: 52%|█████▏ | 52/100 [00:00<00:00, 1618.82 it/sec, obj=1.41] INFO - 20:38:27: 53%|█████▎ | 53/100 [00:00<00:00, 1618.81 it/sec, obj=1.41] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 1.4142135623730954 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-1. -1.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 1.110223024625157e-16 | 1 | float | INFO - 20:38:27: +------+-------------+-----------------------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 44%|████▍ | 4/9 [00:00<00:00, 24.93 it/sec, obj=1.41] INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 2659.67 it/sec, obj=2.71] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 2007.80 it/sec, obj=2.9] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 2092.27 it/sec, obj=2.9] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 2119.94 it/sec, obj=2.56] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 2127.36 it/sec, obj=2.5] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 2149.46 it/sec, obj=2.25] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 2016.77 it/sec, obj=2] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1956.64 it/sec, obj=2.2] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1907.37 it/sec, obj=2.08] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1870.04 it/sec, obj=2.01] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1898.81 it/sec, obj=2.01] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1927.09 it/sec, obj=2.02] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1942.64 it/sec, obj=2.01] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1962.12 it/sec, obj=2] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1925.29 it/sec, obj=2] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1896.48 it/sec, obj=2] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1912.84 it/sec, obj=2] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1925.46 it/sec, obj=2] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1941.67 it/sec, obj=2] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1957.67 it/sec, obj=2] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1965.25 it/sec, obj=2] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1936.92 it/sec, obj=2] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1919.67 it/sec, obj=2] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1896.84 it/sec, obj=2] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1881.46 it/sec, obj=2] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1837.25 it/sec, obj=2] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1824.37 it/sec, obj=2] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1813.89 it/sec, obj=2] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1808.00 it/sec, obj=2] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1798.66 it/sec, obj=2] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1789.92 it/sec, obj=2] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1784.69 it/sec, obj=2] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1777.02 it/sec, obj=2] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1772.26 it/sec, obj=2] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1765.51 it/sec, obj=2] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1759.25 it/sec, obj=2] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1755.97 it/sec, obj=2] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1745.92 it/sec, obj=2] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1741.47 it/sec, obj=2] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 2.0 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-2. 0.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 0 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 0 | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 56%|█████▌ | 5/9 [00:00<00:00, 26.91 it/sec, obj=2] INFO - 20:38:27: *** Start MDOScenario execution *** INFO - 20:38:27: MDOScenario INFO - 20:38:27: Disciplines: f(x,y) g(x,y) INFO - 20:38:27: MDO formulation: DisciplinaryOpt INFO - 20:38:27: Optimization problem: INFO - 20:38:27: minimize f(x) INFO - 20:38:27: with respect to x INFO - 20:38:27: under the inequality constraints INFO - 20:38:27: g(x) <= 2 INFO - 20:38:27: over the design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | None | 1 | float | INFO - 20:38:27: | x[1] | 0 | None | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: Solving optimization problem with algorithm NLOPT_COBYLA: INFO - 20:38:27: 1%| | 1/100 [00:00<00:00, 2882.68 it/sec, obj=2.94] INFO - 20:38:27: 2%|▏ | 2/100 [00:00<00:00, 2002.05 it/sec, obj=3.14] INFO - 20:38:27: 3%|▎ | 3/100 [00:00<00:00, 2122.27 it/sec, obj=3.14] INFO - 20:38:27: 4%|▍ | 4/100 [00:00<00:00, 2111.67 it/sec, obj=2.8] INFO - 20:38:27: 5%|▌ | 5/100 [00:00<00:00, 2123.27 it/sec, obj=2.74] INFO - 20:38:27: 6%|▌ | 6/100 [00:00<00:00, 2143.05 it/sec, obj=2.49] INFO - 20:38:27: 7%|▋ | 7/100 [00:00<00:00, 1986.07 it/sec, obj=2.24] INFO - 20:38:27: 8%|▊ | 8/100 [00:00<00:00, 1907.80 it/sec, obj=2.44] INFO - 20:38:27: 9%|▉ | 9/100 [00:00<00:00, 1857.53 it/sec, obj=2.32] INFO - 20:38:27: 10%|█ | 10/100 [00:00<00:00, 1815.32 it/sec, obj=2.25] INFO - 20:38:27: 11%|█ | 11/100 [00:00<00:00, 1837.12 it/sec, obj=2.25] INFO - 20:38:27: 12%|█▏ | 12/100 [00:00<00:00, 1864.14 it/sec, obj=2.25] INFO - 20:38:27: 13%|█▎ | 13/100 [00:00<00:00, 1884.56 it/sec, obj=2.24] INFO - 20:38:27: 14%|█▍ | 14/100 [00:00<00:00, 1902.92 it/sec, obj=2.24] INFO - 20:38:27: 15%|█▌ | 15/100 [00:00<00:00, 1870.23 it/sec, obj=2.24] INFO - 20:38:27: 16%|█▌ | 16/100 [00:00<00:00, 1851.28 it/sec, obj=2.24] INFO - 20:38:27: 17%|█▋ | 17/100 [00:00<00:00, 1864.82 it/sec, obj=2.24] INFO - 20:38:27: 18%|█▊ | 18/100 [00:00<00:00, 1883.95 it/sec, obj=2.24] INFO - 20:38:27: 19%|█▉ | 19/100 [00:00<00:00, 1897.33 it/sec, obj=2.24] INFO - 20:38:27: 20%|██ | 20/100 [00:00<00:00, 1913.11 it/sec, obj=2.24] INFO - 20:38:27: 21%|██ | 21/100 [00:00<00:00, 1926.01 it/sec, obj=2.24] INFO - 20:38:27: 22%|██▏ | 22/100 [00:00<00:00, 1903.43 it/sec, obj=2.24] INFO - 20:38:27: 23%|██▎ | 23/100 [00:00<00:00, 1885.74 it/sec, obj=2.24] INFO - 20:38:27: 24%|██▍ | 24/100 [00:00<00:00, 1870.44 it/sec, obj=2.24] INFO - 20:38:27: 25%|██▌ | 25/100 [00:00<00:00, 1855.95 it/sec, obj=2.24] INFO - 20:38:27: 26%|██▌ | 26/100 [00:00<00:00, 1843.68 it/sec, obj=2.24] INFO - 20:38:27: 27%|██▋ | 27/100 [00:00<00:00, 1835.52 it/sec, obj=2.24] INFO - 20:38:27: 28%|██▊ | 28/100 [00:00<00:00, 1824.29 it/sec, obj=2.24] INFO - 20:38:27: 29%|██▉ | 29/100 [00:00<00:00, 1815.04 it/sec, obj=2.24] INFO - 20:38:27: 30%|███ | 30/100 [00:00<00:00, 1808.51 it/sec, obj=2.24] INFO - 20:38:27: 31%|███ | 31/100 [00:00<00:00, 1800.43 it/sec, obj=2.24] INFO - 20:38:27: 32%|███▏ | 32/100 [00:00<00:00, 1795.29 it/sec, obj=2.24] INFO - 20:38:27: 33%|███▎ | 33/100 [00:00<00:00, 1787.32 it/sec, obj=2.24] INFO - 20:38:27: 34%|███▍ | 34/100 [00:00<00:00, 1780.00 it/sec, obj=2.24] INFO - 20:38:27: 35%|███▌ | 35/100 [00:00<00:00, 1775.21 it/sec, obj=2.24] INFO - 20:38:27: 36%|███▌ | 36/100 [00:00<00:00, 1768.17 it/sec, obj=2.24] INFO - 20:38:27: 37%|███▋ | 37/100 [00:00<00:00, 1763.01 it/sec, obj=2.24] INFO - 20:38:27: 38%|███▊ | 38/100 [00:00<00:00, 1758.99 it/sec, obj=2.24] INFO - 20:38:27: 39%|███▉ | 39/100 [00:00<00:00, 1753.30 it/sec, obj=2.24] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 2.23606797749979 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-1. 0.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: | x[0] | 0 | 0 | 1 | float | INFO - 20:38:27: | x[1] | 0 | 0 | 1 | float | INFO - 20:38:27: +------+-------------+-------+-------------+-------+ INFO - 20:38:27: *** End MDOScenario execution *** INFO - 20:38:27: 67%|██████▋ | 6/9 [00:00<00:00, 28.43 it/sec, obj=2.24] INFO - 20:38:27: Optimization result: INFO - 20:38:27: Optimizer info: INFO - 20:38:27: Status: None INFO - 20:38:27: Message: None INFO - 20:38:27: Number of calls to the objective function by the optimizer: 0 INFO - 20:38:27: Solution: INFO - 20:38:27: The solution is feasible. INFO - 20:38:27: Objective: 2.3125318484214635e-15 INFO - 20:38:27: Standardized constraints: INFO - 20:38:27: [g-2] = [-2. -2.] INFO - 20:38:27: Design space: INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: | Name | Lower bound | Value | Upper bound | Type | INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: | y[0] | 0 | 0 | 1 | integer | INFO - 20:38:27: | y[1] | 0 | 0 | 2 | integer | INFO - 20:38:27: +------+-------------+-------+-------------+---------+ INFO - 20:38:27: *** End DOEScenario execution *** .. GENERATED FROM PYTHON SOURCE LINES 268-279 .. tip:: In a :class:`.DOEScenario`, we know a priori the samples that will be evaluated. This means we can run the outer scenario in parallel if we set the setting ``n_processes`` to at least 2. Note that if you are running the outer scenario in parallel and requesting the databases of the continuous optimizations on the disk, you will need to instantiate the :class:`.MDOScenarioAdapter` with the argument ``naming="UUID"``, which is multiprocessing-safe. Running in parallel also means that the option ``keep_opt_history`` will not work because we are unable to copy the databases from the sub-processes to the main process. .. GENERATED FROM PYTHON SOURCE LINES 282-289 Plot the objective and constraint history for the scenario. ----------------------------------------------------------- At the end of the optimization we see the results of the problem. The optimal solution would be in this case the iteration of the DOE that gave the minimum for :math:`f(x,y)` while respecting the constraint :math;`g(x,y)`. The full problem optimal result will contain the values for :math:`x`, :math:`y`, :math:`f`, and :math:`g`. .. GENERATED FROM PYTHON SOURCE LINES 289-290 .. code-block:: Python outer_scenario.post_process(OptHistoryView_Settings(save=False, show=True)) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/mdo/images/sphx_glr_plot_mixed_optimization_001.png :alt: Evolution of the optimization variables :srcset: /examples/mdo/images/sphx_glr_plot_mixed_optimization_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/mdo/images/sphx_glr_plot_mixed_optimization_002.png :alt: Evolution of the objective value :srcset: /examples/mdo/images/sphx_glr_plot_mixed_optimization_002.png :class: sphx-glr-multi-img * .. image-sg:: /examples/mdo/images/sphx_glr_plot_mixed_optimization_003.png :alt: Evolution of the distance to the optimum :srcset: /examples/mdo/images/sphx_glr_plot_mixed_optimization_003.png :class: sphx-glr-multi-img * .. image-sg:: /examples/mdo/images/sphx_glr_plot_mixed_optimization_004.png :alt: Evolution of the inequality constraints :srcset: /examples/mdo/images/sphx_glr_plot_mixed_optimization_004.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.589 seconds) .. _sphx_glr_download_examples_mdo_plot_mixed_optimization.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_mixed_optimization.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_mixed_optimization.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_mixed_optimization.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_