Solve a mixed optimization problem.#

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 MDOScenarioAdapter to wrap a 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.

Imports#

All the imports needed for the tutorial are performed here.

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()
<RootLogger root (INFO)>

Optimization problem definition.#

We define the following optimization problem:

\[\begin{split}\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}\end{split}\]

and where the general constraint is:

\[g(x,y) = x + y\]

Where \(y\) is an integer vector with two components and \(x\) is a float vector with two components.

Optimization problem reformulation.#

The problem can be split using the MDOScenarioAdapter. To do this we will divide the design space in two, a continuous one and a discrete one. The 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 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:

\[\begin{split}\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}\end{split}\]

For the inner MDO Scenario:

\[\begin{split}\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}\end{split}\]

In the next steps, we will build both scenarios and connect them to solve the full problem.

Create an AutoPyDiscipline to compute the objective and the constraints.#

Since the expressions of our toy problem are very simple, we can use an 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.

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)
WARNING - 02:57:39: The Args section is missing.
WARNING - 02:57:39: The Args section is missing.

Create the design space for the entire problem.#

We can define a DesignSpace for the whole problem and then filter either the continuous variables or the discrete ones.

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"
)

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 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.

design_space_inner_scenario = design_space.filter(keep_variables=["x"], copy=True)

Create the inner MDO scenario.#

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)

Create the scenario adapter.#

An MDOScenarioAdapter wraps an entire BaseScenario as a 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.

input_names = ["y"]
output_names = ["f", "g"]

The argument set_x0_before_opt allows us to set the starting point of the adapted scenario from the outer DOE scenario values.

adapted_inner_scenario = MDOScenarioAdapter(
    inner_scenario,
    input_names,
    output_names,
    set_x0_before_opt=True,
)

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 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.

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 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.

design_space_outer_scenario = design_space.filter(keep_variables="y", copy=True)

Create the outer DOE scenario.#

outer_scenario = create_scenario(
    adapted_inner_scenario,
    "f",
    design_space_outer_scenario,
    formulation_settings_model=DisciplinaryOpt_Settings(),
    scenario_type="DOE",
)

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.

outer_scenario.add_constraint("g", constraint_type="ineq", value=2)

Show an xDSM of the process, including the outer and inner scenarios.

outer_scenario.xdsmize(save_html=False, pdf_build=False)


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.

