Note
Click here to download the full example code
Scalable problem of Tedford and Martins, 2010¶
from __future__ import annotations
from gemseo.api import configure_logger
from gemseo.api import generate_n2_plot
from gemseo.problems.scalable.parametric.core.design_space import TMDesignSpace
from gemseo.problems.scalable.parametric.disciplines import TMMainDiscipline
from gemseo.problems.scalable.parametric.disciplines import TMSubDiscipline
from gemseo.problems.scalable.parametric.problem import TMScalableProblem
from gemseo.problems.scalable.parametric.study import TMParamSS
from gemseo.problems.scalable.parametric.study import TMParamSSPost
from gemseo.problems.scalable.parametric.study import TMScalableStudy
from numpy import array
from numpy.random import rand
configure_logger()
<RootLogger root (INFO)>
Disciplines¶
We define two strongly coupled disciplines and a weakly coupled discipline, with:
2 shared design parameters,
2 local design parameters for the first discipline,
3 local design parameters for the second discipline,
3 coupling variables for the first discipline,
2 coupling variables for the second discipline.
sizes = {"x_shared": 2, "x_local_0": 2, "x_local_1": 3, "y_0": 3, "y_1": 2}
We use any values for the coefficients and the default values of the design parameters and coupling variables.
Strongly coupled disciplines¶
Here is the first strongly coupled discipline.
default_inputs = {
"x_shared": rand(sizes["x_shared"]),
"x_local_0": rand(sizes["x_local_0"]),
"y_1": rand(sizes["y_1"]),
}
index = 0
c_shared = rand(sizes["y_0"], sizes["x_shared"])
c_local = rand(sizes["y_0"], sizes["x_local_0"])
c_coupling = {"y_1": rand(sizes["y_0"], sizes["y_1"])}
disc0 = TMSubDiscipline(index, c_shared, c_local, c_coupling, default_inputs)
print(disc0.name)
print(disc0.get_input_data_names())
print(disc0.get_output_data_names())
SubModel_0
KeysView(Grammar name: SubModel_0_input, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"x_local_0": {
"type": "array",
"items": {
"type": "number"
}
},
"x_shared": {
"type": "array",
"items": {
"type": "number"
}
},
"y_1": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"x_local_0",
"x_shared",
"y_1"
]
})
KeysView(Grammar name: SubModel_0_output, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"y_0": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"y_0"
]
})
TM_Discipline_0
dict_keys(['x_shared', 'x_local_0', 'y_1'])
dict_keys(['y_0'])
Here is the second one, strongly coupled with the first one.
default_inputs = {
"x_shared": rand(sizes["x_shared"]),
"x_local_1": rand(sizes["x_local_1"]),
"y_0": rand(sizes["y_0"]),
}
index = 1
c_shared = rand(sizes["y_1"], sizes["x_shared"])
c_local = rand(sizes["y_1"], sizes["x_local_1"])
c_coupling = {"y_0": rand(sizes["y_1"], sizes["y_0"])}
disc1 = TMSubDiscipline(index, c_shared, c_local, c_coupling, default_inputs)
print(disc1.name)
print(disc1.get_input_data_names())
print(disc1.get_output_data_names())
SubModel_1
KeysView(Grammar name: SubModel_1_input, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"x_local_1": {
"type": "array",
"items": {
"type": "number"
}
},
"x_shared": {
"type": "array",
"items": {
"type": "number"
}
},
"y_0": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"x_local_1",
"x_shared",
"y_0"
]
})
KeysView(Grammar name: SubModel_1_output, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"y_1": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"y_1"
]
})
TM_Discipline_1
dict_keys(['x_shared', 'x_local_1', 'y_0'])
dict_keys(['y_1'])
Weakly coupled discipline¶
Here is the discipline weakly coupled to the previous ones.
c_constraint = [array([1.0, 2.0]), array([3.0, 4.0, 5.0])]
default_inputs = {
"x_shared": array([0.5]),
"y_0": array([2.0, 3.0]),
"y_1": array([4.0, 5.0, 6.0]),
}
system = TMMainDiscipline(c_constraint, default_inputs)
print(system.name)
print(system.get_input_data_names())
print(system.get_output_data_names())
MainModel
KeysView(Grammar name: MainModel_input, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"x_shared": {
"type": "array",
"items": {
"type": "number"
}
},
"y_0": {
"type": "array",
"items": {
"type": "number"
}
},
"y_1": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"x_shared",
"y_0",
"y_1"
]
})
KeysView(Grammar name: MainModel_output, schema: {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"cstr_0": {
"type": "array",
"items": {
"type": "number"
}
},
"cstr_1": {
"type": "array",
"items": {
"type": "number"
}
},
"obj": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"cstr_0",
"cstr_1",
"obj"
]
})
TM_System
dict_keys(['x_shared', 'y_0', 'y_1'])
dict_keys(['obj', 'cstr_0', 'cstr_1'])
Coupling chart¶
We can represent these three disciplines by means of an N2 chart.
generate_n2_plot([disc0, disc1, system], save=False, show=True)


