Multistart optimization

Runs simple optimization problem with multiple starting points Nests a MDOScenario in a DOEScenario using a MDOScenarioAdapter.

from __future__ import annotations

from gemseo.api import configure_logger
from gemseo.api import create_design_space
from gemseo.api import create_discipline
from gemseo.api import create_scenario
from gemseo.disciplines.scenario_adapter import MDOScenarioAdapter
from matplotlib import pyplot as plt

configure_logger()
<RootLogger root (INFO)>

Create the disciplines

objective = create_discipline("AnalyticDiscipline", expressions={"obj": "x**3-x+1"})
constraint = create_discipline(
    "AnalyticDiscipline", expressions={"cstr": "x**2+obj**2-1.5"}
)

Create the design space

design_space = create_design_space()
design_space.add_variable("x", 1, l_b=-1.5, u_b=1.5, value=1.5)

Create the MDO scenario

scenario = create_scenario(
    [objective, constraint],
    formulation="DisciplinaryOpt",
    objective_name="obj",
    design_space=design_space,
)
scenario.default_inputs = {"algo": "SLSQP", "max_iter": 10}
scenario.add_constraint("cstr", "ineq")

Create the scenario adapter

dv_names = scenario.formulation.opt_problem.design_space.variables_names
adapter = MDOScenarioAdapter(
    scenario, dv_names, ["obj", "cstr"], set_x0_before_opt=True
)

Create the DOE scenario

