hydesign.Parallel_EGO

Created on Fri Feb 17 12:44:06 2023

@author: mikf & jumu

Attributes

smt_version

name

Classes

ParallelEvaluator

Implement Evaluator interface using multiprocessing Pool object (Python 3 only).

EfficientGlobalOptimizationDriver

Top-level container for the systems and drivers.

Functions

LCB(sm, point)

Lower confidence bound optimization: minimize by using mu - 3*sigma

EI(sm, point[, fmin])

Negative Expected improvement

KStd(sm, point)

Lower confidence bound optimization: minimize by using mu - 3*sigma

KB(sm, point)

Mean GP process

get_sm(xdoe, ydoe[, theta_bounds, n_comp])

Function that trains the surrogate and uses it to predict on random input points

eval_sm(sm, mixint[, scaler, seed, npred, fmin])

Function that predicts the xepected improvement (EI) of the surrogate model based on random input points

opt_sm_EI(sm, mixint, x0[, fmin, n_seed])

Function that optimizes the surrogate's expected improvement

opt_sm(sm, mixint, x0[, fmin])

Function that optimizes the surrogate based on lower confidence bound predictions

get_candiate_points(x, y[, quantile, n_clusters])

Function that groups the surrogate evaluations bellow a quantile level (quantile) and

extreme_around_point(x)

perturbe_around_point(x[, step])

get_design_vars(variables)

get_limits(variables[, design_var])

drop_duplicates(x, y[, decimals])

concat_to_existing(x, y, xnew, ynew)

surrogate_optimization(inputs)

surrogate_evaluation(inputs)

get_xlimits(variables[, design_var])

get_xtypes(variables[, design_var])

cast_to_mixint(x, variables)

get_mixint_context(variables[, seed, criterion])

get_sampling(mixint, seed[, criterion])

expand_x_for_model_eval(x, kwargs)

model_evaluation(inputs)

check_types(kwargs)

Module Contents

hydesign.Parallel_EGO.smt_version[source]
hydesign.Parallel_EGO.LCB(sm, point)[source]

Lower confidence bound optimization: minimize by using mu - 3*sigma

hydesign.Parallel_EGO.EI(sm, point, fmin=1000.0)[source]

Negative Expected improvement

hydesign.Parallel_EGO.KStd(sm, point)[source]

Lower confidence bound optimization: minimize by using mu - 3*sigma

hydesign.Parallel_EGO.KB(sm, point)[source]

Mean GP process

hydesign.Parallel_EGO.get_sm(xdoe, ydoe, theta_bounds=[1e-06, 20.0], n_comp=4)[source]

Function that trains the surrogate and uses it to predict on random input points

Parameters:
  • xdoe (design of exeriments (DOE) in the inputs. [Ndoe, Ndims])

  • ydoe (model outputs at DOE. [Ndoe, 1])

  • theta_bounds (Bounds for the hyperparameter optimization.) – The theta parameter of the kernel function represnet an inverse squared length scale: the largest the number the faster the kernel decays to 0. Suggestion: theta_bounds = [1e-3, 1e2].

  • n_comp (Number of components of a PCA applied to the hyperparameters; note that there is a theta per dimension.) – Note that for problems with large number of dimensions (Ndims>10) might require a n_comp in [3,5]. Default value is n_comp = 1.

hydesign.Parallel_EGO.eval_sm(sm, mixint, scaler=None, seed=0, npred=1000.0, fmin=10000000000.0)[source]

Function that predicts the xepected improvement (EI) of the surrogate model based on random input points

hydesign.Parallel_EGO.opt_sm_EI(sm, mixint, x0, fmin=10000000000.0, n_seed=0)[source]

Function that optimizes the surrogate’s expected improvement

hydesign.Parallel_EGO.opt_sm(sm, mixint, x0, fmin=10000000000.0)[source]

Function that optimizes the surrogate based on lower confidence bound predictions

hydesign.Parallel_EGO.get_candiate_points(x, y, quantile=0.25, n_clusters=32)[source]

Function that groups the surrogate evaluations bellow a quantile level (quantile) and clusters them in n clusters (n_clusters) and returns the best input location (x) per cluster for acutal model evaluation