Design space¶
We define the design space from the sizes of the shared design parameters, local parameters and coupling variables.
n_shared = sizes["x_shared"]
n_local = [sizes["x_local_0"], sizes["x_local_1"]]
n_coupling = [sizes["y_0"], sizes["y_1"]]
design_space = TMDesignSpace(n_shared, n_local, n_coupling)
print(design_space)
<gemseo.problems.scalable.parametric.core.design_space.TMDesignSpace object at 0x7f3c134ec820>
Design Space:
+-----------+-------------+-------+-------------+-------+
| name | lower_bound | value | upper_bound | type |
+-----------+-------------+-------+-------------+-------+
| x_local_0 | 0 | 0.5 | 1 | float |
| x_local_0 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_shared | 0 | 0.5 | 1 | float |
| x_shared | 0 | 0.5 | 1 | float |
| y_0 | 0 | 0.5 | 1 | float |
| y_0 | 0 | 0.5 | 1 | float |
| y_0 | 0 | 0.5 | 1 | float |
| y_1 | 0 | 0.5 | 1 | float |
| y_1 | 0 | 0.5 | 1 | float |
+-----------+-------------+-------+-------------+-------+
Scalable problem¶
We define a scalable problem based on two strongly coupled disciplines and a weakly one, with the following properties:
3 shared design parameters,
2 local design parameters for the first strongly coupled discipline,
2 coupling variables for the first strongly coupled discipline,
4 local design parameters for the second strongly coupled discipline,
3 coupling variables for the second strongly coupled discipline.
problem = TMScalableProblem(3, [2, 4], [2, 3])
print(problem)
print(problem.get_design_space())
print(problem.get_default_inputs())
Scalable problem
.... MainModel
........ Inputs:
............ x_shared (3)
............ y_0 (2)
............ y_1 (3)
........ Outputs:
............ cstr_0 (2)
............ cstr_1 (3)
............ obj (1)
.... SubModel_0
........ Inputs:
............ x_local_0 (2)
............ x_shared (3)
............ y_1 (3)
........ Outputs:
............ y_0 (2)
.... SubModel_1
........ Inputs:
............ x_local_1 (4)
............ x_shared (3)
............ y_0 (2)
........ Outputs:
............ y_1 (3)
+------------------------------------------------------------------------------+
| Parameter space |
+-----------+-------------+-------+-------------+-------+----------------------+
| name | lower_bound | value | upper_bound | type | Initial distribution |
+-----------+-------------+-------+-------------+-------+----------------------+
| x_local_0 | 0 | 0.5 | 1 | float | |
| x_local_0 | 0 | 0.5 | 1 | float | |
| x_local_1 | 0 | 0.5 | 1 | float | |
| x_local_1 | 0 | 0.5 | 1 | float | |
| x_local_1 | 0 | 0.5 | 1 | float | |
| x_local_1 | 0 | 0.5 | 1 | float | |
| x_shared | 0 | 0.5 | 1 | float | |
| x_shared | 0 | 0.5 | 1 | float | |
| x_shared | 0 | 0.5 | 1 | float | |
| y_0 | 0 | 0.5 | 1 | float | |
| y_0 | 0 | 0.5 | 1 | float | |
| y_1 | 0 | 0.5 | 1 | float | |
| y_1 | 0 | 0.5 | 1 | float | |
| y_1 | 0 | 0.5 | 1 | float | |
+-----------+-------------+-------+-------------+-------+----------------------+
{'x_shared': array([0.5, 0.5, 0.5]), 'x_local_0': array([0.5, 0.5]), 'y_0': array([0.5, 0.5]), 'cstr_0': array([0.5, 0.5]), 'u_local_0': array([0., 0.]), 'x_local_1': array([0.5, 0.5, 0.5, 0.5]), 'y_1': array([0.5, 0.5, 0.5]), 'cstr_1': array([0.5, 0.5, 0.5]), 'u_local_1': array([0., 0., 0.])}
Scalable problem
> TM_System
>> Inputs:
| x_shared (3)
| y_0 (2)
| y_1 (3)
>> Outputs:
| cstr_0 (2)
| cstr_1 (3)
| obj (1)
> TM_Discipline_0
>> Inputs:
| x_local_0 (2)
| x_shared (3)
| y_1 (3)
>> Outputs:
| y_0 (2)
> TM_Discipline_1
>> Inputs:
| x_local_1 (4)
| x_shared (3)
| y_0 (2)
>> Outputs:
| y_1 (3)
Design Space:
+-----------+-------------+-------+-------------+-------+
| name | lower_bound | value | upper_bound | type |
+-----------+-------------+-------+-------------+-------+
| x_local_0 | 0 | 0.5 | 1 | float |
| x_local_0 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_local_1 | 0 | 0.5 | 1 | float |
| x_shared | 0 | 0.5 | 1 | float |
| x_shared | 0 | 0.5 | 1 | float |
| x_shared | 0 | 0.5 | 1 | float |
| y_0 | 0 | 0.5 | 1 | float |
| y_0 | 0 | 0.5 | 1 | float |
| y_1 | 0 | 0.5 | 1 | float |
| y_1 | 0 | 0.5 | 1 | float |
| y_1 | 0 | 0.5 | 1 | float |
+-----------+-------------+-------+-------------+-------+
{'x_shared': array([0.5, 0.5, 0.5]), 'x_local_0': array([0.5, 0.5]),
'y_0': array([0.5, 0.5]), 'cstr_0': array([0.5]), 'x_local_1':
array([0.5, 0.5, 0.5, 0.5]), 'y_1': array([0.5, 0.5, 0.5]), 'cstr_1':
array([0.5])}
Scalable study¶
We define a scalable study based on two strongly coupled disciplines and a weakly one, with the following properties:
3 shared design parameters,
2 local design parameters for each strongly coupled discipline,
3 coupling variables for each strongly coupled discipline.
study = TMScalableStudy(n_disciplines=2, n_shared=3, n_local=2, n_coupling=3)
print(study)
Scalable study
.... 2 disciplines
.... 3 shared design parameters
.... 2 local design parameters per discipline
.... 3 coupling variables per discipline
Scalable study
> 2 disciplines
> 3 shared design parameters
> 2 local design parameters per discipline
> 3 coupling variables per discipline
Then, we run MDF and IDF formulations:
study.run_formulation("MDF", xdsm_pdf=False)
study.run_formulation("IDF", xdsm_pdf=False)
INFO - 14:44:52: Make the starting point feasible.
INFO - 14:44:52:
INFO - 14:44:52: *** Start MDOScenario execution ***
INFO - 14:44:52: MDOScenario
INFO - 14:44:52: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:44:52: MDO formulation: MDF
INFO - 14:44:52: Optimization problem:
INFO - 14:44:52: minimize obj(x_local_0, x_local_1, x_shared)
INFO - 14:44:52: with respect to x_local_0, x_local_1, x_shared
INFO - 14:44:52: subject to constraints:
INFO - 14:44:52: cstr_0(x_local_0, x_local_1, x_shared) <= [ 0.65250671 -2.8453087 -4.16343355]
INFO - 14:44:52: cstr_1(x_local_0, x_local_1, x_shared) <= [0.85268891 0.52747299 0.62341835]
INFO - 14:44:52: over the design space:
INFO - 14:44:52: | Parameter space |
INFO - 14:44:52: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:52: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:44:52: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:52: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:52: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:52: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:44:52: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:44:52: ... 2%|▏ | 2/100 [00:00<00:00, 736.40 it/sec, obj=0.5]
INFO - 14:44:52: ... 4%|▍ | 4/100 [00:00<00:00, 367.38 it/sec, obj=0.5]
INFO - 14:44:52: ... 6%|▌ | 6/100 [00:00<00:00, 245.38 it/sec, obj=0.5]
INFO - 14:44:52: ... 8%|▊ | 8/100 [00:00<00:00, 183.87 it/sec, obj=0.5]
INFO - 14:44:52: ... 8%|▊ | 8/100 [00:00<00:00, 183.56 it/sec, obj=0.5]
INFO - 14:44:52: Optimization result:
INFO - 14:44:52: Optimizer info:
INFO - 14:44:52: Status: None
INFO - 14:44:52: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:44:52: Number of calls to the objective function by the optimizer: 8
INFO - 14:44:52: Solution:
INFO - 14:44:52: The solution is feasible.
INFO - 14:44:52: Objective: 0.28903317159094793
INFO - 14:44:52: Standardized constraints:
INFO - 14:44:52: cstr_0 + offset = [-1.59418542e+00 -1.77635684e-15 -2.20075451e+01]
INFO - 14:44:52: cstr_1 + offset = [-0.62818923 -1.7413806 -1.62123925]
INFO - 14:44:52: +--------------------------------------------------------------------------------------------+
INFO - 14:44:52: | Parameter space |
INFO - 14:44:52: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:52: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:44:52: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:52: | x_local_0 | 0 | 0.801127355733839 | 1 | float | |
INFO - 14:44:52: | x_local_0 | 0 | 0.6239177332508217 | 1 | float | |
INFO - 14:44:52: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:44:52: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.07024612283000739 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.1762493157624942 | 1 | float | |
INFO - 14:44:52: | x_shared | 0 | 0.1499619831353362 | 1 | float | |
INFO - 14:44:52: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:52: *** End MDOScenario execution (time: 0:00:00.562206) ***
INFO - 14:44:54: Generating HTML XDSM file in : results/coupling/MDF_xdsm.html
INFO - 14:44:56: Make the starting point feasible.
INFO - 14:44:56:
INFO - 14:44:56: *** Start MDOScenario execution ***
INFO - 14:44:56: MDOScenario
INFO - 14:44:56: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:44:56: MDO formulation: IDF
INFO - 14:44:56: Optimization problem:
INFO - 14:44:56: minimize obj(x_shared, y_0, y_1)
INFO - 14:44:56: with respect to x_local_0, x_local_1, x_shared, y_0, y_1
INFO - 14:44:56: subject to constraints:
INFO - 14:44:56: cstr_0(x_shared, y_0, y_1) <= [ 0.65250671 0.23093826 -4.16343355]
INFO - 14:44:56: cstr_1(x_shared, y_0, y_1) <= [ 0.85268891 -1.36263503 0.62341835]
INFO - 14:44:56: y_0: y_0(x_local_0, x_shared, y_1): y_0(x_local_0, x_shared, y_1) - y_0 == 0.0
INFO - 14:44:56: y_1: y_1(x_local_1, x_shared, y_0): y_1(x_local_1, x_shared, y_0) - y_1 == 0.0
INFO - 14:44:56: over the design space:
INFO - 14:44:56: | Parameter space |
INFO - 14:44:56: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:56: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:44:56: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:56: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:44:56: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:44:56: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:44:56: ... 10%|█ | 10/100 [00:00<00:00, 1658.94 it/sec, obj=0.5]
INFO - 14:44:56: Optimization result:
INFO - 14:44:56: Optimizer info:
INFO - 14:44:56: Status: None
INFO - 14:44:56: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:44:56: Number of calls to the objective function by the optimizer: 10
INFO - 14:44:56: Solution:
INFO - 14:44:56: The solution is feasible.
INFO - 14:44:56: Objective: 0.2505909523154283
INFO - 14:44:56: Standardized constraints:
INFO - 14:44:56: cstr_0 + offset = [ -1.27965363 -2.31226949 -19.05735903]
INFO - 14:44:56: cstr_1 + offset = [-0.59186125 0. -1.52367146]
INFO - 14:44:56: y_0 = [ 5.55111512e-17 0.00000000e+00 -5.55111512e-17]
INFO - 14:44:56: y_1 = [ 1.11022302e-16 -5.55111512e-17 -1.11022302e-16]
INFO - 14:44:56: +--------------------------------------------------------------------------------------------+
INFO - 14:44:56: | Parameter space |
INFO - 14:44:56: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:56: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:44:56: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:56: | x_local_0 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:44:56: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:44:56: | x_local_1 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:44:56: | x_local_1 | 0 | 0.7594082578802717 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.1558252960698979 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.2044810243675251 | 1 | float | |
INFO - 14:44:56: | x_shared | 0 | 0.08695435101337673 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.4682527561624886 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.40066110028851 | 1 | float | |
INFO - 14:44:56: | y_0 | 0 | 0.4690830695053916 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5017764477639917 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:44:56: | y_1 | 0 | 0.5046058665567719 | 1 | float | |
INFO - 14:44:56: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:44:56: *** End MDOScenario execution (time: 0:00:00.083676) ***
INFO - 14:44:58: Generating HTML XDSM file in : results/coupling/IDF_xdsm.html
{'x_opt': array([1. , 1. , 1. , 0.75940826, 0.1558253 ,
0.20448102, 0.08695435, 0.46825276, 0.4006611 , 0.46908307,
0.50177645, 0.5 , 0.50460587]), 'f_opt': 0.2505909523154283, 'status': None, 'n_iter': 62, 'is_feas': True, 'exec_time': 0.08374816800005647}
We can look at the result in the console:
print(study)
Scalable study
.... 2 disciplines
.... 3 shared design parameters
.... 2 local design parameters per discipline
.... 3 coupling variables per discipline
MDO formulations
.... MDF
........ MainModel = 10 calls / 8 linearizations / 0.0021349889998418803 seconds
........ SubModel_0 = 147 calls / 8 linearizations / 0.012881968999636229 seconds
........ SubModel_1 = 139 calls / 8 linearizations / 0.011809782999080198 seconds
........ mda = 8 calls / 8 linearizations / 0.5082366689998707 seconds
........ mdo_chain = 8 calls / 0 linearizations / 0.10732503100030044 seconds
........ sub_mda = 8 calls / 0 linearizations / 0.09853959399970336 seconds
........ scenario = 1 calls / 0 linearizations / 0.5622781689999101 seconds
.... IDF
........ MainModel = 12 calls / 10 linearizations / 0.002402746999678129 seconds
........ SubModel_0 = 11 calls / 9 linearizations / 0.0018506410003737983 seconds
........ SubModel_1 = 11 calls / 9 linearizations / 0.0017534409994368616 seconds
........ mda = 0 calls / 0 linearizations / 0.0 seconds
........ mdo_chain = 0 calls / 0 linearizations / 0.0 seconds
........ sub_mda = 0 calls / 0 linearizations / 0.0 seconds
........ scenario = 1 calls / 0 linearizations / 0.08374816800005647 seconds
Scalable study
> 2 disciplines
> 3 shared design parameters
> 2 local design parameters per discipline
> 3 coupling variables per discipline
MDO formulations
> MDF
>> TM_System = 9 calls / 7 linearizations / 3.29e-03 seconds
>> TM_Discipline_0 = 132 calls / 7 linearizations / 2.19e-02 seconds
>> TM_Discipline_1 = 124 calls / 7 linearizations / 2.04e-02 seconds
>> mda = 7 calls / 7 linearizations / 2.68e-01 seconds
>> mdo_chain = 7 calls / 0 linearizations / 1.20e-01 seconds
>> sub_mda = 7 calls / 0 linearizations / 1.16e-01 seconds
>> scenario = 1 calls / 0 linearizations / 3.35e-01 seconds
> IDF
>> TM_System = 12 calls / 9 linearizations / 2.98e-03 seconds
>> TM_Discipline_0 = 12 calls / 9 linearizations / 2.19e-03 seconds
>> TM_Discipline_1 = 11 calls / 9 linearizations / 2.01e-03 seconds
>> mda = 0 calls / 0 linearizations / 0.00e+00 seconds
>> mdo_chain = 0 calls / 0 linearizations / 0.00e+00 seconds
>> sub_mda = 0 calls / 0 linearizations / 0.00e+00 seconds
>> scenario = 1 calls / 0 linearizations / 7.60e-02 seconds
or plot the execution time:
study.plot_exec_time()