scenario_doe = create_scenario(
    adapter,
    formulation="DisciplinaryOpt",
    objective_name="obj",
    design_space=design_space,
    scenario_type="DOE",
)
scenario_doe.add_constraint("cstr", "ineq")
run_inputs = {"n_samples": 10, "algo": "fullfact"}
scenario_doe.execute(run_inputs)
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start DOEScenario execution ***
    INFO - 14:47:01: DOEScenario
    INFO - 14:47:01:    Disciplines: MDOScenario_adapter
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound | value | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    |  1.5  |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm fullfact:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound | value | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    |  -1.5 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
 WARNING - 14:47:01: Optimization found no feasible point !  The least infeasible point is selected.
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 393.10 it/sec, obj=1.25]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
 WARNING - 14:47:01:       The solution is not feasible.
    INFO - 14:47:01:       Objective: 0.2888129873625884
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = 0.1513713660745195
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -1.252181466244097 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.035677) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | -1.166666666666667 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
 WARNING - 14:47:01: Optimization found no feasible point !  The least infeasible point is selected.
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 507.91 it/sec, obj=0.288]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
 WARNING - 14:47:01:       The solution is not feasible.
    INFO - 14:47:01:       Objective: 0.28811314244670916
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = 0.15144075010172386
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -1.252370379421043 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.023009) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |        value        | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | -0.8333333333333334 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
 WARNING - 14:47:01: Optimization found no feasible point !  The least infeasible point is selected.
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 537.62 it/sec, obj=-.875]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
 WARNING - 14:47:01:       The solution is not feasible.
    INFO - 14:47:01:       Objective: 0.5837798748832244
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = 0.19806414473664136
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -1.165017254128868 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.021892) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound | value | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    |  -0.5 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 434.75 it/sec, obj=0.615]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 13
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.6150998219543254
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.788285881879476
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | 0.5773788419679762 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.026279) ***
    INFO - 14:47:01: ...  40%|████      | 4/10 [00:00<00:00, 86.02 it/sec, obj=0.615]
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |        value        | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | -0.1666666666666667 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 416.77 it/sec, obj=0.615]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.6150998205402495
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.7883188793606977
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | 0.5773502675245377 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.027362) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | 0.1666666666666667 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: ...  90%|█████████ | 9/10 [00:00<00:00, 481.89 it/sec, obj=0.615]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 10
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.6150998205402508
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.7883189092934597
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | 0.5773502416020033 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.024176) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound | value | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    |  0.5  |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: ...  70%|███████   | 7/10 [00:00<00:00, 639.81 it/sec, obj=0.615]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 8
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.6150998205402526
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.7883188285028959
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | 0.5773503115686811 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.019009) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | 0.8333333333333335 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 506.15 it/sec, obj=0.288]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.7453703703703706
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.2499785665294918
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | 0.8333333333333335 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.023109) ***
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------------------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound |       value       | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------------------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    | 1.166666666666667 |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------------------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
 WARNING - 14:47:01: Optimization found no feasible point !  The least infeasible point is selected.
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 510.20 it/sec, obj=0.288]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
 WARNING - 14:47:01:       The solution is not feasible.
    INFO - 14:47:01:       Objective: 0.28811314244698893
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = 0.1514407501016959
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -1.252370379420967 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.022963) ***
    INFO - 14:47:01: ...  90%|█████████ | 9/10 [00:00<00:00, 41.69 it/sec, obj=0.288]
    INFO - 14:47:01:
    INFO - 14:47:01: *** Start MDOScenario execution ***
    INFO - 14:47:01: MDOScenario
    INFO - 14:47:01:    Disciplines: AnalyticDiscipline AnalyticDiscipline
    INFO - 14:47:01:    MDO formulation: DisciplinaryOpt
    INFO - 14:47:01: Optimization problem:
    INFO - 14:47:01:    minimize obj(x)
    INFO - 14:47:01:    with respect to x
    INFO - 14:47:01:    subject to constraints:
    INFO - 14:47:01:       cstr(x) <= 0.0
    INFO - 14:47:01:    over the design space:
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | name | lower_bound | value | upper_bound | type  |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01:    | x    |     -1.5    |  1.5  |     1.5     | float |
    INFO - 14:47:01:    +------+-------------+-------+-------------+-------+
    INFO - 14:47:01: Solving optimization problem with algorithm SLSQP:
    INFO - 14:47:01: ...   0%|          | 0/10 [00:00<?, ?it]
    INFO - 14:47:01:
 WARNING - 14:47:01: Optimization found no feasible point !  The least infeasible point is selected.
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 511.44 it/sec, obj=0.288]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 12
    INFO - 14:47:01:    Solution:
 WARNING - 14:47:01:       The solution is not feasible.
    INFO - 14:47:01:       Objective: 0.28811314244587316
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = 0.15144075010180735
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |       value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -1.252370379421268 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+--------------------+-------------+-------+
    INFO - 14:47:01: *** End MDOScenario execution (time: 0:00:00.023312) ***
    INFO - 14:47:01: ... 100%|██████████| 10/10 [00:00<00:00, 37.78 it/sec, obj=0.288]
    INFO - 14:47:01: Optimization result:
    INFO - 14:47:01:    Optimizer info:
    INFO - 14:47:01:       Status: None
    INFO - 14:47:01:       Message: None
    INFO - 14:47:01:       Number of calls to the objective function by the optimizer: 10
    INFO - 14:47:01:    Solution:
    INFO - 14:47:01:       The solution is feasible.
    INFO - 14:47:01:       Objective: 0.6150998205402495
    INFO - 14:47:01:       Standardized constraints:
    INFO - 14:47:01:          cstr = -0.7883188793606977
    INFO - 14:47:01:       Design space:
    INFO - 14:47:01:       +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:       | name | lower_bound |        value        | upper_bound | type  |
    INFO - 14:47:01:       +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01:       | x    |     -1.5    | -0.1666666666666667 |     1.5     | float |
    INFO - 14:47:01:       +------+-------------+---------------------+-------------+-------+
    INFO - 14:47:01: *** End DOEScenario execution (time: 0:00:00.273672) ***

{'eval_jac': False, 'algo': 'fullfact', 'n_samples': 10}

Plot the optimum objective for different x0

scenario_doe.post_process(
    "BasicHistory", variable_names=["obj"], save=False, show=False
)
# Workaround for HTML rendering, instead of ``show=True``
plt.show()
History plot

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

Gallery generated by Sphinx-Gallery