Scalability study - Process¶
ScalabilityStudy class implements
the concept of scalability study:
By instantiating a
ScalabilityStudy, the user defines the MDO problem in terms of design parameters, objective function and constraints.
The user adds different optimization strategies, defined in terms of both optimization algorithms and MDO formulation.
The user adds different scaling strategies, in terms of sizes of design parameters, coupling variables and equality and inequality constraints. The user can also define a scaling strategies according to particular parameters rather than groups of parameters.
Lastly, the user executes the
ScalabilityStudyand the results are written in several files and stored into directories in a hierarchical way, where names depends on both MDO formulation, scaling strategy and replications when it is necessary. Different kinds of files are stored: optimization graphs, dependency matrix plots and of course, scalability results by means of a dedicated class:
- class gemseo.problems.scalable.data_driven.study.process.ScalabilityStudy(objective, design_variables, directory='study', prefix='', eq_constraints=None, ineq_constraints=None, maximize_objective=False, fill_factor=0.7, active_probability=0.1, feasibility_level=0.8, start_at_equilibrium=True, early_stopping=True, coupling_variables=None)¶
The constructor of the ScalabilityStudy class requires two mandatory arguments:
the list of
Concerning output files, we can specify:
the prefix of output file names (default: no prefix).
Regarding optimization parametrization, we can specify:
the list of equality constraints names (
the list of inequality constraints names (
the choice of maximizing the objective function (
By default, the objective function is minimized and the MDO problem is unconstrained.
Last but not least, with regard to the scalability methodology, we can overwrite:
the default fill factor of the input-output dependency matrix
the probability to set the inequality constraints as active at initial step of the optimization
the offset of satisfaction for inequality constraints
the use of a preliminary MDA to start at equilibrium
the post-processing of the optimization database to get results earlier than final step
objective (str) – name of the objective
directory (str) –
working directory of the study. Default: ‘study’.
By default it is set to “study”.
prefix (str) –
prefix for the output filenames. Default: ‘’.
By default it is set to “”.
maximize_objective (bool) –
maximizing objective. Default: False.
By default it is set to False.
fill_factor (float) –
default fill factor of the input-output dependency matrix. Default: 0.7.
By default it is set to 0.7.
active_probability (float) –
probability to set the inequality constraints as active at initial step of the optimization. Default: 0.1
By default it is set to 0.1.
feasibility_level (float) –
offset of satisfaction for inequality constraints. Default: 0.8.
By default it is set to 0.8.
start_at_equilibrium (bool) –
start at equilibrium using a preliminary MDA. Default: True.
By default it is set to True.
early_stopping (bool) –
post-process the optimization database to get results earlier than final step.
By default it is set to True.
This method adds a disciplinary dataset from a dataset.
data (Dataset) – dataset provided as a dataset.
- add_optimization_strategy(algo, max_iter, formulation='DisciplinaryOpt', algo_options=None, formulation_options=None, top_level_diff='auto')¶
Add both optimization algorithm and MDO formulation, as well as their options.
algo (str) – name of the optimization algorithm.
max_iter (int) – maximum number of iterations for the optimization algorithm.
formulation (str) –
name of the MDO formulation. Default: ‘DisciplinaryOpt’.
By default it is set to “DisciplinaryOpt”.
algo_options (dict) – options of the optimization algorithm.
formulation_options (dict) – options of the MDO formulation.
top_level_diff (str) –
differentiation method for the top level disciplines. Default: ‘auto’.
By default it is set to “auto”.
- add_scaling_strategies(design_size=None, coupling_size=None, eq_cstr_size=None, ineq_cstr_size=None, variables=None)¶
Add different scaling strategies.
Execute the scalability study, one or several times to take into account the random features of the scalable problems.
n_replicates (int) –
number of times the scalability study is repeated. Default: 1.
By default it is set to 1.
- set_fill_factor(discipline, output, fill_factor)¶
- set_input_output_dependency(discipline, output, inputs)¶
Set the dependency between an output and a set of inputs for a given discipline.