Parametric scalability study¶
We define a parametric scalability study based on two strongly coupled disciplines and a weakly one, with the following properties:
3 shared design parameters,
2 coupling variables for each strongly coupled discipline,
1, 5 or 25 local design parameters for each strongly coupled discipline,
study = TMParamSS(n_disciplines=2, n_shared=3, n_local=[1, 5, 25], n_coupling=2)
print(study)
Parametric scalable study
> 2 disciplines
> 3 shared design parameters
> 1, 5 or 25 local design parameters per discipline
> 2 coupling variables per discipline
Parametric scalable study
> 2 disciplines
> 3 shared design parameters
> 1, 5 or 25 local design parameters per discipline
> 2 coupling variables per discipline
Then, we run MDF and IDF formulations:
study.run_formulation("MDF")
study.run_formulation("IDF")
INFO - 14:45:01: Make the starting point feasible.
INFO - 14:45:01:
INFO - 14:45:01: *** Start MDOScenario execution ***
INFO - 14:45:01: MDOScenario
INFO - 14:45:01: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:01: MDO formulation: MDF
INFO - 14:45:01: Optimization problem:
INFO - 14:45:01: minimize obj(x_local_0, x_local_1, x_shared)
INFO - 14:45:01: with respect to x_local_0, x_local_1, x_shared
INFO - 14:45:01: subject to constraints:
INFO - 14:45:01: cstr_0(x_local_0, x_local_1, x_shared) <= [0.88589544 0.88821903]
INFO - 14:45:01: cstr_1(x_local_0, x_local_1, x_shared) <= [-0.17585898 -1.56050583]
INFO - 14:45:01: over the design space:
INFO - 14:45:01: | Parameter space |
INFO - 14:45:01: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:01: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:01: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:01: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:01: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:01: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:01: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:01: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:01: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:01: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:01: ... 0%| | 0/100 [00:00<?, ?it]
WARNING - 14:45:01: MDAGaussSeidel has reached its maximum number of iterations but the normed residual 1.3486125443736518e-14 is still above the tolerance 1e-14.
INFO - 14:45:01: ... 2%|▏ | 2/100 [00:00<00:00, 918.84 it/sec, obj=0.5]
INFO - 14:45:01: ... 4%|▍ | 4/100 [00:00<00:00, 454.70 it/sec, obj=0.5]
WARNING - 14:45:01: MDAGaussSeidel has reached its maximum number of iterations but the normed residual 1.0303264460093434e-14 is still above the tolerance 1e-14.
WARNING - 14:45:01: MDAGaussSeidel has reached its maximum number of iterations but the normed residual 1.221308406312274e-14 is still above the tolerance 1e-14.
INFO - 14:45:01: ... 6%|▌ | 6/100 [00:00<00:00, 300.62 it/sec, obj=0.5]
WARNING - 14:45:01: MDAGaussSeidel has reached its maximum number of iterations but the normed residual 1.0624260076854628e-14 is still above the tolerance 1e-14.
WARNING - 14:45:02: MDAGaussSeidel has reached its maximum number of iterations but the normed residual 1.1319239632249289e-14 is still above the tolerance 1e-14.
INFO - 14:45:02: ... 8%|▊ | 8/100 [00:00<00:00, 224.32 it/sec, obj=0.5]
INFO - 14:45:02: ... 8%|▊ | 8/100 [00:00<00:00, 223.87 it/sec, obj=0.5]
INFO - 14:45:02: Optimization result:
INFO - 14:45:02: Optimizer info:
INFO - 14:45:02: Status: None
INFO - 14:45:02: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:02: Number of calls to the objective function by the optimizer: 8
INFO - 14:45:02: Solution:
INFO - 14:45:02: The solution is feasible.
INFO - 14:45:02: Objective: 0.3805071026441499
INFO - 14:45:02: Standardized constraints:
INFO - 14:45:02: cstr_0 + offset = [-0.41404086 -0.37054477]
INFO - 14:45:02: cstr_1 + offset = [ -4.10330374 -10.67148731]
INFO - 14:45:02: +-------------------------------------------------------------------------------------------+
INFO - 14:45:02: | Parameter space |
INFO - 14:45:02: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:02: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:02: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:02: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:02: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:02: | x_shared | 0 | 0.4316204495066337 | 1 | float | |
INFO - 14:45:02: | x_shared | 0 | 0.5112660072459285 | 1 | float | |
INFO - 14:45:02: | x_shared | 0 | 0.2050544622846011 | 1 | float | |
INFO - 14:45:02: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:02: *** End MDOScenario execution (time: 0:00:00.474038) ***
INFO - 14:45:03: Generating HTML XDSM file in : results/coupling/MDF_xdsm.html
INFO - 14:45:06: Make the starting point feasible.
INFO - 14:45:06:
INFO - 14:45:06: *** Start MDOScenario execution ***
INFO - 14:45:06: MDOScenario
INFO - 14:45:06: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:06: MDO formulation: MDF
INFO - 14:45:06: Optimization problem:
INFO - 14:45:06: minimize obj(x_local_0, x_local_1, x_shared)
INFO - 14:45:06: with respect to x_local_0, x_local_1, x_shared
INFO - 14:45:06: subject to constraints:
INFO - 14:45:06: cstr_0(x_local_0, x_local_1, x_shared) <= [0.89887356 0.86633976]
INFO - 14:45:06: cstr_1(x_local_0, x_local_1, x_shared) <= [0.64342256 0.87330214]
INFO - 14:45:06: over the design space:
INFO - 14:45:06: | Parameter space |
INFO - 14:45:06: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:06: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:06: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:06: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:06: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:06: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:06: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:45:06: ... 2%|▏ | 2/100 [00:00<00:00, 962.87 it/sec, obj=0.5]
INFO - 14:45:06: ... 5%|▌ | 5/100 [00:00<00:00, 397.77 it/sec, obj=0.5]
INFO - 14:45:06: ... 8%|▊ | 8/100 [00:00<00:00, 249.56 it/sec, obj=0.5]
INFO - 14:45:06: ... 11%|█ | 11/100 [00:00<00:00, 181.82 it/sec, obj=0.5]
INFO - 14:45:06: ... 14%|█▍ | 14/100 [00:00<00:00, 142.70 it/sec, obj=0.5]
INFO - 14:45:06: ... 14%|█▍ | 14/100 [00:00<00:00, 142.49 it/sec, obj=0.5]
INFO - 14:45:06: Optimization result:
INFO - 14:45:06: Optimizer info:
INFO - 14:45:06: Status: None
INFO - 14:45:06: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:06: Number of calls to the objective function by the optimizer: 14
INFO - 14:45:06: Solution:
INFO - 14:45:06: The solution is feasible.
INFO - 14:45:06: Objective: 0.1385357381285276
INFO - 14:45:06: Standardized constraints:
INFO - 14:45:06: cstr_0 + offset = [-0.23668859 -0.10569247]
INFO - 14:45:06: cstr_1 + offset = [-1.21308758 -0.34258749]
INFO - 14:45:06: +--------------------------------------------------------------------------------------------+
INFO - 14:45:06: | Parameter space |
INFO - 14:45:06: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:06: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:06: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:06: | x_local_0 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:45:06: | x_local_0 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.9999999999999998 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.9999999999999998 | 1 | float | |
INFO - 14:45:06: | x_local_1 | 0 | 0.9999999999999998 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.1458505152901145 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.1819162891601797 | 1 | float | |
INFO - 14:45:06: | x_shared | 0 | 0.07257747464173495 | 1 | float | |
INFO - 14:45:06: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:06: *** End MDOScenario execution (time: 0:00:00.723918) ***
INFO - 14:45:08: Generating HTML XDSM file in : results/coupling/MDF_xdsm.html
INFO - 14:45:10: Make the starting point feasible.
INFO - 14:45:10:
INFO - 14:45:10: *** Start MDOScenario execution ***
INFO - 14:45:10: MDOScenario
INFO - 14:45:10: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:10: MDO formulation: MDF
INFO - 14:45:10: Optimization problem:
INFO - 14:45:10: minimize obj(x_local_0, x_local_1, x_shared)
INFO - 14:45:10: with respect to x_local_0, x_local_1, x_shared
INFO - 14:45:10: subject to constraints:
INFO - 14:45:10: cstr_0(x_local_0, x_local_1, x_shared) <= [ -4.03014722 -18.07597002]
INFO - 14:45:10: cstr_1(x_local_0, x_local_1, x_shared) <= [-2.53275899 0.59384442]
INFO - 14:45:10: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:10: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:45:10: ... 2%|▏ | 2/100 [00:00<00:00, 979.95 it/sec, obj=0.5]
INFO - 14:45:10: ... 5%|▌ | 5/100 [00:00<00:00, 404.62 it/sec, obj=0.5]
INFO - 14:45:11: ... 8%|▊ | 8/100 [00:00<00:00, 253.09 it/sec, obj=0.5]
INFO - 14:45:11: ... 11%|█ | 11/100 [00:00<00:00, 183.36 it/sec, obj=0.5]
INFO - 14:45:11: ... 14%|█▍ | 14/100 [00:00<00:00, 144.12 it/sec, obj=0.5]
INFO - 14:45:11: ... 17%|█▋ | 17/100 [00:00<00:00, 118.43 it/sec, obj=0.5]
INFO - 14:45:11: ... 20%|██ | 20/100 [00:00<00:00, 100.41 it/sec, obj=0.5]
INFO - 14:45:11: ... 20%|██ | 20/100 [00:00<00:00, 100.29 it/sec, obj=0.5]
INFO - 14:45:11: Optimization result:
INFO - 14:45:11: Optimizer info:
INFO - 14:45:11: Status: None
INFO - 14:45:11: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:11: Number of calls to the objective function by the optimizer: 20
INFO - 14:45:11: Solution:
INFO - 14:45:11: The solution is feasible.
INFO - 14:45:11: Objective: 0.08650593635886976
INFO - 14:45:11: Standardized constraints:
INFO - 14:45:11: cstr_0 + offset = [-8.43715914 0. ]
INFO - 14:45:11: cstr_1 + offset = [-6.67439741e-01 4.44089210e-16]
INFO - 14:45:11: *** End MDOScenario execution (time: 0:00:01.008863) ***
INFO - 14:45:13: Generating HTML XDSM file in : results/coupling/MDF_xdsm.html
INFO - 14:45:16: Make the starting point feasible.
INFO - 14:45:16:
INFO - 14:45:16: *** Start MDOScenario execution ***
INFO - 14:45:16: MDOScenario
INFO - 14:45:16: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:16: MDO formulation: IDF
INFO - 14:45:16: Optimization problem:
INFO - 14:45:16: minimize obj(x_shared, y_0, y_1)
INFO - 14:45:16: with respect to x_local_0, x_local_1, x_shared, y_0, y_1
INFO - 14:45:16: subject to constraints:
INFO - 14:45:16: cstr_0(x_shared, y_0, y_1) <= [0.88589544 0.88821903]
INFO - 14:45:16: cstr_1(x_shared, y_0, y_1) <= [-0.17585898 -1.56050583]
INFO - 14:45:16: y_0: y_0(x_local_0, x_shared, y_1): y_0(x_local_0, x_shared, y_1) - y_0 == 0.0
INFO - 14:45:16: y_1: y_1(x_local_1, x_shared, y_0): y_1(x_local_1, x_shared, y_0) - y_1 == 0.0
INFO - 14:45:16: over the design space:
INFO - 14:45:16: | Parameter space |
INFO - 14:45:16: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:16: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:16: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:16: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:16: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:16: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:16: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:45:16: ... 8%|▊ | 8/100 [00:00<00:00, 2269.31 it/sec, obj=0.5]
INFO - 14:45:16: Optimization result:
INFO - 14:45:16: Optimizer info:
INFO - 14:45:16: Status: None
INFO - 14:45:16: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:16: Number of calls to the objective function by the optimizer: 8
INFO - 14:45:16: Solution:
INFO - 14:45:16: The solution is feasible.
INFO - 14:45:16: Objective: 0.3805016326090851
INFO - 14:45:16: Standardized constraints:
INFO - 14:45:16: cstr_0 + offset = [-0.4105685 -0.36790752]
INFO - 14:45:16: cstr_1 + offset = [ -4.06820466 -10.60696021]
INFO - 14:45:16: y_0 = [-5.55111512e-17 5.55111512e-17]
INFO - 14:45:16: y_1 = [-1.66533454e-16 0.00000000e+00]
INFO - 14:45:16: +-------------------------------------------------------------------------------------------+
INFO - 14:45:16: | Parameter space |
INFO - 14:45:16: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:16: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:16: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:16: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:16: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.4349840014945803 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.5153341160240119 | 1 | float | |
INFO - 14:45:16: | x_shared | 0 | 0.20620547934211 | 1 | float | |
INFO - 14:45:16: | y_0 | 0 | 0.4598177788198944 | 1 | float | |
INFO - 14:45:16: | y_0 | 0 | 0.4291325171427605 | 1 | float | |
INFO - 14:45:16: | y_1 | 0 | 0.4459772572294342 | 1 | float | |
INFO - 14:45:16: | y_1 | 0 | 0.5142525316178621 | 1 | float | |
INFO - 14:45:16: +-----------+-------------+--------------------+-------------+-------+----------------------+
INFO - 14:45:16: *** End MDOScenario execution (time: 0:00:00.064054) ***
INFO - 14:45:17: Generating HTML XDSM file in : results/coupling/IDF_xdsm.html
INFO - 14:45:20: Make the starting point feasible.
INFO - 14:45:20:
INFO - 14:45:20: *** Start MDOScenario execution ***
INFO - 14:45:20: MDOScenario
INFO - 14:45:20: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:20: MDO formulation: IDF
INFO - 14:45:20: Optimization problem:
INFO - 14:45:20: minimize obj(x_shared, y_0, y_1)
INFO - 14:45:20: with respect to x_local_0, x_local_1, x_shared, y_0, y_1
INFO - 14:45:20: subject to constraints:
INFO - 14:45:20: cstr_0(x_shared, y_0, y_1) <= [0.89887356 0.86633976]
INFO - 14:45:20: cstr_1(x_shared, y_0, y_1) <= [-0.78288719 0.87330214]
INFO - 14:45:20: y_0: y_0(x_local_0, x_shared, y_1): y_0(x_local_0, x_shared, y_1) - y_0 == 0.0
INFO - 14:45:20: y_1: y_1(x_local_1, x_shared, y_0): y_1(x_local_1, x_shared, y_0) - y_1 == 0.0
INFO - 14:45:20: over the design space:
INFO - 14:45:20: | Parameter space |
INFO - 14:45:20: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:20: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:20: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:20: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | y_0 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: +-----------+-------------+-------+-------------+-------+----------------------+
INFO - 14:45:20: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:20: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:45:20: ... 13%|█▎ | 13/100 [00:00<00:00, 1358.78 it/sec, obj=0.5]
INFO - 14:45:20: Optimization result:
INFO - 14:45:20: Optimizer info:
INFO - 14:45:20: Status: None
INFO - 14:45:20: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:20: Number of calls to the objective function by the optimizer: 13
INFO - 14:45:20: Solution:
INFO - 14:45:20: The solution is feasible.
INFO - 14:45:20: Objective: 0.15383885100886432
INFO - 14:45:20: Standardized constraints:
INFO - 14:45:20: cstr_0 + offset = [-0.28367339 -0.13418614]
INFO - 14:45:20: cstr_1 + offset = [ 0. -0.39931711]
INFO - 14:45:20: y_0 = [5.55111512e-17 1.66533454e-16]
INFO - 14:45:20: y_1 = [1.11022302e-16 1.11022302e-16]
INFO - 14:45:20: +--------------------------------------------------------------------------------------------+
INFO - 14:45:20: | Parameter space |
INFO - 14:45:20: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:20: | name | lower_bound | value | upper_bound | type | Initial distribution |
INFO - 14:45:20: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:20: | x_local_0 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_0 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.9999999999999999 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 1 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.9858563292487739 | 1 | float | |
INFO - 14:45:20: | x_local_1 | 0 | 0.8952030605001723 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.03908896701511936 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.05509382017067609 | 1 | float | |
INFO - 14:45:20: | x_shared | 0 | 0.03828687665187131 | 1 | float | |
INFO - 14:45:20: | y_0 | 0 | 0.3805135756043002 | 1 | float | |
INFO - 14:45:20: | y_0 | 0 | 0.2003934597112414 | 1 | float | |
INFO - 14:45:20: | y_1 | 0 | 0.5 | 1 | float | |
INFO - 14:45:20: | y_1 | 0 | 0.4151727380322101 | 1 | float | |
INFO - 14:45:20: +-----------+-------------+---------------------+-------------+-------+----------------------+
INFO - 14:45:20: *** End MDOScenario execution (time: 0:00:00.099322) ***
INFO - 14:45:22: Generating HTML XDSM file in : results/coupling/IDF_xdsm.html
INFO - 14:45:24: Make the starting point feasible.
INFO - 14:45:24:
INFO - 14:45:24: *** Start MDOScenario execution ***
INFO - 14:45:24: MDOScenario
INFO - 14:45:24: Disciplines: MainModel SubModel_0 SubModel_1
INFO - 14:45:24: MDO formulation: IDF
INFO - 14:45:24: Optimization problem:
INFO - 14:45:24: minimize obj(x_shared, y_0, y_1)
INFO - 14:45:24: with respect to x_local_0, x_local_1, x_shared, y_0, y_1
INFO - 14:45:24: subject to constraints:
INFO - 14:45:24: cstr_0(x_shared, y_0, y_1) <= [-24.15073611 -2.815194 ]
INFO - 14:45:24: cstr_1(x_shared, y_0, y_1) <= [-2.53275899 0.59384442]
INFO - 14:45:24: y_0: y_0(x_local_0, x_shared, y_1): y_0(x_local_0, x_shared, y_1) - y_0 == 0.0
INFO - 14:45:24: y_1: y_1(x_local_1, x_shared, y_0): y_1(x_local_1, x_shared, y_0) - y_1 == 0.0
INFO - 14:45:24: Solving optimization problem with algorithm NLOPT_SLSQP:
INFO - 14:45:24: ... 0%| | 0/100 [00:00<?, ?it]
INFO - 14:45:25: ... 14%|█▍ | 14/100 [00:00<00:00, 942.32 it/sec, obj=0.5]
INFO - 14:45:25: ... 21%|██ | 21/100 [00:00<00:00, 591.01 it/sec, obj=0.5]
INFO - 14:45:25: Optimization result:
INFO - 14:45:25: Optimizer info:
INFO - 14:45:25: Status: None
INFO - 14:45:25: Message: Successive iterates of the objective function are closer than ftol_rel or ftol_abs. GEMSEO Stopped the driver
INFO - 14:45:25: Number of calls to the objective function by the optimizer: 21
INFO - 14:45:25: Solution:
INFO - 14:45:25: The solution is feasible.
INFO - 14:45:25: Objective: 0.07837467586318368
INFO - 14:45:25: Standardized constraints:
INFO - 14:45:25: cstr_0 + offset = [ 0. -3.92093323]
INFO - 14:45:25: cstr_1 + offset = [-3.95598136e-01 -1.11022302e-16]
INFO - 14:45:25: y_0 = [ 1.66533454e-16 -2.77555756e-17]
INFO - 14:45:25: y_1 = [ 0.00000000e+00 -4.16333634e-17]
INFO - 14:45:25: *** End MDOScenario execution (time: 0:00:00.181867) ***
INFO - 14:45:26: Generating HTML XDSM file in : results/coupling/IDF_xdsm.html
and save the results in a pickle file:
study.save("results.pkl")
We can plot these results and compare MDF and IDF formulations in terms of execution time for different number of local design variables.
results = TMParamSSPost("results.pkl")
results.plot("Comparison of MDF and IDF formulations")


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