.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/optimizers/plot_multistart_example.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_optimizers_plot_multistart_example.py: Multi-start optimization ======================== The optimization algorithm ``multistart`` generates starting points using a DOE algorithm and run a sub-optimization algorithm from each starting point. .. GENERATED FROM PYTHON SOURCE LINES 29-40 .. code-block:: Python 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, ) .. GENERATED FROM PYTHON SOURCE LINES 41-43 First, we create the disciplines .. GENERATED FROM PYTHON SOURCE LINES 43-48 .. code-block:: Python objective = create_discipline("AnalyticDiscipline", expressions={"obj": "x**3-x+1"}) constraint = create_discipline( "AnalyticDiscipline", expressions={"cstr": "x**2+obj**2-1.5"} ) .. GENERATED FROM PYTHON SOURCE LINES 49-50 and the design space .. GENERATED FROM PYTHON SOURCE LINES 50-53 .. code-block:: Python design_space = create_design_space() design_space.add_variable("x", lower_bound=-1.5, upper_bound=1.5, value=1.5) .. GENERATED FROM PYTHON SOURCE LINES 54-56 Then, we define the MDO scenario .. GENERATED FROM PYTHON SOURCE LINES 56-62 .. code-block:: Python scenario = create_scenario( [objective, constraint], "obj", design_space, formulation_name="DisciplinaryOpt", ) .. GENERATED FROM PYTHON SOURCE LINES 63-65 Note that the formulation settings passed to :func:`.create_scenario` can be provided via a Pydantic model. For more information, see :ref:`formulation_settings`. .. GENERATED FROM PYTHON SOURCE LINES 65-68 .. code-block:: Python scenario.add_constraint("cstr", constraint_type="ineq") .. GENERATED FROM PYTHON SOURCE LINES 69-72 and execute it with the ``MultiStart`` optimization algorithm combining the local optimization algorithm SLSQP and the full-factorial DOE algorithm: .. GENERATED FROM PYTHON SOURCE LINES 72-82 .. code-block:: Python 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) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:25:02: *** Start MDOScenario execution *** INFO - 16:25:02: MDOScenario INFO - 16:25:02: Disciplines: AnalyticDiscipline AnalyticDiscipline INFO - 16:25:02: MDO formulation: DisciplinaryOpt INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 1.5 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm MultiStart: INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.5 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 610.44 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 913.89 it/sec, feas=False, obj=-0.267] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1133.09 it/sec, feas=False, obj=-0.809] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1259.36 it/sec, feas=False, obj=-0.868] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1236.16 it/sec, feas=False, obj=-0.872] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1220.69 it/sec, feas=False, obj=-0.265] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1214.23 it/sec, feas=False, obj=0.136] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1268.50 it/sec, feas=False, obj=0.579] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1259.47 it/sec, feas=False, obj=0.289] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1304.40 it/sec, feas=False, obj=1.25] WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: WARNING - 16:25:02: The solution is not feasible. INFO - 16:25:02: Objective: 0.2888129873625884 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = 0.1513713660745195 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.252181466244097 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.166666666666667 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 862.49 it/sec, feas=False, obj=0.579] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 989.11 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1204.22 it/sec, feas=False, obj=-0.267] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1323.86 it/sec, feas=False, obj=-0.809] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1421.99 it/sec, feas=False, obj=-0.868] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1380.01 it/sec, feas=False, obj=-0.874] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1344.82 it/sec, feas=False, obj=-0.266] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1321.30 it/sec, feas=False, obj=0.135] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1371.53 it/sec, feas=False, obj=0.577] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1353.79 it/sec, feas=False, obj=0.288] WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: WARNING - 16:25:02: The solution is not feasible. INFO - 16:25:02: Objective: 0.28811314244670916 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = 0.15144075010172386 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.252370379421043 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -0.8333333333333334 | 1.5 | float | INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 864.09 it/sec, feas=False, obj=1.25] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1192.24 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1199.63 it/sec, feas=False, obj=1.01] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1319.07 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1286.99 it/sec, feas=False, obj=0.819] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1354.97 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1330.32 it/sec, feas=False, obj=0.693] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1385.52 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1361.35 it/sec, feas=False, obj=0.584] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1403.48 it/sec, feas=False, obj=-0.875] WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: WARNING - 16:25:02: The solution is not feasible. INFO - 16:25:02: Objective: 0.5837798748832244 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = 0.19806414473664136 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.165017254128868 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -0.5 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 870.73 it/sec, feas=False, obj=1.38] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1218.21 it/sec, feas=False, obj=2.88] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1217.86 it/sec, feas=False, obj=1.23] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1328.68 it/sec, feas=False, obj=2.87] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1282.19 it/sec, feas=True, obj=0.848] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1208.21 it/sec, feas=True, obj=0.658] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1167.54 it/sec, feas=True, obj=0.643] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1138.48 it/sec, feas=True, obj=0.616] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1116.40 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1102.84 it/sec, feas=True, obj=0.615] INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: INFO - 16:25:02: The solution is feasible. INFO - 16:25:02: Objective: 0.6150998219543254 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = -0.788285881879476 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.5773788419679762 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -0.1666666666666667 | 1.5 | float | INFO - 16:25:02: +------+-------------+---------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 878.94 it/sec, feas=True, obj=1.16] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1220.69 it/sec, feas=False, obj=2.87] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1174.66 it/sec, feas=True, obj=0.785] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1223.01 it/sec, feas=False, obj=2.88] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1157.24 it/sec, feas=True, obj=0.644] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1125.13 it/sec, feas=True, obj=0.624] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1100.17 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1081.56 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1070.76 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1060.99 it/sec, feas=True, obj=0.615] INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: INFO - 16:25:02: The solution is feasible. INFO - 16:25:02: Objective: 0.6150998205402495 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = -0.7883188793606977 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.5773502675245377 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.1666666666666667 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 867.67 it/sec, feas=True, obj=0.838] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1192.92 it/sec, feas=False, obj=2.88] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1206.99 it/sec, feas=True, obj=0.656] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1130.08 it/sec, feas=True, obj=0.639] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1088.36 it/sec, feas=True, obj=0.616] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1068.48 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1058.06 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1050.12 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1041.66 it/sec, feas=True, obj=0.615] INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 16:25:02: Solution: INFO - 16:25:02: The solution is feasible. INFO - 16:25:02: Objective: 0.6150998205402495 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = -0.7883188774386114 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.5773502691891133 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.5 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 870.73 it/sec, feas=True, obj=0.625] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1199.57 it/sec, feas=False, obj=2.87] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1212.93 it/sec, feas=True, obj=0.616] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1141.07 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1096.89 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1071.75 it/sec, feas=True, obj=0.615] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1059.32 it/sec, feas=True, obj=0.615] INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO stopped the driver. INFO - 16:25:02: Solution: INFO - 16:25:02: The solution is feasible. INFO - 16:25:02: Objective: 0.6150998205402495 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = -0.78831887743932 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.5773502691884995 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.8333333333333335 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 861.78 it/sec, feas=True, obj=0.745] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 998.29 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1216.09 it/sec, feas=False, obj=-0.267] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1260.69 it/sec, feas=False, obj=-0.809] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1357.12 it/sec, feas=False, obj=-0.868] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1321.04 it/sec, feas=False, obj=-0.874] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1303.27 it/sec, feas=False, obj=-0.266] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1288.52 it/sec, feas=False, obj=0.135] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1336.66 it/sec, feas=False, obj=0.577] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1325.13 it/sec, feas=False, obj=0.288] INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: INFO - 16:25:02: The solution is feasible. INFO - 16:25:02: Objective: 0.7453703703703706 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = -0.2499785665294918 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 0.8333333333333335 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 1.166666666666667 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 10%|█ | 1/10 [00:00<00:00, 862.85 it/sec, feas=False, obj=1.42] INFO - 16:25:02: 20%|██ | 2/10 [00:00<00:00, 1012.87 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 30%|███ | 3/10 [00:00<00:00, 1218.33 it/sec, feas=False, obj=-0.267] INFO - 16:25:02: 40%|████ | 4/10 [00:00<00:00, 1347.35 it/sec, feas=False, obj=-0.809] INFO - 16:25:02: 50%|█████ | 5/10 [00:00<00:00, 1436.01 it/sec, feas=False, obj=-0.868] INFO - 16:25:02: 60%|██████ | 6/10 [00:00<00:00, 1386.78 it/sec, feas=False, obj=-0.874] INFO - 16:25:02: 70%|███████ | 7/10 [00:00<00:00, 1357.25 it/sec, feas=False, obj=-0.266] INFO - 16:25:02: 80%|████████ | 8/10 [00:00<00:00, 1343.47 it/sec, feas=False, obj=0.135] INFO - 16:25:02: 90%|█████████ | 9/10 [00:00<00:00, 1388.03 it/sec, feas=False, obj=0.577] INFO - 16:25:02: 100%|██████████| 10/10 [00:00<00:00, 1365.07 it/sec, feas=False, obj=0.288] WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: WARNING - 16:25:02: The solution is not feasible. INFO - 16:25:02: Objective: 0.28811314244698893 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = 0.1514407501016959 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.252370379420967 | 1.5 | float | INFO - 16:25:02: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:02: Optimization problem: INFO - 16:25:02: minimize obj(x) INFO - 16:25:02: with respect to x INFO - 16:25:02: under the inequality constraints INFO - 16:25:02: cstr(x) <= 0 INFO - 16:25:02: over the design space: INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | 1.5 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------+-------------+-------+ INFO - 16:25:02: Solving optimization problem with algorithm SLSQP: INFO - 16:25:02: 11%|█ | 1/9 [00:00<00:00, 858.43 it/sec, feas=False, obj=2.88] INFO - 16:25:02: 22%|██▏ | 2/9 [00:00<00:00, 994.62 it/sec, feas=False, obj=-0.875] INFO - 16:25:02: 33%|███▎ | 3/9 [00:00<00:00, 1211.64 it/sec, feas=False, obj=-0.267] INFO - 16:25:02: 44%|████▍ | 4/9 [00:00<00:00, 1332.90 it/sec, feas=False, obj=-0.809] INFO - 16:25:02: 56%|█████▌ | 5/9 [00:00<00:00, 1431.50 it/sec, feas=False, obj=-0.868] INFO - 16:25:02: 67%|██████▋ | 6/9 [00:00<00:00, 1389.15 it/sec, feas=False, obj=-0.874] INFO - 16:25:02: 78%|███████▊ | 7/9 [00:00<00:00, 1353.25 it/sec, feas=False, obj=-0.266] INFO - 16:25:02: 89%|████████▉ | 8/9 [00:00<00:00, 1329.31 it/sec, feas=False, obj=0.135] INFO - 16:25:02: 100%|██████████| 9/9 [00:00<00:00, 1378.55 it/sec, feas=False, obj=0.577] WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:02: Optimization result: INFO - 16:25:02: Optimizer info: INFO - 16:25:02: Status: None INFO - 16:25:02: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:25:02: Solution: WARNING - 16:25:02: The solution is not feasible. INFO - 16:25:02: Objective: 0.13490034433852438 INFO - 16:25:02: Standardized constraints: INFO - 16:25:02: cstr = 0.1877267982258064 INFO - 16:25:02: Design space: INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ INFO - 16:25:02: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ INFO - 16:25:02: | x | -1.5 | -1.29210243221006 | 1.5 | float | INFO - 16:25:02: +------+-------------+-------------------+-------------+-------+ WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. WARNING - 16:25:02: Optimization found no feasible point; the least infeasible point is selected. WARNING - 16:25:03: Optimization found no feasible point; the least infeasible point is selected. WARNING - 16:25:03: Optimization found no feasible point; the least infeasible point is selected. INFO - 16:25:03: Exporting the optimization problem to the file multistart.hdf5 INFO - 16:25:03: 1%| | 1/100 [00:00<00:11, 8.50 it/sec, feas=False, obj=0.577] INFO - 16:25:03: Optimization result: INFO - 16:25:03: Optimizer info: INFO - 16:25:03: Status: None INFO - 16:25:03: Message: None INFO - 16:25:03: Solution: INFO - 16:25:03: The solution is feasible. INFO - 16:25:03: Objective: 0.6150998205402495 INFO - 16:25:03: Standardized constraints: INFO - 16:25:03: cstr = -0.7883188793606977 INFO - 16:25:03: Design space: INFO - 16:25:03: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:03: | Name | Lower bound | Value | Upper bound | Type | INFO - 16:25:03: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:03: | x | -1.5 | 0.5773502675245377 | 1.5 | float | INFO - 16:25:03: +------+-------------+--------------------+-------------+-------+ INFO - 16:25:03: *** End MDOScenario execution *** .. GENERATED FROM PYTHON SOURCE LINES 83-86 Lastly, we can plot the history of the objective, either by concatenating the 10 sub-optimization histories: .. GENERATED FROM PYTHON SOURCE LINES 86-90 .. code-block:: Python execute_post( scenario, post_name="BasicHistory", variable_names=["obj"], save=False, show=True ) .. image-sg:: /examples/optimizers/images/sphx_glr_plot_multistart_example_001.png :alt: History plot :srcset: /examples/optimizers/images/sphx_glr_plot_multistart_example_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 91-92 or by filtering the local optima (one per starting point): .. GENERATED FROM PYTHON SOURCE LINES 92-99 .. code-block:: Python execute_post( "multistart.hdf5", post_name="BasicHistory", variable_names=["obj"], save=False, show=True, ) .. image-sg:: /examples/optimizers/images/sphx_glr_plot_multistart_example_002.png :alt: History plot :srcset: /examples/optimizers/images/sphx_glr_plot_multistart_example_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:25:03: Importing the optimization problem from the file multistart.hdf5 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.352 seconds) .. _sphx_glr_download_examples_optimizers_plot_multistart_example.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_multistart_example.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_multistart_example.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_multistart_example.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_