hydesign.Parallel_EGO.extreme_around_point(x)[source]
hydesign.Parallel_EGO.perturbe_around_point(x, step=0.1)[source]
hydesign.Parallel_EGO.get_design_vars(variables)[source]
hydesign.Parallel_EGO.get_limits(variables, design_var=[])[source]
hydesign.Parallel_EGO.drop_duplicates(x, y, decimals=3)[source]
hydesign.Parallel_EGO.concat_to_existing(x, y, xnew, ynew)[source]
hydesign.Parallel_EGO.surrogate_optimization(inputs)[source]
hydesign.Parallel_EGO.surrogate_evaluation(inputs)[source]
hydesign.Parallel_EGO.get_xlimits(variables, design_var=[])[source]
hydesign.Parallel_EGO.get_xtypes(variables, design_var=[])[source]
hydesign.Parallel_EGO.cast_to_mixint(x, variables)[source]
hydesign.Parallel_EGO.get_mixint_context(variables, seed=None, criterion='maximin')[source]
hydesign.Parallel_EGO.get_sampling(mixint, seed, criterion='maximin')[source]
hydesign.Parallel_EGO.expand_x_for_model_eval(x, kwargs)[source]
hydesign.Parallel_EGO.model_evaluation(inputs)[source]
class hydesign.Parallel_EGO.ParallelEvaluator(n_procs=31)[source]

Bases: smt.applications.ego.Evaluator

Implement Evaluator interface using multiprocessing Pool object (Python 3 only).

n_procs = 31[source]
run_ydoe(fun, x, **kwargs)[source]
run_both(fun, i, **kwargs)[source]
run_xopt_iter(fun, x, **kwargs)[source]
hydesign.Parallel_EGO.check_types(kwargs)[source]
class hydesign.Parallel_EGO.EfficientGlobalOptimizationDriver(**kwargs)[source]

Bases: openmdao.core.driver.Driver

Top-level container for the systems and drivers.

Parameters:

**kwargs (dict of keyword arguments) – Keyword arguments that will be mapped into the Driver options.

iter_count[source]

Keep track of iterations for case recording.

Type:

int

options[source]

Dictionary with general pyoptsparse options.

Type:

<OptionsDictionary>

recording_options[source]

Dictionary with driver recording options.

Type:

<OptionsDictionary>

cite[source]

Listing of relevant citations that should be referenced when publishing work that uses this class.

Type:

str

_problem[source]

Pointer to the containing problem.

Type:

weakref to <Problem>

supports[source]

Provides a consistent way for drivers to declare what features they support.

Type:

<OptionsDictionary>

_designvars[source]

Contains all design variable info.

Type:

dict

_designvars_discrete[source]

List of design variables that are discrete.

Type:

list

_dist_driver_vars

Dict of constraints that are distributed outputs. Key is a ‘user’ variable name, typically promoted name or an alias. Values are (local indices, local sizes).

Type:

dict

_cons[source]

Contains all constraint info.

Type:

dict

_objs[source]

Contains all objective info.

Type:

dict

_responses[source]

Contains all response info.

Type:

dict

_lin_dvs[source]

Contains design variables relevant to linear constraints.

Type:

dict

_nl_dvs[source]

Contains design variables relevant to nonlinear constraints.

Type:

dict

_remote_dvs

Dict of design variables that are remote on at least one proc. Values are (owning rank, size).

Type:

dict

_remote_cons

Dict of constraints that are remote on at least one proc. Values are (owning rank, size).

Type:

dict

_remote_objs

Dict of objectives that are remote on at least one proc. Values are (owning rank, size).

Type:

dict

_rec_mgr[source]

Object that manages all recorders added to this driver.

Type:

<RecordingManager>

_coloring_info[source]

Metadata pertaining to total coloring.

Type:

dict

_total_jac_format[source]

Specifies the format of the total jacobian. Allowed values are ‘flat_dict’, ‘dict’, and ‘array’.

Type:

str

_con_subjacs[source]

Dict of sparse subjacobians for use with certain optimizers, e.g. pyOptSparseDriver. Keyed by sources and aliases.

Type:

dict

_total_jac[source]

Cached total jacobian handling object.

Type:

_TotalJacInfo or None

_total_jac_linear[source]

Cached linear total jacobian handling object.

Type:

_TotalJacInfo or None

result[source]

DriverResult object containing information for use in the optimization report.

Type:

DriverResult

_has_scaling[source]

If True, scaling has been set for this driver.

Type:

bool

kwargs[source]
_declare_options()[source]

Declare options before kwargs are processed in the init method.

run()[source]

Execute this driver.

The base Driver just runs the model. All other drivers overload this method.

Returns:

Failure flag; True if failed to converge, False is successful.

Return type:

bool

hydesign.Parallel_EGO.name = 'France_good_wind'[source]