Post algorithms options

List of available algorithms: BasicHistory - ConstraintsHistory - Correlations - GradientSensitivity - KMeans - ObjConstrHist - OptHistoryView - ParallelCoordinates - ParetoFront - QuadApprox - RadarChart - Robustness - SOM - ScatterPlotMatrix - VariableInfluence -

BasicHistory

Description

Plot the history of selected constraint, objective and observable functions.

This post-processor requires the names of these selected outputs.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • data_list, array - The names of the variables.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

ConstraintsHistory

Description

Plot of the constraint function history with line charts.

Indicate the violation with color on the background.

The plot method requires the constraint names to plot. It is possible either to save the plot, to show the plot or both.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • constraints_list, array - The names of the constraints.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

Correlations

Description

Scatter plots of the correlated variables.

These variables can be design variables, outputs functions or constraints.

The plot method considers all the variable correlations greater than 95%. Another level value, a sublist of variable names or both can be passed as options. The x- and y-figure sizes can also be modified.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • coeff_limit, number - The plot is not made if the correlation between the variables is lower than this limit.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • func_names, Union[array,null] - The function names subset for which the correlations are computed. If None, all functions are considered.

  • n_plots_x, integer - The number of horizontal plots.

  • n_plots_y, integer - The number of vertical plots.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

GradientSensitivity

Description

Histograms of the derivatives of objective and constraints.

The plot method considers the derivatives at the last iteration. The iteration can be changed, as well as the x and y figure sizes.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of figure in the horizontal direction (inches).

  • figsize_y, number - The size of figure in the vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • iteration, integer - The iteration to plot the sensitivities; if negative, use the optimum.

  • save, boolean - If True, save the figure.

  • scale_gradients, boolean - If True, normalize each gradient w.r.t. the design variables.

  • show, boolean - If True, display the figure.

KMeans

Description

The KMeans post processing performs a k-means clustering on optimization history.

The default number of clusters is 5 and can be modified in option.

The k-means construction depends on the MiniBatchKMeans class of the cluster module of the scikit-learn library .

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • n_clusters, integer -

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

ObjConstrHist

Description

The constraint function history in line charts.

By default, all the constraints are considered. A sublist of constraints can be passed as options.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • constr_names, array - The names of the constraints to plot. If None, use all the constraints.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

OptHistoryView

Description

The OptHistoryView post processing performs separated plots: the design variables history, the objective function history, the history of hessian approximation of the objective, the inequality constraint history, the equality constraint history, and constraints histories.

By default, all design variables are considered. A sublist of design variables can be passed as options. Minimum and maximum values for the plot can be passed as options. The objective function can also be represented in terms of difference w.r.t. the initial value It is possible either to save the plot, to show the plot or both.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • obj_max, number - The maximum value for the objective in the plot. If None, use the maximum value of the objective history.

  • obj_min, number - The minimum value for the objective in the plot. If None, use the minimum value of the objective history.

  • obj_relative, boolean - If True, plot the objective value difference with the initial value.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

  • variables_names, array - The names of the variables to display. If None, use all design variables.

ParallelCoordinates

Description

Parallel coordinates among design variables, outputs functions and constraints.

x- and y- figure sizes can be changed in option.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of the figure in horizontal direction (inches).

  • figsize_y, number - The size of the figure in vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

ParetoFront

Description

Compute the Pareto front Search for all non dominated points.

For each point, check if it exists j such that there is no lower value for obj_values[:,j] that does not degrade at least one other objective obj_values[:,i].

Generate a plot or a matrix of plots if there are more than 2 objectives. Plot in red the locally non dominated points for the currrent two objectives. Plot in green the globally (all objectives) Pareto optimal points.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of figure in the horizontal direction (inches).

  • figsize_y, number - The size of figure in the vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • objectives, array - The functions names or design variables to plot. If None, use the objective function (may be a vector).

  • objectives_labels, array - The labels of the objective components. If None, use the objective name suffixed by an index.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

  • show_non_feasible, boolean - If True, show the non feasible points in the plot.

QuadApprox

Description

Quadratic approximation of a function.

And cuts of the approximation.

The function index can be passed as option.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • extension, string -

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • func_index, integer - The index of the output of interest to be defined if the function has a multidimensional output. If None and if the output is multidimensional, an error is raised.

  • function, string - The function name to build the quadratic approximation.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

RadarChart

Description

Plot on radar style chart a list of constraint functions.

This class has the responsability of plotting on radar style chart a list of constraint functions at a given iteration.

By default, the iteration is the last one. It is possible either to save the plot, to show the plot or both.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • constraints_list, array - The names of the constraints.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of the figure in horizontal direction (inches).

  • figsize_y, number - The size of the figure in vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • iteration, integer - The number of iteration to post-process.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

Robustness

Description

Uncertainty quantification at the optimum.

Compute the quadratic approximations of all the output functions, propagate analytically a normal distribution centered on the optimal design variables with a standard deviation which is a percentage of the mean passed in option (default: 1%) and plot the corresponding output boxplot.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

  • stddev, number - The standard deviation of the inputs as fraction of x bounds.

SOM

Description

Self organizing map clustering optimization history.

Options of the plot method are the figure width and height, and the x- and y- numbers of cells in the SOM.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • annotate, boolean - If True, add label of neuron value to SOM plot.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • height, integer - The height of the figure (in inches).

  • n_x, integer - The number of grids in x.

  • n_y, integer - The number of grids in y.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

  • width, integer - The width of the figure (in inches).

ScatterPlotMatrix

Description

Scatter plot matrix among design variables, output functions and constraints.

The list of variable names has to be passed as arguments of the plot method. x- and y- figure sizes can be changed in option.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of the figure in horizontal direction (inches).

  • figsize_y, number - The size of the figure in vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • save, boolean - If True, save the figure.

  • show, boolean - If True, display the figure.

  • variables_list, array - The functions names or design variables to plot. If the list is empty, plot all design variables.

VariableInfluence

Description

First order variable influence analysis.

This post-processing computes df/dxi * (xi* - xi0) where xi0 is the initial value of the variable and xi* is the optimal value of the variable.

Options of the plot method are the x- and y- figure sizes, the quantile level, the use of a logarithmic scale and the possibility to save the influent variables indices as a NumPy file.

Attributes:

opt_problem (OptimizationProblem): The optimization problem. database (Database): The database generated by the optimization problem. out_data_dict (Dict[Any,Any]): The data dict

to eventually rebuild the plot in another framework.

Options

  • absolute_value, boolean - If True, plot the absolute value of the influence.

  • directory_path, Union[string,null] - The path of the directory to save the figures. If None, use the current working directory.

  • figsize_x, number - The size of the figure in the horizontal direction (inches).

  • figsize_y, number - The size of the figure in the vertical direction (inches).

  • file_extension, Union[string,null] - A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

  • file_name, Union[string,null] - The name of the file to save the figures. If None, use a default one generated by the post-processing.

  • file_path, Union[string,null] - The path of the file to save the figures. If the extension is missing, use file_extension. If None, create a file path from directory_path, file_name and file_extension.

  • log_scale, boolean - If True, use a logarithmic scale.

  • quantile, number - Between 0 and 1, the proportion of the total sensitivity to use as a threshold to filter the variables.

  • save, boolean - If True, save the figure.

  • save_var_files, boolean - If True, save the influent variables indices as a NumPy file.

  • show, boolean - If True, display the figure.