gemseo / problems / scalable / data_driven

# api module¶

## Scalability study - API¶

This API facilitates the use of the gemseo.problems.scalable.data_driven.study package implementing classes to benchmark MDO formulations based on scalable disciplines.

ScalabilityStudy class implements the concept of scalability study:

1. By instantiating a ScalabilityStudy, the user defines the MDO problem in terms of design parameters, objective function and constraints.

2. For each discipline, the user adds a dataset stored in a Dataset and select a type of ScalableModel to build the ScalableDiscipline associated with this discipline.

3. The user adds different optimization strategies, defined in terms of both optimization algorithms and MDO formulation.

4. 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.

5. Lastly, the user executes the ScalabilityStudy and the results are written in several files and stored into directories in a hierarchical way, where names depend 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: ScalabilityResult.

gemseo.problems.scalable.data_driven.api.create_scalability_study(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)[source]

This method creates a ScalabilityStudy. It requires two mandatory arguments:

• the 'objective' name,

• the list of 'design_variables' names.

Concerning output files, we can specify:

• the directory which is 'study' by default,

• the prefix of output file names (default: no prefix).

Regarding optimization parametrization, we can specify:

• the list of equality constraints names (eq_constraints),

• the list of inequality constraints names (ineq_constraints),

• the choice of maximizing the objective function (maximize_objective).

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 ineq_constraints,

• the probability to set the inequality constraints as active at initial step of the optimization active_probability,

• the offset of satisfaction for inequality constraints feasibility_level,

• the use of a preliminary MDA to start at equilibrium start_at_equilibrium,

• the post-processing of the optimization database to get results earlier than final step early_stopping.

Parameters:
• objective (str) – name of the objective

• design_variables (list(str)) – names of the design variables

• 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 “”.

• eq_constraints (list(str)) – names of the equality constraints. Default: None.

• ineq_constraints (list(str)) – names of the inequality constraints Default: None.

• 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.

gemseo.problems.scalable.data_driven.api.plot_scalability_results(study_directory)[source]

This method plots the set of ScalabilityResult generated by a ScalabilityStudy and located in the directory created by this study.

Parameters:

study_directory (str) – directory of the scalability study.

Scalable study

Scalable study

Scalable study

Scalable study