Note
Go to the end to download the full example code.
Multi-start optimization#
The optimization algorithm multistart
generates starting points using a DOE algorithm
and run a sub-optimization algorithm from each starting point.
from __future__ import annotations
from gemseo import create_design_space
from gemseo import create_discipline
from gemseo import create_scenario
from gemseo import execute_post
from gemseo.algos.opt.multi_start.settings.multi_start_settings import (
MultiStart_Settings,
)
First, we 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"}
)
and the design space
design_space = create_design_space()
design_space.add_variable("x", lower_bound=-1.5, upper_bound=1.5, value=1.5)
Then, we define the MDO scenario
scenario = create_scenario(
[objective, constraint],
"obj",
design_space,
formulation_name="DisciplinaryOpt",
)
Note that the formulation settings passed to create_scenario() can be provided
via a Pydantic model. For more information, see Formulation Settings.
scenario.add_constraint("cstr", constraint_type="ineq")
and execute it with the MultiStart optimization algorithm
combining the local optimization algorithm SLSQP
and the full-factorial DOE algorithm:
multistart_settings = MultiStart_Settings(
max_iter=100,
opt_algo_name="SLSQP",
doe_algo_name="PYDOE_FULLFACT",
n_start=10,
# Set multistart_file_path to save the history of the local optima.
multistart_file_path="multistart.hdf5",
)
scenario.execute(multistart_settings)
INFO - 16:14:51: *** Start MDOScenario execution ***
INFO - 16:14:51: MDOScenario
INFO - 16:14:51: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 16:14:51: MDO formulation: DisciplinaryOpt
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 1.5 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm MultiStart:
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.5 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 621.19 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 937.80 it/sec, feas=False, obj=-0.267]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1148.18 it/sec, feas=False, obj=-0.809]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1285.02 it/sec, feas=False, obj=-0.868]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1241.95 it/sec, feas=False, obj=-0.872]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1230.54 it/sec, feas=False, obj=-0.265]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1224.87 it/sec, feas=False, obj=0.136]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1285.66 it/sec, feas=False, obj=0.579]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1258.63 it/sec, feas=False, obj=0.289]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1301.08 it/sec, feas=False, obj=1.25]
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
WARNING - 16:14:51: The solution is not feasible.
INFO - 16:14:51: Objective: 0.2888129873625884
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = 0.1513713660745195
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.252181466244097 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.166666666666667 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 840.71 it/sec, feas=False, obj=0.579]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 985.27 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1207.34 it/sec, feas=False, obj=-0.267]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1333.75 it/sec, feas=False, obj=-0.809]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1435.13 it/sec, feas=False, obj=-0.868]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1392.07 it/sec, feas=False, obj=-0.874]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1360.40 it/sec, feas=False, obj=-0.266]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1339.23 it/sec, feas=False, obj=0.135]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1390.74 it/sec, feas=False, obj=0.577]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1375.72 it/sec, feas=False, obj=0.288]
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
WARNING - 16:14:51: The solution is not feasible.
INFO - 16:14:51: Objective: 0.28811314244670916
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = 0.15144075010172386
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.252370379421043 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -0.8333333333333334 | 1.5 | float |
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 774.14 it/sec, feas=False, obj=1.25]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1126.44 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1146.82 it/sec, feas=False, obj=1.01]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1269.08 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1265.10 it/sec, feas=False, obj=0.819]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1340.25 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1321.04 it/sec, feas=False, obj=0.693]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1379.19 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1356.75 it/sec, feas=False, obj=0.584]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1398.19 it/sec, feas=False, obj=-0.875]
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
WARNING - 16:14:51: The solution is not feasible.
INFO - 16:14:51: Objective: 0.5837798748832244
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = 0.19806414473664136
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.165017254128868 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -0.5 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 886.93 it/sec, feas=False, obj=1.38]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1230.72 it/sec, feas=False, obj=2.88]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1232.17 it/sec, feas=False, obj=1.23]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1344.11 it/sec, feas=False, obj=2.87]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1282.82 it/sec, feas=True, obj=0.848]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1213.92 it/sec, feas=True, obj=0.658]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1176.29 it/sec, feas=True, obj=0.643]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1153.95 it/sec, feas=True, obj=0.616]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1135.85 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1123.06 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.6150998219543254
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.788285881879476
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5773788419679762 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -0.1666666666666667 | 1.5 | float |
INFO - 16:14:51: +------+-------------+---------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 895.45 it/sec, feas=True, obj=1.16]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1245.52 it/sec, feas=False, obj=2.87]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1229.52 it/sec, feas=True, obj=0.785]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1265.63 it/sec, feas=False, obj=2.88]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1192.78 it/sec, feas=True, obj=0.644]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1155.83 it/sec, feas=True, obj=0.624]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1128.37 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1111.18 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1100.90 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1089.71 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.6150998205402495
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.7883188793606977
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5773502675245377 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.1666666666666667 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 894.50 it/sec, feas=True, obj=0.838]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1231.45 it/sec, feas=False, obj=2.88]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1255.78 it/sec, feas=True, obj=0.656]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1169.80 it/sec, feas=True, obj=0.639]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1116.75 it/sec, feas=True, obj=0.616]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1094.98 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1082.56 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1070.15 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1064.72 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.6150998205402495
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.7883188774386114
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5773502691891133 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 872.18 it/sec, feas=True, obj=0.625]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1222.65 it/sec, feas=False, obj=2.87]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1239.45 it/sec, feas=True, obj=0.616]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1160.97 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1114.62 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1092.93 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1080.53 it/sec, feas=True, obj=0.615]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.6150998205402495
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.78831887743932
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5773502691884995 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.8333333333333335 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 882.08 it/sec, feas=True, obj=0.745]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1017.17 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1224.73 it/sec, feas=False, obj=-0.267]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1279.82 it/sec, feas=False, obj=-0.809]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1370.24 it/sec, feas=False, obj=-0.868]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1333.50 it/sec, feas=False, obj=-0.874]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1316.54 it/sec, feas=False, obj=-0.266]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1279.24 it/sec, feas=False, obj=0.135]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1326.01 it/sec, feas=False, obj=0.577]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1314.21 it/sec, feas=False, obj=0.288]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.7453703703703706
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.2499785665294918
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.8333333333333335 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 1.166666666666667 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 10%|█ | 1/10 [00:00<00:00, 881.16 it/sec, feas=False, obj=1.42]
INFO - 16:14:51: 20%|██ | 2/10 [00:00<00:00, 1017.17 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 30%|███ | 3/10 [00:00<00:00, 1234.95 it/sec, feas=False, obj=-0.267]
INFO - 16:14:51: 40%|████ | 4/10 [00:00<00:00, 1357.49 it/sec, feas=False, obj=-0.809]
INFO - 16:14:51: 50%|█████ | 5/10 [00:00<00:00, 1454.84 it/sec, feas=False, obj=-0.868]
INFO - 16:14:51: 60%|██████ | 6/10 [00:00<00:00, 1405.36 it/sec, feas=False, obj=-0.874]
INFO - 16:14:51: 70%|███████ | 7/10 [00:00<00:00, 1370.88 it/sec, feas=False, obj=-0.266]
INFO - 16:14:51: 80%|████████ | 8/10 [00:00<00:00, 1344.92 it/sec, feas=False, obj=0.135]
INFO - 16:14:51: 90%|█████████ | 9/10 [00:00<00:00, 1394.33 it/sec, feas=False, obj=0.577]
INFO - 16:14:51: 100%|██████████| 10/10 [00:00<00:00, 1368.05 it/sec, feas=False, obj=0.288]
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
WARNING - 16:14:51: The solution is not feasible.
INFO - 16:14:51: Objective: 0.28811314244698893
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = 0.1514407501016959
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.252370379420967 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: Optimization problem:
INFO - 16:14:51: minimize obj(x)
INFO - 16:14:51: with respect to x
INFO - 16:14:51: under the inequality constraints
INFO - 16:14:51: cstr(x) <= 0
INFO - 16:14:51: over the design space:
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 1.5 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------+-------------+-------+
INFO - 16:14:51: Solving optimization problem with algorithm SLSQP:
INFO - 16:14:51: 11%|█ | 1/9 [00:00<00:00, 756.28 it/sec, feas=False, obj=2.88]
INFO - 16:14:51: 22%|██▏ | 2/9 [00:00<00:00, 936.96 it/sec, feas=False, obj=-0.875]
INFO - 16:14:51: 33%|███▎ | 3/9 [00:00<00:00, 1146.82 it/sec, feas=False, obj=-0.267]
INFO - 16:14:51: 44%|████▍ | 4/9 [00:00<00:00, 1285.22 it/sec, feas=False, obj=-0.809]
INFO - 16:14:51: 56%|█████▌ | 5/9 [00:00<00:00, 1380.16 it/sec, feas=False, obj=-0.868]
INFO - 16:14:51: 67%|██████▋ | 6/9 [00:00<00:00, 1347.50 it/sec, feas=False, obj=-0.874]
INFO - 16:14:51: 78%|███████▊ | 7/9 [00:00<00:00, 1324.56 it/sec, feas=False, obj=-0.266]
INFO - 16:14:51: 89%|████████▉ | 8/9 [00:00<00:00, 1314.31 it/sec, feas=False, obj=0.135]
INFO - 16:14:51: 100%|██████████| 9/9 [00:00<00:00, 1362.97 it/sec, feas=False, obj=0.577]
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: Maximum number of iterations reached. GEMSEO stopped the driver.
INFO - 16:14:51: Solution:
WARNING - 16:14:51: The solution is not feasible.
INFO - 16:14:51: Objective: 0.13490034433852438
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = 0.1877267982258064
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | -1.29210243221006 | 1.5 | float |
INFO - 16:14:51: +------+-------------+-------------------+-------------+-------+
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
WARNING - 16:14:51: Optimization found no feasible point; the least infeasible point is selected.
INFO - 16:14:51: Exporting the optimization problem to the file multistart.hdf5
INFO - 16:14:51: 1%| | 1/100 [00:00<00:11, 8.57 it/sec, feas=False, obj=0.577]
INFO - 16:14:51: Optimization result:
INFO - 16:14:51: Optimizer info:
INFO - 16:14:51: Status: None
INFO - 16:14:51: Message: None
INFO - 16:14:51: Solution:
INFO - 16:14:51: The solution is feasible.
INFO - 16:14:51: Objective: 0.6150998205402495
INFO - 16:14:51: Standardized constraints:
INFO - 16:14:51: cstr = -0.7883188793606977
INFO - 16:14:51: Design space:
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | Name | Lower bound | Value | Upper bound | Type |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: | x | -1.5 | 0.5773502675245377 | 1.5 | float |
INFO - 16:14:51: +------+-------------+--------------------+-------------+-------+
INFO - 16:14:51: *** End MDOScenario execution ***
Lastly, we can plot the history of the objective, either by concatenating the 10 sub-optimization histories:
execute_post(
scenario, post_name="BasicHistory", variable_names=["obj"], save=False, show=True
)

<gemseo.post.basic_history.BasicHistory object at 0x7c4bb2853ce0>
or by filtering the local optima (one per starting point):
execute_post(
"multistart.hdf5",
post_name="BasicHistory",
variable_names=["obj"],
save=False,
show=True,
)

INFO - 16:14:51: Importing the optimization problem from the file multistart.hdf5
<gemseo.post.basic_history.BasicHistory object at 0x7c4bb2852cc0>
Total running time of the script: (0 minutes 0.346 seconds)