outer_scenario.execute(PYDOE_FULLFACT_Settings(n_samples=9))
INFO - 02:57:39: *** Start DOEScenario execution ***
INFO - 02:57:39: DOEScenario
INFO - 02:57:39:    Disciplines: MDOScenario_adapter
INFO - 02:57:39:    MDO formulation: DisciplinaryOpt
INFO - 02:57:39: Optimization problem:
INFO - 02:57:39:    minimize f(y)
INFO - 02:57:39:    with respect to y
INFO - 02:57:39:    subject to constraints:
INFO - 02:57:39:       g(y) <= 2
INFO - 02:57:39:    over the design space:
INFO - 02:57:39:       +------+-------------+-------+-------------+---------+
INFO - 02:57:39:       | Name | Lower bound | Value | Upper bound | Type    |
INFO - 02:57:39:       +------+-------------+-------+-------------+---------+
INFO - 02:57:39:       | y[0] |      0      |   1   |      1      | integer |
INFO - 02:57:39:       | y[1] |      0      |   1   |      2      | integer |
INFO - 02:57:39:       +------+-------------+-------+-------------+---------+
INFO - 02:57:39: Solving optimization problem with algorithm PYDOE_FULLFACT:
INFO - 02:57:39: *** Start MDOScenario execution ***
INFO - 02:57:39: MDOScenario
INFO - 02:57:39:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:39:    MDO formulation: DisciplinaryOpt
INFO - 02:57:39: Optimization problem:
INFO - 02:57:39:    minimize f(x)
INFO - 02:57:39:    with respect to x
INFO - 02:57:39:    subject to constraints:
INFO - 02:57:39:       g(x) <= 2
INFO - 02:57:39:    over the design space:
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:39:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:39:      1%|          | 1/100 [00:00<00:00, 359.96 it/sec, obj=0.707]
INFO - 02:57:39:      2%|▏         | 2/100 [00:00<00:00, 534.03 it/sec, obj=0.901]
INFO - 02:57:39:      3%|▎         | 3/100 [00:00<00:00, 681.67 it/sec, obj=0.901]
INFO - 02:57:39:      4%|▍         | 4/100 [00:00<00:00, 743.67 it/sec, obj=0.457]
INFO - 02:57:39:      5%|▌         | 5/100 [00:00<00:00, 784.51 it/sec, obj=0.914]
INFO - 02:57:39:      6%|▌         | 6/100 [00:00<00:00, 817.74 it/sec, obj=1.57e-16]
INFO - 02:57:39:      7%|▋         | 7/100 [00:00<00:00, 844.82 it/sec, obj=0.254]
INFO - 02:57:39:      8%|▊         | 8/100 [00:00<00:00, 866.97 it/sec, obj=0.29]
INFO - 02:57:39:      9%|▉         | 9/100 [00:00<00:00, 885.39 it/sec, obj=0.206]
INFO - 02:57:39:     10%|█         | 10/100 [00:00<00:00, 898.27 it/sec, obj=0.0948]
INFO - 02:57:39:     11%|█         | 11/100 [00:00<00:00, 911.91 it/sec, obj=0.186]
INFO - 02:57:39:     12%|█▏        | 12/100 [00:00<00:00, 925.81 it/sec, obj=0.289]
INFO - 02:57:39:     13%|█▎        | 13/100 [00:00<00:00, 932.91 it/sec, obj=0.121]
INFO - 02:57:39:     14%|█▍        | 14/100 [00:00<00:00, 942.10 it/sec, obj=0.304]
INFO - 02:57:39:     15%|█▌        | 15/100 [00:00<00:00, 949.58 it/sec, obj=0.266]
INFO - 02:57:39:     16%|█▌        | 16/100 [00:00<00:00, 956.50 it/sec, obj=0.399]
INFO - 02:57:39:     17%|█▋        | 17/100 [00:00<00:00, 962.06 it/sec, obj=0.0323]
INFO - 02:57:39:     18%|█▊        | 18/100 [00:00<00:00, 965.53 it/sec, obj=0.0929]
INFO - 02:57:39:     19%|█▉        | 19/100 [00:00<00:00, 970.63 it/sec, obj=0.06]
INFO - 02:57:39:     20%|██        | 20/100 [00:00<00:00, 975.15 it/sec, obj=0.00983]
INFO - 02:57:39:     21%|██        | 21/100 [00:00<00:00, 978.09 it/sec, obj=0.00655]
INFO - 02:57:39:     22%|██▏       | 22/100 [00:00<00:00, 981.70 it/sec, obj=0.00145]
INFO - 02:57:39:     23%|██▎       | 23/100 [00:00<00:00, 983.76 it/sec, obj=0.000321]
INFO - 02:57:39:     24%|██▍       | 24/100 [00:00<00:00, 987.24 it/sec, obj=0.000178]
INFO - 02:57:39:     25%|██▌       | 25/100 [00:00<00:00, 989.86 it/sec, obj=0.000255]
INFO - 02:57:39:     26%|██▌       | 26/100 [00:00<00:00, 990.12 it/sec, obj=0.00065]
INFO - 02:57:39:     27%|██▋       | 27/100 [00:00<00:00, 982.93 it/sec, obj=0.000193]
INFO - 02:57:39:     28%|██▊       | 28/100 [00:00<00:00, 984.84 it/sec, obj=3.21e-6]
INFO - 02:57:39:     29%|██▉       | 29/100 [00:00<00:00, 985.81 it/sec, obj=0.00012]
INFO - 02:57:39:     30%|███       | 30/100 [00:00<00:00, 987.41 it/sec, obj=5.79e-7]
INFO - 02:57:39:     31%|███       | 31/100 [00:00<00:00, 988.74 it/sec, obj=2.78e-6]
INFO - 02:57:39:     32%|███▏      | 32/100 [00:00<00:00, 990.93 it/sec, obj=7.05e-6]
INFO - 02:57:39:     33%|███▎      | 33/100 [00:00<00:00, 992.44 it/sec, obj=2.64e-5]
INFO - 02:57:39:     34%|███▍      | 34/100 [00:00<00:00, 986.49 it/sec, obj=6.43e-6]
INFO - 02:57:39:     35%|███▌      | 35/100 [00:00<00:00, 986.42 it/sec, obj=4.54e-6]
INFO - 02:57:39:     36%|███▌      | 36/100 [00:00<00:00, 988.22 it/sec, obj=7.42e-6]
INFO - 02:57:39:     37%|███▋      | 37/100 [00:00<00:00, 990.21 it/sec, obj=7.02e-6]
INFO - 02:57:39:     38%|███▊      | 38/100 [00:00<00:00, 991.49 it/sec, obj=7.54e-6]
INFO - 02:57:39:     39%|███▉      | 39/100 [00:00<00:00, 993.23 it/sec, obj=2.19e-6]
INFO - 02:57:39:     40%|████      | 40/100 [00:00<00:00, 994.85 it/sec, obj=4.27e-6]
INFO - 02:57:39:     41%|████      | 41/100 [00:00<00:00, 995.69 it/sec, obj=8.58e-6]
INFO - 02:57:39:     42%|████▏     | 42/100 [00:00<00:00, 997.05 it/sec, obj=1.5e-6]
INFO - 02:57:39:     43%|████▎     | 43/100 [00:00<00:00, 998.87 it/sec, obj=8.66e-7]
INFO - 02:57:39:     44%|████▍     | 44/100 [00:00<00:00, 1000.26 it/sec, obj=2.39e-6]
INFO - 02:57:39:     45%|████▌     | 45/100 [00:00<00:00, 1001.90 it/sec, obj=1.17e-6]
INFO - 02:57:39:     46%|████▌     | 46/100 [00:00<00:00, 1002.48 it/sec, obj=2.62e-7]
INFO - 02:57:39:     47%|████▋     | 47/100 [00:00<00:00, 1003.94 it/sec, obj=9.02e-8]
INFO - 02:57:39:     48%|████▊     | 48/100 [00:00<00:00, 1004.47 it/sec, obj=8.52e-8]
INFO - 02:57:39:     49%|████▉     | 49/100 [00:00<00:00, 1005.67 it/sec, obj=1.32e-7]
INFO - 02:57:39:     50%|█████     | 50/100 [00:00<00:00, 1005.67 it/sec, obj=4.06e-8]
INFO - 02:57:39:     51%|█████     | 51/100 [00:00<00:00, 1006.72 it/sec, obj=1.5e-8]
INFO - 02:57:39:     52%|█████▏    | 52/100 [00:00<00:00, 1007.12 it/sec, obj=4.22e-9]
INFO - 02:57:39:     53%|█████▎    | 53/100 [00:00<00:00, 1008.28 it/sec, obj=1.15e-9]
INFO - 02:57:39:     54%|█████▍    | 54/100 [00:00<00:00, 1009.19 it/sec, obj=7.62e-10]
INFO - 02:57:39:     55%|█████▌    | 55/100 [00:00<00:00, 1009.65 it/sec, obj=2.17e-10]
INFO - 02:57:39:     56%|█████▌    | 56/100 [00:00<00:00, 1010.75 it/sec, obj=1.16e-10]
INFO - 02:57:39:     57%|█████▋    | 57/100 [00:00<00:00, 1011.79 it/sec, obj=1.65e-11]
INFO - 02:57:39:     58%|█████▊    | 58/100 [00:00<00:00, 1012.78 it/sec, obj=9.78e-12]
INFO - 02:57:39:     59%|█████▉    | 59/100 [00:00<00:00, 1013.78 it/sec, obj=3.55e-12]
INFO - 02:57:39:     60%|██████    | 60/100 [00:00<00:00, 1014.10 it/sec, obj=2.06e-13]
INFO - 02:57:39:     61%|██████    | 61/100 [00:00<00:00, 1015.07 it/sec, obj=1.42e-12]
INFO - 02:57:39:     62%|██████▏   | 62/100 [00:00<00:00, 1016.51 it/sec, obj=1.19e-13]
INFO - 02:57:39:     63%|██████▎   | 63/100 [00:00<00:00, 1017.02 it/sec, obj=3e-14]
INFO - 02:57:39:     64%|██████▍   | 64/100 [00:00<00:00, 1017.94 it/sec, obj=1.85e-13]
INFO - 02:57:39:     65%|██████▌   | 65/100 [00:00<00:00, 1018.00 it/sec, obj=3.51e-13]
INFO - 02:57:39:     66%|██████▌   | 66/100 [00:00<00:00, 1018.68 it/sec, obj=2.18e-13]
INFO - 02:57:39:     67%|██████▋   | 67/100 [00:00<00:00, 1019.29 it/sec, obj=4.71e-15]
INFO - 02:57:39:     68%|██████▊   | 68/100 [00:00<00:00, 1019.46 it/sec, obj=1.74e-14]
INFO - 02:57:39:     69%|██████▉   | 69/100 [00:00<00:00, 1020.00 it/sec, obj=2.39e-14]
INFO - 02:57:39:     70%|███████   | 70/100 [00:00<00:00, 1020.61 it/sec, obj=5.02e-14]
INFO - 02:57:39:     71%|███████   | 71/100 [00:00<00:00, 1021.43 it/sec, obj=1.61e-14]
INFO - 02:57:39:     72%|███████▏  | 72/100 [00:00<00:00, 1021.44 it/sec, obj=6.98e-15]
INFO - 02:57:39:     73%|███████▎  | 73/100 [00:00<00:00, 1021.43 it/sec, obj=2.31e-15]
INFO - 02:57:39: Optimization result:
INFO - 02:57:39:    Optimizer info:
INFO - 02:57:39:       Status: None
INFO - 02:57:39:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:39:       Number of calls to the objective function by the optimizer: 74
INFO - 02:57:39:    Solution:
INFO - 02:57:39:       The solution is feasible.
INFO - 02:57:39:       Objective: 1.5700924586837752e-16
INFO - 02:57:39:       Standardized constraints:
INFO - 02:57:39:          [g-2] = [-2. -2.]
INFO - 02:57:39:       Design space:
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39:          | Name | Lower bound |         Value         | Upper bound | Type  |
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39:          | x[0] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:39:          | x[1] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39: *** End MDOScenario execution (time: 0:00:00.074624) ***
INFO - 02:57:39:     11%|█         | 1/9 [00:00<00:00, 13.28 it/sec, obj=2.31e-15]
INFO - 02:57:39: *** Start MDOScenario execution ***
INFO - 02:57:39: MDOScenario
INFO - 02:57:39:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:39:    MDO formulation: DisciplinaryOpt
INFO - 02:57:39: Optimization problem:
INFO - 02:57:39:    minimize f(x)
INFO - 02:57:39:    with respect to x
INFO - 02:57:39:    subject to constraints:
INFO - 02:57:39:       g(x) <= 2
INFO - 02:57:39:    over the design space:
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:39:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:39:      1%|          | 1/100 [00:00<00:00, 2257.43 it/sec, obj=1.71]
INFO - 02:57:39:      2%|▏         | 2/100 [00:00<00:00, 1591.16 it/sec, obj=1.9]
INFO - 02:57:39:      3%|▎         | 3/100 [00:00<00:00, 1607.83 it/sec, obj=1.9]
INFO - 02:57:39:      4%|▍         | 4/100 [00:00<00:00, 1410.56 it/sec, obj=1.46]
INFO - 02:57:39:      5%|▌         | 5/100 [00:00<00:00, 1327.65 it/sec, obj=1.91]
INFO - 02:57:39:      6%|▌         | 6/100 [00:00<00:00, 1268.50 it/sec, obj=1]
INFO - 02:57:39:      7%|▋         | 7/100 [00:00<00:00, 1188.24 it/sec, obj=1.25]
INFO - 02:57:39:      8%|▊         | 8/100 [00:00<00:00, 1149.05 it/sec, obj=1.29]
INFO - 02:57:39:      9%|▉         | 9/100 [00:00<00:00, 1131.39 it/sec, obj=1.21]
INFO - 02:57:39:     10%|█         | 10/100 [00:00<00:00, 1121.53 it/sec, obj=1.09]
INFO - 02:57:39:     11%|█         | 11/100 [00:00<00:00, 1117.24 it/sec, obj=1.19]
INFO - 02:57:39:     12%|█▏        | 12/100 [00:00<00:00, 1107.31 it/sec, obj=1.29]
INFO - 02:57:39:     13%|█▎        | 13/100 [00:00<00:00, 1106.03 it/sec, obj=1.12]
INFO - 02:57:39:     14%|█▍        | 14/100 [00:00<00:00, 1100.31 it/sec, obj=1.3]
INFO - 02:57:39:     15%|█▌        | 15/100 [00:00<00:00, 1096.15 it/sec, obj=1.27]
INFO - 02:57:39:     16%|█▌        | 16/100 [00:00<00:00, 1087.10 it/sec, obj=1.4]
INFO - 02:57:39:     17%|█▋        | 17/100 [00:00<00:00, 1070.57 it/sec, obj=1.03]
INFO - 02:57:39:     18%|█▊        | 18/100 [00:00<00:00, 1071.02 it/sec, obj=1.09]
INFO - 02:57:39:     19%|█▉        | 19/100 [00:00<00:00, 1071.08 it/sec, obj=1.06]
INFO - 02:57:39:     20%|██        | 20/100 [00:00<00:00, 1057.63 it/sec, obj=1.01]
INFO - 02:57:39:     21%|██        | 21/100 [00:00<00:00, 1058.28 it/sec, obj=1.01]
INFO - 02:57:39:     22%|██▏       | 22/100 [00:00<00:00, 1057.97 it/sec, obj=1]
INFO - 02:57:39:     23%|██▎       | 23/100 [00:00<00:00, 1058.02 it/sec, obj=1]
INFO - 02:57:39:     24%|██▍       | 24/100 [00:00<00:00, 1056.21 it/sec, obj=1]
INFO - 02:57:39:     25%|██▌       | 25/100 [00:00<00:00, 1056.52 it/sec, obj=1]
INFO - 02:57:39:     26%|██▌       | 26/100 [00:00<00:00, 1054.85 it/sec, obj=1]
INFO - 02:57:39:     27%|██▋       | 27/100 [00:00<00:00, 1054.78 it/sec, obj=1]
INFO - 02:57:39:     28%|██▊       | 28/100 [00:00<00:00, 1055.18 it/sec, obj=1]
INFO - 02:57:39:     29%|██▉       | 29/100 [00:00<00:00, 1054.32 it/sec, obj=1]
INFO - 02:57:39:     30%|███       | 30/100 [00:00<00:00, 1053.91 it/sec, obj=1]
INFO - 02:57:39:     31%|███       | 31/100 [00:00<00:00, 1053.69 it/sec, obj=1]
INFO - 02:57:39:     32%|███▏      | 32/100 [00:00<00:00, 1054.06 it/sec, obj=1]
INFO - 02:57:39:     33%|███▎      | 33/100 [00:00<00:00, 1053.70 it/sec, obj=1]
INFO - 02:57:39:     34%|███▍      | 34/100 [00:00<00:00, 1054.48 it/sec, obj=1]
INFO - 02:57:39:     35%|███▌      | 35/100 [00:00<00:00, 1054.65 it/sec, obj=1]
INFO - 02:57:39:     36%|███▌      | 36/100 [00:00<00:00, 1055.35 it/sec, obj=1]
INFO - 02:57:39:     37%|███▋      | 37/100 [00:00<00:00, 1055.52 it/sec, obj=1]
INFO - 02:57:39:     38%|███▊      | 38/100 [00:00<00:00, 1055.30 it/sec, obj=1]
INFO - 02:57:39:     39%|███▉      | 39/100 [00:00<00:00, 1055.68 it/sec, obj=1]
INFO - 02:57:39:     40%|████      | 40/100 [00:00<00:00, 1055.28 it/sec, obj=1]
INFO - 02:57:39:     41%|████      | 41/100 [00:00<00:00, 1054.22 it/sec, obj=1]
INFO - 02:57:39:     42%|████▏     | 42/100 [00:00<00:00, 1053.70 it/sec, obj=1]
INFO - 02:57:39:     43%|████▎     | 43/100 [00:00<00:00, 1054.50 it/sec, obj=1]
INFO - 02:57:39:     44%|████▍     | 44/100 [00:00<00:00, 1054.22 it/sec, obj=1]
INFO - 02:57:39:     45%|████▌     | 45/100 [00:00<00:00, 1053.83 it/sec, obj=1]
INFO - 02:57:39:     46%|████▌     | 46/100 [00:00<00:00, 1054.01 it/sec, obj=1]
INFO - 02:57:39:     47%|████▋     | 47/100 [00:00<00:00, 1054.27 it/sec, obj=1]
INFO - 02:57:39:     48%|████▊     | 48/100 [00:00<00:00, 1054.75 it/sec, obj=1]
INFO - 02:57:39:     49%|████▉     | 49/100 [00:00<00:00, 1054.20 it/sec, obj=1]
INFO - 02:57:39:     50%|█████     | 50/100 [00:00<00:00, 1054.36 it/sec, obj=1]
INFO - 02:57:39:     51%|█████     | 51/100 [00:00<00:00, 1054.18 it/sec, obj=1]
INFO - 02:57:39:     52%|█████▏    | 52/100 [00:00<00:00, 1053.80 it/sec, obj=1]
INFO - 02:57:39:     53%|█████▎    | 53/100 [00:00<00:00, 1054.14 it/sec, obj=1]
INFO - 02:57:39: Optimization result:
INFO - 02:57:39:    Optimizer info:
INFO - 02:57:39:       Status: None
INFO - 02:57:39:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:39:       Number of calls to the objective function by the optimizer: 54
INFO - 02:57:39:    Solution:
INFO - 02:57:39:       The solution is feasible.
INFO - 02:57:39:       Objective: 1.0000000000000002
INFO - 02:57:39:       Standardized constraints:
INFO - 02:57:39:          [g-2] = [-1. -2.]
INFO - 02:57:39:       Design space:
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39:          | Name | Lower bound |         Value         | Upper bound | Type  |
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39:          | x[0] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:39:          | x[1] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:39:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:39: *** End MDOScenario execution (time: 0:00:00.052881) ***
INFO - 02:57:39:     22%|██▏       | 2/9 [00:00<00:00, 15.46 it/sec, obj=1]
INFO - 02:57:39: *** Start MDOScenario execution ***
INFO - 02:57:39: MDOScenario
INFO - 02:57:39:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:39:    MDO formulation: DisciplinaryOpt
INFO - 02:57:39: Optimization problem:
INFO - 02:57:39:    minimize f(x)
INFO - 02:57:39:    with respect to x
INFO - 02:57:39:    subject to constraints:
INFO - 02:57:39:       g(x) <= 2
INFO - 02:57:39:    over the design space:
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:39:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:39:       +------+-------------+-------+-------------+-------+
INFO - 02:57:39: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:39:      1%|          | 1/100 [00:00<00:00, 2220.38 it/sec, obj=1.71]
INFO - 02:57:39:      2%|▏         | 2/100 [00:00<00:00, 1583.35 it/sec, obj=1.9]
INFO - 02:57:39:      3%|▎         | 3/100 [00:00<00:00, 1605.17 it/sec, obj=1.9]
INFO - 02:57:39:      4%|▍         | 4/100 [00:00<00:00, 1430.77 it/sec, obj=1.46]
INFO - 02:57:39:      5%|▌         | 5/100 [00:00<00:00, 1340.72 it/sec, obj=1.91]
INFO - 02:57:40:      6%|▌         | 6/100 [00:00<00:00, 1277.65 it/sec, obj=1]
INFO - 02:57:40:      7%|▋         | 7/100 [00:00<00:00, 1238.61 it/sec, obj=1.25]
INFO - 02:57:40:      8%|▊         | 8/100 [00:00<00:00, 1214.77 it/sec, obj=1.29]
INFO - 02:57:40:      9%|▉         | 9/100 [00:00<00:00, 1196.21 it/sec, obj=1.21]
INFO - 02:57:40:     10%|█         | 10/100 [00:00<00:00, 1180.86 it/sec, obj=1.09]
INFO - 02:57:40:     11%|█         | 11/100 [00:00<00:00, 1171.44 it/sec, obj=1.19]
INFO - 02:57:40:     12%|█▏        | 12/100 [00:00<00:00, 1161.62 it/sec, obj=1.29]
INFO - 02:57:40:     13%|█▎        | 13/100 [00:00<00:00, 1156.07 it/sec, obj=1.12]
INFO - 02:57:40:     14%|█▍        | 14/100 [00:00<00:00, 1147.19 it/sec, obj=1.3]
INFO - 02:57:40:     15%|█▌        | 15/100 [00:00<00:00, 1141.08 it/sec, obj=1.27]
INFO - 02:57:40:     16%|█▌        | 16/100 [00:00<00:00, 1132.03 it/sec, obj=1.4]
INFO - 02:57:40:     17%|█▋        | 17/100 [00:00<00:00, 1127.68 it/sec, obj=1.03]
INFO - 02:57:40:     18%|█▊        | 18/100 [00:00<00:00, 1124.70 it/sec, obj=1.09]
INFO - 02:57:40:     19%|█▉        | 19/100 [00:00<00:00, 1120.15 it/sec, obj=1.06]
INFO - 02:57:40:     20%|██        | 20/100 [00:00<00:00, 1117.57 it/sec, obj=1.01]
INFO - 02:57:40:     21%|██        | 21/100 [00:00<00:00, 1116.55 it/sec, obj=1.01]
INFO - 02:57:40:     22%|██▏       | 22/100 [00:00<00:00, 1115.08 it/sec, obj=1]
INFO - 02:57:40:     23%|██▎       | 23/100 [00:00<00:00, 1109.40 it/sec, obj=1]
INFO - 02:57:40:     24%|██▍       | 24/100 [00:00<00:00, 1107.09 it/sec, obj=1]
INFO - 02:57:40:     25%|██▌       | 25/100 [00:00<00:00, 1104.01 it/sec, obj=1]
INFO - 02:57:40:     26%|██▌       | 26/100 [00:00<00:00, 1102.61 it/sec, obj=1]
INFO - 02:57:40:     27%|██▋       | 27/100 [00:00<00:00, 1098.89 it/sec, obj=1]
INFO - 02:57:40:     28%|██▊       | 28/100 [00:00<00:00, 1096.87 it/sec, obj=1]
INFO - 02:57:40:     29%|██▉       | 29/100 [00:00<00:00, 1095.72 it/sec, obj=1]
INFO - 02:57:40:     30%|███       | 30/100 [00:00<00:00, 1093.70 it/sec, obj=1]
INFO - 02:57:40:     31%|███       | 31/100 [00:00<00:00, 1092.56 it/sec, obj=1]
INFO - 02:57:40:     32%|███▏      | 32/100 [00:00<00:00, 1090.67 it/sec, obj=1]
INFO - 02:57:40:     33%|███▎      | 33/100 [00:00<00:00, 1089.76 it/sec, obj=1]
INFO - 02:57:40:     34%|███▍      | 34/100 [00:00<00:00, 1089.55 it/sec, obj=1]
INFO - 02:57:40:     35%|███▌      | 35/100 [00:00<00:00, 1088.27 it/sec, obj=1]
INFO - 02:57:40:     36%|███▌      | 36/100 [00:00<00:00, 1087.25 it/sec, obj=1]
INFO - 02:57:40:     37%|███▋      | 37/100 [00:00<00:00, 1085.55 it/sec, obj=1]
INFO - 02:57:40:     38%|███▊      | 38/100 [00:00<00:00, 1085.26 it/sec, obj=1]
INFO - 02:57:40:     39%|███▉      | 39/100 [00:00<00:00, 1084.55 it/sec, obj=1]
INFO - 02:57:40:     40%|████      | 40/100 [00:00<00:00, 1083.69 it/sec, obj=1]
INFO - 02:57:40:     41%|████      | 41/100 [00:00<00:00, 1084.16 it/sec, obj=1]
INFO - 02:57:40:     42%|████▏     | 42/100 [00:00<00:00, 1083.34 it/sec, obj=1]
INFO - 02:57:40:     43%|████▎     | 43/100 [00:00<00:00, 1083.08 it/sec, obj=1]
INFO - 02:57:40:     44%|████▍     | 44/100 [00:00<00:00, 1078.96 it/sec, obj=1]
INFO - 02:57:40:     45%|████▌     | 45/100 [00:00<00:00, 1072.64 it/sec, obj=1]
INFO - 02:57:40:     46%|████▌     | 46/100 [00:00<00:00, 1071.98 it/sec, obj=1]
INFO - 02:57:40:     47%|████▋     | 47/100 [00:00<00:00, 1070.89 it/sec, obj=1]
INFO - 02:57:40:     48%|████▊     | 48/100 [00:00<00:00, 1069.66 it/sec, obj=1]
INFO - 02:57:40:     49%|████▉     | 49/100 [00:00<00:00, 1070.16 it/sec, obj=1]
INFO - 02:57:40:     50%|█████     | 50/100 [00:00<00:00, 1069.57 it/sec, obj=1]
INFO - 02:57:40:     51%|█████     | 51/100 [00:00<00:00, 1069.60 it/sec, obj=1]
INFO - 02:57:40:     52%|█████▏    | 52/100 [00:00<00:00, 1068.92 it/sec, obj=1]
INFO - 02:57:40:     53%|█████▎    | 53/100 [00:00<00:00, 1068.94 it/sec, obj=1]
INFO - 02:57:40: Optimization result:
INFO - 02:57:40:    Optimizer info:
INFO - 02:57:40:       Status: None
INFO - 02:57:40:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:40:       Number of calls to the objective function by the optimizer: 54
INFO - 02:57:40:    Solution:
INFO - 02:57:40:       The solution is feasible.
INFO - 02:57:40:       Objective: 1.0000000000000002
INFO - 02:57:40:       Standardized constraints:
INFO - 02:57:40:          [g-2] = [-2. -1.]
INFO - 02:57:40:       Design space:
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40:          | Name | Lower bound |         Value         | Upper bound | Type  |
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40:          | x[0] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:40:          | x[1] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40: *** End MDOScenario execution (time: 0:00:00.052181) ***
INFO - 02:57:40:     33%|███▎      | 3/9 [00:00<00:00, 16.43 it/sec, obj=1]
INFO - 02:57:40: *** Start MDOScenario execution ***
INFO - 02:57:40: MDOScenario
INFO - 02:57:40:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:40:    MDO formulation: DisciplinaryOpt
INFO - 02:57:40: Optimization problem:
INFO - 02:57:40:    minimize f(x)
INFO - 02:57:40:    with respect to x
INFO - 02:57:40:    subject to constraints:
INFO - 02:57:40:       g(x) <= 2
INFO - 02:57:40:    over the design space:
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:40:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:40:      1%|          | 1/100 [00:00<00:00, 2314.74 it/sec, obj=2.12]
INFO - 02:57:40:      2%|▏         | 2/100 [00:00<00:00, 1541.46 it/sec, obj=2.32]
INFO - 02:57:40:      3%|▎         | 3/100 [00:00<00:00, 1571.10 it/sec, obj=2.32]
INFO - 02:57:40:      4%|▍         | 4/100 [00:00<00:00, 1401.37 it/sec, obj=1.87]
INFO - 02:57:40:      5%|▌         | 5/100 [00:00<00:00, 1311.38 it/sec, obj=2.33]
INFO - 02:57:40:      6%|▌         | 6/100 [00:00<00:00, 1261.89 it/sec, obj=1.41]
INFO - 02:57:40:      7%|▋         | 7/100 [00:00<00:00, 1227.99 it/sec, obj=1.67]
INFO - 02:57:40:      8%|▊         | 8/100 [00:00<00:00, 1205.61 it/sec, obj=1.7]
INFO - 02:57:40:      9%|▉         | 9/100 [00:00<00:00, 1189.20 it/sec, obj=1.62]
INFO - 02:57:40:     10%|█         | 10/100 [00:00<00:00, 1176.00 it/sec, obj=1.51]
INFO - 02:57:40:     11%|█         | 11/100 [00:00<00:00, 1129.57 it/sec, obj=1.6]
INFO - 02:57:40:     12%|█▏        | 12/100 [00:00<00:00, 1116.92 it/sec, obj=1.7]
INFO - 02:57:40:     13%|█▎        | 13/100 [00:00<00:00, 1089.52 it/sec, obj=1.54]
INFO - 02:57:40:     14%|█▍        | 14/100 [00:00<00:00, 1087.27 it/sec, obj=1.72]
INFO - 02:57:40:     15%|█▌        | 15/100 [00:00<00:00, 1083.67 it/sec, obj=1.68]
INFO - 02:57:40:     16%|█▌        | 16/100 [00:00<00:00, 1082.70 it/sec, obj=1.81]
INFO - 02:57:40:     17%|█▋        | 17/100 [00:00<00:00, 1081.48 it/sec, obj=1.45]
INFO - 02:57:40:     18%|█▊        | 18/100 [00:00<00:00, 1078.40 it/sec, obj=1.51]
INFO - 02:57:40:     19%|█▉        | 19/100 [00:00<00:00, 1078.01 it/sec, obj=1.47]
INFO - 02:57:40:     20%|██        | 20/100 [00:00<00:00, 1076.19 it/sec, obj=1.42]
INFO - 02:57:40:     21%|██        | 21/100 [00:00<00:00, 1076.86 it/sec, obj=1.42]
INFO - 02:57:40:     22%|██▏       | 22/100 [00:00<00:00, 1077.03 it/sec, obj=1.42]
INFO - 02:57:40:     23%|██▎       | 23/100 [00:00<00:00, 1074.47 it/sec, obj=1.41]
INFO - 02:57:40:     24%|██▍       | 24/100 [00:00<00:00, 1074.35 it/sec, obj=1.41]
INFO - 02:57:40:     25%|██▌       | 25/100 [00:00<00:00, 1073.57 it/sec, obj=1.41]
INFO - 02:57:40:     26%|██▌       | 26/100 [00:00<00:00, 1074.09 it/sec, obj=1.41]
INFO - 02:57:40:     27%|██▋       | 27/100 [00:00<00:00, 1072.86 it/sec, obj=1.41]
INFO - 02:57:40:     28%|██▊       | 28/100 [00:00<00:00, 1073.04 it/sec, obj=1.41]
INFO - 02:57:40:     29%|██▉       | 29/100 [00:00<00:00, 1073.49 it/sec, obj=1.41]
INFO - 02:57:40:     30%|███       | 30/100 [00:00<00:00, 1072.04 it/sec, obj=1.41]
INFO - 02:57:40:     31%|███       | 31/100 [00:00<00:00, 1072.41 it/sec, obj=1.41]
INFO - 02:57:40:     32%|███▏      | 32/100 [00:00<00:00, 1071.56 it/sec, obj=1.41]
INFO - 02:57:40:     33%|███▎      | 33/100 [00:00<00:00, 1070.35 it/sec, obj=1.41]
INFO - 02:57:40:     34%|███▍      | 34/100 [00:00<00:00, 1069.03 it/sec, obj=1.41]
INFO - 02:57:40:     35%|███▌      | 35/100 [00:00<00:00, 1068.91 it/sec, obj=1.41]
INFO - 02:57:40:     36%|███▌      | 36/100 [00:00<00:00, 1069.16 it/sec, obj=1.41]
INFO - 02:57:40:     37%|███▋      | 37/100 [00:00<00:00, 1068.86 it/sec, obj=1.41]
INFO - 02:57:40:     38%|███▊      | 38/100 [00:00<00:00, 1068.81 it/sec, obj=1.41]
INFO - 02:57:40:     39%|███▉      | 39/100 [00:00<00:00, 1069.02 it/sec, obj=1.41]
INFO - 02:57:40:     40%|████      | 40/100 [00:00<00:00, 1069.20 it/sec, obj=1.41]
INFO - 02:57:40:     41%|████      | 41/100 [00:00<00:00, 1069.01 it/sec, obj=1.41]
INFO - 02:57:40:     42%|████▏     | 42/100 [00:00<00:00, 1067.62 it/sec, obj=1.41]
INFO - 02:57:40:     43%|████▎     | 43/100 [00:00<00:00, 1067.32 it/sec, obj=1.41]
INFO - 02:57:40:     44%|████▍     | 44/100 [00:00<00:00, 1066.12 it/sec, obj=1.41]
INFO - 02:57:40:     45%|████▌     | 45/100 [00:00<00:00, 1066.23 it/sec, obj=1.41]
INFO - 02:57:40:     46%|████▌     | 46/100 [00:00<00:00, 1065.86 it/sec, obj=1.41]
INFO - 02:57:40:     47%|████▋     | 47/100 [00:00<00:00, 1066.10 it/sec, obj=1.41]
INFO - 02:57:40:     48%|████▊     | 48/100 [00:00<00:00, 1065.87 it/sec, obj=1.41]
INFO - 02:57:40:     49%|████▉     | 49/100 [00:00<00:00, 1066.00 it/sec, obj=1.41]
INFO - 02:57:40:     50%|█████     | 50/100 [00:00<00:00, 1065.28 it/sec, obj=1.41]
INFO - 02:57:40:     51%|█████     | 51/100 [00:00<00:00, 1064.18 it/sec, obj=1.41]
INFO - 02:57:40:     52%|█████▏    | 52/100 [00:00<00:00, 1063.56 it/sec, obj=1.41]
INFO - 02:57:40:     53%|█████▎    | 53/100 [00:00<00:00, 1063.73 it/sec, obj=1.41]
INFO - 02:57:40: Optimization result:
INFO - 02:57:40:    Optimizer info:
INFO - 02:57:40:       Status: None
INFO - 02:57:40:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:40:       Number of calls to the objective function by the optimizer: 54
INFO - 02:57:40:    Solution:
INFO - 02:57:40:       The solution is feasible.
INFO - 02:57:40:       Objective: 1.4142135623730954
INFO - 02:57:40:       Standardized constraints:
INFO - 02:57:40:          [g-2] = [-1. -1.]
INFO - 02:57:40:       Design space:
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40:          | Name | Lower bound |         Value         | Upper bound | Type  |
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40:          | x[0] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:40:          | x[1] |      0      | 1.110223024625157e-16 |      1      | float |
INFO - 02:57:40:          +------+-------------+-----------------------+-------------+-------+
INFO - 02:57:40: *** End MDOScenario execution (time: 0:00:00.052479) ***
INFO - 02:57:40:     44%|████▍     | 4/9 [00:00<00:00, 16.93 it/sec, obj=1.41]
INFO - 02:57:40: *** Start MDOScenario execution ***
INFO - 02:57:40: MDOScenario
INFO - 02:57:40:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:40:    MDO formulation: DisciplinaryOpt
INFO - 02:57:40: Optimization problem:
INFO - 02:57:40:    minimize f(x)
INFO - 02:57:40:    with respect to x
INFO - 02:57:40:    subject to constraints:
INFO - 02:57:40:       g(x) <= 2
INFO - 02:57:40:    over the design space:
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:40:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:40:      1%|          | 1/100 [00:00<00:00, 2280.75 it/sec, obj=2.71]
INFO - 02:57:40:      2%|▏         | 2/100 [00:00<00:00, 1582.76 it/sec, obj=2.9]
INFO - 02:57:40:      3%|▎         | 3/100 [00:00<00:00, 1602.31 it/sec, obj=2.9]
INFO - 02:57:40:      4%|▍         | 4/100 [00:00<00:00, 1570.61 it/sec, obj=2.56]
INFO - 02:57:40:      5%|▌         | 5/100 [00:00<00:00, 1551.49 it/sec, obj=2.5]
INFO - 02:57:40:      6%|▌         | 6/100 [00:00<00:00, 1545.05 it/sec, obj=2.25]
INFO - 02:57:40:      7%|▋         | 7/100 [00:00<00:00, 1441.13 it/sec, obj=2]
INFO - 02:57:40:      8%|▊         | 8/100 [00:00<00:00, 1325.48 it/sec, obj=2.2]
INFO - 02:57:40:      9%|▉         | 9/100 [00:00<00:00, 1262.46 it/sec, obj=2.08]
INFO - 02:57:40:     10%|█         | 10/100 [00:00<00:00, 1234.49 it/sec, obj=2.01]
INFO - 02:57:40:     11%|█         | 11/100 [00:00<00:00, 1254.18 it/sec, obj=2.01]
INFO - 02:57:40:     12%|█▏        | 12/100 [00:00<00:00, 1270.23 it/sec, obj=2.02]
INFO - 02:57:40:     13%|█▎        | 13/100 [00:00<00:00, 1283.14 it/sec, obj=2.01]
INFO - 02:57:40:     14%|█▍        | 14/100 [00:00<00:00, 1299.75 it/sec, obj=2]
INFO - 02:57:40:     15%|█▌        | 15/100 [00:00<00:00, 1277.32 it/sec, obj=2]
INFO - 02:57:40:     16%|█▌        | 16/100 [00:00<00:00, 1257.59 it/sec, obj=2]
INFO - 02:57:40:     17%|█▋        | 17/100 [00:00<00:00, 1266.98 it/sec, obj=2]
INFO - 02:57:40:     18%|█▊        | 18/100 [00:00<00:00, 1275.92 it/sec, obj=2]
INFO - 02:57:40:     19%|█▉        | 19/100 [00:00<00:00, 1286.70 it/sec, obj=2]
INFO - 02:57:40:     20%|██        | 20/100 [00:00<00:00, 1294.92 it/sec, obj=2]
INFO - 02:57:40:     21%|██        | 21/100 [00:00<00:00, 1303.21 it/sec, obj=2]
INFO - 02:57:40:     22%|██▏       | 22/100 [00:00<00:00, 1286.74 it/sec, obj=2]
INFO - 02:57:40:     23%|██▎       | 23/100 [00:00<00:00, 1274.53 it/sec, obj=2]
INFO - 02:57:40:     24%|██▍       | 24/100 [00:00<00:00, 1264.17 it/sec, obj=2]
INFO - 02:57:40:     25%|██▌       | 25/100 [00:00<00:00, 1255.88 it/sec, obj=2]
INFO - 02:57:40:     26%|██▌       | 26/100 [00:00<00:00, 1248.39 it/sec, obj=2]
INFO - 02:57:40:     27%|██▋       | 27/100 [00:00<00:00, 1241.10 it/sec, obj=2]
INFO - 02:57:40:     28%|██▊       | 28/100 [00:00<00:00, 1233.28 it/sec, obj=2]
INFO - 02:57:40:     29%|██▉       | 29/100 [00:00<00:00, 1227.59 it/sec, obj=2]
INFO - 02:57:40:     30%|███       | 30/100 [00:00<00:00, 1221.42 it/sec, obj=2]
INFO - 02:57:40:     31%|███       | 31/100 [00:00<00:00, 1215.80 it/sec, obj=2]
INFO - 02:57:40:     32%|███▏      | 32/100 [00:00<00:00, 1211.52 it/sec, obj=2]
INFO - 02:57:40:     33%|███▎      | 33/100 [00:00<00:00, 1194.22 it/sec, obj=2]
INFO - 02:57:40:     34%|███▍      | 34/100 [00:00<00:00, 1187.60 it/sec, obj=2]
INFO - 02:57:40:     35%|███▌      | 35/100 [00:00<00:00, 1183.15 it/sec, obj=2]
INFO - 02:57:40:     36%|███▌      | 36/100 [00:00<00:00, 1178.14 it/sec, obj=2]
INFO - 02:57:40:     37%|███▋      | 37/100 [00:00<00:00, 1174.81 it/sec, obj=2]
INFO - 02:57:40:     38%|███▊      | 38/100 [00:00<00:00, 1171.21 it/sec, obj=2]
INFO - 02:57:40:     39%|███▉      | 39/100 [00:00<00:00, 1168.72 it/sec, obj=2]
INFO - 02:57:40: Optimization result:
INFO - 02:57:40:    Optimizer info:
INFO - 02:57:40:       Status: None
INFO - 02:57:40:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:40:       Number of calls to the objective function by the optimizer: 40
INFO - 02:57:40:    Solution:
INFO - 02:57:40:       The solution is feasible.
INFO - 02:57:40:       Objective: 2.0
INFO - 02:57:40:       Standardized constraints:
INFO - 02:57:40:          [g-2] = [-2.  0.]
INFO - 02:57:40:       Design space:
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40:          | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40:          | x[0] |      0      |   0   |      1      | float |
INFO - 02:57:40:          | x[1] |      0      |   0   |      1      | float |
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40: *** End MDOScenario execution (time: 0:00:00.035850) ***
INFO - 02:57:40:     56%|█████▌    | 5/9 [00:00<00:00, 18.30 it/sec, obj=2]
INFO - 02:57:40: *** Start MDOScenario execution ***
INFO - 02:57:40: MDOScenario
INFO - 02:57:40:    Disciplines: f(x,y) g(x,y)
INFO - 02:57:40:    MDO formulation: DisciplinaryOpt
INFO - 02:57:40: Optimization problem:
INFO - 02:57:40:    minimize f(x)
INFO - 02:57:40:    with respect to x
INFO - 02:57:40:    subject to constraints:
INFO - 02:57:40:       g(x) <= 2
INFO - 02:57:40:    over the design space:
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40:       | x[0] |      0      |  None |      1      | float |
INFO - 02:57:40:       | x[1] |      0      |  None |      1      | float |
INFO - 02:57:40:       +------+-------------+-------+-------------+-------+
INFO - 02:57:40: Solving optimization problem with algorithm NLOPT_COBYLA:
INFO - 02:57:40:      1%|          | 1/100 [00:00<00:00, 2090.88 it/sec, obj=2.94]
INFO - 02:57:40:      2%|▏         | 2/100 [00:00<00:00, 1535.53 it/sec, obj=3.14]
INFO - 02:57:40:      3%|▎         | 3/100 [00:00<00:00, 1588.75 it/sec, obj=3.14]
INFO - 02:57:40:      4%|▍         | 4/100 [00:00<00:00, 1551.29 it/sec, obj=2.8]
INFO - 02:57:40:      5%|▌         | 5/100 [00:00<00:00, 1536.49 it/sec, obj=2.74]
INFO - 02:57:40:      6%|▌         | 6/100 [00:00<00:00, 1537.03 it/sec, obj=2.49]
INFO - 02:57:40:      7%|▋         | 7/100 [00:00<00:00, 1433.81 it/sec, obj=2.24]
INFO - 02:57:40:      8%|▊         | 8/100 [00:00<00:00, 1372.20 it/sec, obj=2.44]
INFO - 02:57:40:      9%|▉         | 9/100 [00:00<00:00, 1331.24 it/sec, obj=2.32]
INFO - 02:57:40:     10%|█         | 10/100 [00:00<00:00, 1296.38 it/sec, obj=2.25]
INFO - 02:57:40:     11%|█         | 11/100 [00:00<00:00, 1308.60 it/sec, obj=2.25]
INFO - 02:57:40:     12%|█▏        | 12/100 [00:00<00:00, 1320.31 it/sec, obj=2.25]
INFO - 02:57:40:     13%|█▎        | 13/100 [00:00<00:00, 1305.45 it/sec, obj=2.24]
INFO - 02:57:40:     14%|█▍        | 14/100 [00:00<00:00, 1309.64 it/sec, obj=2.24]
INFO - 02:57:40:     15%|█▌        | 15/100 [00:00<00:00, 1286.18 it/sec, obj=2.24]
INFO - 02:57:40:     16%|█▌        | 16/100 [00:00<00:00, 1267.74 it/sec, obj=2.24]
INFO - 02:57:40:     17%|█▋        | 17/100 [00:00<00:00, 1277.38 it/sec, obj=2.24]
INFO - 02:57:40:     18%|█▊        | 18/100 [00:00<00:00, 1286.25 it/sec, obj=2.24]
INFO - 02:57:40:     19%|█▉        | 19/100 [00:00<00:00, 1292.67 it/sec, obj=2.24]
INFO - 02:57:40:     20%|██        | 20/100 [00:00<00:00, 1300.76 it/sec, obj=2.24]
INFO - 02:57:40:     21%|██        | 21/100 [00:00<00:00, 1310.14 it/sec, obj=2.24]
INFO - 02:57:40:     22%|██▏       | 22/100 [00:00<00:00, 1292.92 it/sec, obj=2.24]
INFO - 02:57:40:     23%|██▎       | 23/100 [00:00<00:00, 1281.21 it/sec, obj=2.24]
INFO - 02:57:40:     24%|██▍       | 24/100 [00:00<00:00, 1268.25 it/sec, obj=2.24]
INFO - 02:57:40:     25%|██▌       | 25/100 [00:00<00:00, 1258.64 it/sec, obj=2.24]
INFO - 02:57:40:     26%|██▌       | 26/100 [00:00<00:00, 1246.15 it/sec, obj=2.24]
INFO - 02:57:40:     27%|██▋       | 27/100 [00:00<00:00, 1237.74 it/sec, obj=2.24]
INFO - 02:57:40:     28%|██▊       | 28/100 [00:00<00:00, 1230.48 it/sec, obj=2.24]
INFO - 02:57:40:     29%|██▉       | 29/100 [00:00<00:00, 1224.96 it/sec, obj=2.24]
INFO - 02:57:40:     30%|███       | 30/100 [00:00<00:00, 1218.01 it/sec, obj=2.24]
INFO - 02:57:40:     31%|███       | 31/100 [00:00<00:00, 1212.08 it/sec, obj=2.24]
INFO - 02:57:40:     32%|███▏      | 32/100 [00:00<00:00, 1207.65 it/sec, obj=2.24]
INFO - 02:57:40:     33%|███▎      | 33/100 [00:00<00:00, 1199.69 it/sec, obj=2.24]
INFO - 02:57:40:     34%|███▍      | 34/100 [00:00<00:00, 1194.71 it/sec, obj=2.24]
INFO - 02:57:40:     35%|███▌      | 35/100 [00:00<00:00, 1189.99 it/sec, obj=2.24]
INFO - 02:57:40:     36%|███▌      | 36/100 [00:00<00:00, 1184.42 it/sec, obj=2.24]
INFO - 02:57:40:     37%|███▋      | 37/100 [00:00<00:00, 1180.93 it/sec, obj=2.24]
INFO - 02:57:40:     38%|███▊      | 38/100 [00:00<00:00, 1176.92 it/sec, obj=2.24]
INFO - 02:57:40:     39%|███▉      | 39/100 [00:00<00:00, 1173.24 it/sec, obj=2.24]
INFO - 02:57:40: Optimization result:
INFO - 02:57:40:    Optimizer info:
INFO - 02:57:40:       Status: None
INFO - 02:57:40:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 02:57:40:       Number of calls to the objective function by the optimizer: 40
INFO - 02:57:40:    Solution:
INFO - 02:57:40:       The solution is feasible.
INFO - 02:57:40:       Objective: 2.23606797749979
INFO - 02:57:40:       Standardized constraints:
INFO - 02:57:40:          [g-2] = [-1.  0.]
INFO - 02:57:40:       Design space:
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40:          | Name | Lower bound | Value | Upper bound | Type  |
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40:          | x[0] |      0      |   0   |      1      | float |
INFO - 02:57:40:          | x[1] |      0      |   0   |      1      | float |
INFO - 02:57:40:          +------+-------------+-------+-------------+-------+
INFO - 02:57:40: *** End MDOScenario execution (time: 0:00:00.035611) ***
INFO - 02:57:40:     67%|██████▋   | 6/9 [00:00<00:00, 19.36 it/sec, obj=2.24]
INFO - 02:57:40: Optimization result:
INFO - 02:57:40:    Optimizer info:
INFO - 02:57:40:       Status: None
INFO - 02:57:40:       Message: None
INFO - 02:57:40:       Number of calls to the objective function by the optimizer: 9
INFO - 02:57:40:    Solution:
INFO - 02:57:40:       The solution is feasible.
INFO - 02:57:40:       Objective: 2.3125318484214635e-15
INFO - 02:57:40:       Standardized constraints:
INFO - 02:57:40:          [g-2] = [-2. -2.]
INFO - 02:57:40:       Design space:
INFO - 02:57:40:          +------+-------------+-------+-------------+---------+
INFO - 02:57:40:          | Name | Lower bound | Value | Upper bound | Type    |
INFO - 02:57:40:          +------+-------------+-------+-------------+---------+
INFO - 02:57:40:          | y[0] |      0      |   0   |      1      | integer |
INFO - 02:57:40:          | y[1] |      0      |   0   |      2      | integer |
INFO - 02:57:40:          +------+-------------+-------+-------------+---------+
INFO - 02:57:40: *** End DOEScenario execution (time: 0:00:00.312736) ***

Tip

In a 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 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.

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 \(f(x,y)\) while respecting the constraint :math;`g(x,y)`. The full problem optimal result will contain the values for \(x\), \(y\), \(f\), and \(g\).

outer_scenario.post_process(OptHistoryView_Settings(save=False, show=True))
  • Evolution of the optimization variables
  • Evolution of the objective value
  • Evolution of the distance to the optimum
  • Evolution of the inequality constraints
<gemseo.post.opt_history_view.OptHistoryView object at 0x7d5983b86c90>

Total running time of the script: (0 minutes 0.932 seconds)

Gallery generated by Sphinx-Gallery