Note
Click here to download the full example code
Multistart optimization¶
Runs simple optimization problem with multiple starting points
Nests a MDOScenario
in a DOEScenario
using a MDOScenarioAdapter
.
from __future__ import division, unicode_literals
from matplotlib import pyplot as plt
from gemseo.api import (
configure_logger,
create_design_space,
create_discipline,
create_scenario,
)
from gemseo.core.mdo_scenario import MDOScenarioAdapter
configure_logger()
Out:
<RootLogger root (INFO)>
Create the disciplines¶
objective = create_discipline(
"AnalyticDiscipline", expressions_dict={"obj": "x**3-x+1"}
)
constraint = create_discipline(
"AnalyticDiscipline", expressions_dict={"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)
Out:
INFO - 09:23:48:
INFO - 09:23:48: *** Start DOE Scenario execution ***
INFO - 09:23:48: DOEScenario
INFO - 09:23:48: Disciplines: MDOScenario_adapter
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: fullfact
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Full factorial design required. Number of samples along each direction for a design vector of size 1 with 10 samples: 10
INFO - 09:23:48: Final number of samples for DOE = 10 vs 10 requested
INFO - 09:23:48: DOE sampling: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -1.5 | 1.5 | float |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
WARNING - 09:23:48: Optimization found no feasible point ! The least infeasible point is selected.
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 375.21 it/sec, obj=1.25]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.2888129873625884
INFO - 09:23:48: The result is not feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = 0.1513713660745195
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -1.252181466244097 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.035448 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -1.166666666666667 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
WARNING - 09:23:48: Optimization found no feasible point ! The least infeasible point is selected.
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 470.72 it/sec, obj=0.288]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.28811314244670916
INFO - 09:23:48: The result is not feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = 0.15144075010172386
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -1.252370379421043 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.029231 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -0.8333333333333334 | 1.5 | float |
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
WARNING - 09:23:48: Optimization found no feasible point ! The least infeasible point is selected.
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 495.03 it/sec, obj=-.875]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.5837798751488654
INFO - 09:23:48: The result is not feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = 0.19806414484529755
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -1.165017254042391 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.027963 ***
INFO - 09:23:48: DOE sampling: 40%|████ | 4/10 [00:00<00:00, 98.15 it/sec, obj=0.584]
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -0.5 | 1.5 | float |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 389.54 it/sec, obj=0.615]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.6150998219543254
INFO - 09:23:48: The result is feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 13
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = -0.788285881879476
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.5773788419679762 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.032932 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | -0.1666666666666667 | 1.5 | float |
INFO - 09:23:48: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 381.46 it/sec, obj=0.615]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.6150998205402495
INFO - 09:23:48: The result is feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = -0.7883188793606977
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.5773502675245377 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.034280 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.1666666666666667 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 402.86 it/sec, obj=0.615]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.6150998205402495
INFO - 09:23:48: The result is feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 11
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = -0.7883188774386114
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.5773502691891133 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.032749 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.5 | 1.5 | float |
INFO - 09:23:48: +------+-------------+-------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
INFO - 09:23:48: Optimization: 80%|████████ | 8/10 [00:00<00:00, 514.73 it/sec, obj=0.615]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.6150998205402495
INFO - 09:23:48: The result is feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 9
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = -0.78831887743932
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.5773502691884995 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.027268 ***
INFO - 09:23:48: DOE sampling: 80%|████████ | 8/10 [00:00<00:00, 42.74 it/sec, obj=0.615]
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.8333333333333335 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
INFO - 09:23:48: Optimization: 100%|██████████| 10/10 [00:00<00:00, 472.08 it/sec, obj=0.288]
INFO - 09:23:48: Optimization result:
INFO - 09:23:48: Objective value = 0.7453703703703706
INFO - 09:23:48: The result is feasible.
INFO - 09:23:48: Status: None
INFO - 09:23:48: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:48: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:48: Constraints values w.r.t. 0:
INFO - 09:23:48: cstr = -0.2499785665294918
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 0.8333333333333335 | 1.5 | float |
INFO - 09:23:48: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:48: *** MDO Scenario run terminated in 0:00:00.029154 ***
INFO - 09:23:48:
INFO - 09:23:48: *** Start MDO Scenario execution ***
INFO - 09:23:48: MDOScenario
INFO - 09:23:48: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:48: MDOFormulation: DisciplinaryOpt
INFO - 09:23:48: Algorithm: SLSQP
INFO - 09:23:48: Optimization problem:
INFO - 09:23:48: Minimize: obj(x)
INFO - 09:23:48: With respect to: x
INFO - 09:23:48: Subject to constraints:
INFO - 09:23:48: cstr(x) <= 0.0
INFO - 09:23:48: Design Space:
INFO - 09:23:48: +------+-------------+-------------------+-------------+-------+
INFO - 09:23:48: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:48: +------+-------------+-------------------+-------------+-------+
INFO - 09:23:48: | x | -1.5 | 1.166666666666667 | 1.5 | float |
INFO - 09:23:48: +------+-------------+-------------------+-------------+-------+
INFO - 09:23:48: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:48: [A
WARNING - 09:23:49: Optimization found no feasible point ! The least infeasible point is selected.
INFO - 09:23:49: Optimization: 100%|██████████| 10/10 [00:00<00:00, 462.57 it/sec, obj=0.288]
INFO - 09:23:49: Optimization result:
INFO - 09:23:49: Objective value = 0.28811314244698893
INFO - 09:23:49: The result is not feasible.
INFO - 09:23:49: Status: None
INFO - 09:23:49: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:49: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:49: Constraints values w.r.t. 0:
INFO - 09:23:49: cstr = 0.1514407501016959
INFO - 09:23:49: Design Space:
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: | x | -1.5 | -1.252370379420967 | 1.5 | float |
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: *** MDO Scenario run terminated in 0:00:00.029334 ***
INFO - 09:23:49:
INFO - 09:23:49: *** Start MDO Scenario execution ***
INFO - 09:23:49: MDOScenario
INFO - 09:23:49: Disciplines: AnalyticDiscipline AnalyticDiscipline
INFO - 09:23:49: MDOFormulation: DisciplinaryOpt
INFO - 09:23:49: Algorithm: SLSQP
INFO - 09:23:49: Optimization problem:
INFO - 09:23:49: Minimize: obj(x)
INFO - 09:23:49: With respect to: x
INFO - 09:23:49: Subject to constraints:
INFO - 09:23:49: cstr(x) <= 0.0
INFO - 09:23:49: Design Space:
INFO - 09:23:49: +------+-------------+-------+-------------+-------+
INFO - 09:23:49: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:49: +------+-------------+-------+-------------+-------+
INFO - 09:23:49: | x | -1.5 | 1.5 | 1.5 | float |
INFO - 09:23:49: +------+-------------+-------+-------------+-------+
INFO - 09:23:49: Optimization: 0%| | 0/10 [00:00<?, ?it]
INFO - 09:23:49: [A
WARNING - 09:23:49: Optimization found no feasible point ! The least infeasible point is selected.
INFO - 09:23:49: Optimization: 100%|██████████| 10/10 [00:00<00:00, 474.34 it/sec, obj=0.288]
INFO - 09:23:49: Optimization result:
INFO - 09:23:49: Objective value = 0.28811314244587316
INFO - 09:23:49: The result is not feasible.
INFO - 09:23:49: Status: None
INFO - 09:23:49: Optimizer message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 09:23:49: Number of calls to the objective function by the optimizer: 12
INFO - 09:23:49: Constraints values w.r.t. 0:
INFO - 09:23:49: cstr = 0.15144075010180735
INFO - 09:23:49: Design Space:
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: | x | -1.5 | -1.252370379421268 | 1.5 | float |
INFO - 09:23:49: +------+-------------+--------------------+-------------+-------+
INFO - 09:23:49: *** MDO Scenario run terminated in 0:00:00.028781 ***
INFO - 09:23:49: DOE sampling: 100%|██████████| 10/10 [00:00<00:00, 30.71 it/sec, obj=0.288]
INFO - 09:23:49: Optimization result:
INFO - 09:23:49: Objective value = 0.6150998205402495
INFO - 09:23:49: The result is feasible.
INFO - 09:23:49: Status: None
INFO - 09:23:49: Optimizer message: None
INFO - 09:23:49: Number of calls to the objective function by the optimizer: 10
INFO - 09:23:49: Constraints values w.r.t. 0:
INFO - 09:23:49: cstr = -0.7883188793606977
INFO - 09:23:49: Design Space:
INFO - 09:23:49: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:49: | name | lower_bound | value | upper_bound | type |
INFO - 09:23:49: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:49: | x | -1.5 | -0.1666666666666667 | 1.5 | float |
INFO - 09:23:49: +------+-------------+---------------------+-------------+-------+
INFO - 09:23:49: *** DOE Scenario run terminated ***
{'eval_jac': False, 'algo': 'fullfact', 'n_samples': 10}
Plot the optimum objective for different x0¶
scenario_doe.post_process("BasicHistory", data_list=["obj"], save=False, show=False)
# Workaround for HTML rendering, instead of ``show=True``
plt.show()

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