doe_generators.py

Case generators for Design-of-Experiments Driver.

class openmdao.drivers.doe_generators.BoxBehnkenGenerator(center=None)[source]

Bases: openmdao.drivers.doe_generators._pyDOE_Generator

DOE case generator implementing the Box-Behnken method.

__init__(center=None)[source]

Initialize the BoxBehnkenGenerator.

Parameters:
center : int, optional

The number of center points to include (default = None).

class openmdao.drivers.doe_generators.CSVGenerator(filename)[source]

Bases: openmdao.drivers.doe_generators.DOEGenerator

DOE case generator that reads cases from a CSV file.

This DOE case generator will accept an existing data set in the form of a CSV file containing DOE cases. The CSV file should have one column per design variable and the header row should have the names of the design variables.

__init__(filename)[source]

Initialize the CSVGenerator.

Parameters:
filename : str

the name of the file from which to read cases

class openmdao.drivers.doe_generators.DOEGenerator[source]

Bases: object

Base class for a callable object that generates cases for a DOEDriver.

__init__($self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

class openmdao.drivers.doe_generators.FullFactorialGenerator(levels=2)[source]

Bases: openmdao.drivers.doe_generators._pyDOE_Generator

DOE case generator implementing the Full Factorial method.

__init__(levels=2)

Initialize the FullFactorialGenerator.

Parameters:
levels : int, optional

The number of evenly spaced levels between each design variable lower and upper bound. Defaults to 2.

class openmdao.drivers.doe_generators.LatinHypercubeGenerator(samples=None, criterion=None, iterations=5, seed=None)[source]

Bases: openmdao.drivers.doe_generators.DOEGenerator

DOE case generator implementing Latin hypercube method via pyDOE2.

__init__(samples=None, criterion=None, iterations=5, seed=None)[source]

Initialize the LatinHypercubeGenerator.

See: https://pythonhosted.org/pyDOE/randomized.html

Parameters:
samples : int, optional

The number of samples to generate for each factor (Defaults to n)

criterion : str, optional

Allowable values are “center” or “c”, “maximin” or “m”, “centermaximin” or “cm”, and “correlation” or “corr”. If no value given, the design is simply randomized.

iterations : int, optional

The number of iterations in the maximin and correlations algorithms (Defaults to 5).

seed : int, optional

Random seed to use if design is randomized. Defaults to None.

class openmdao.drivers.doe_generators.ListGenerator(data=[])[source]

Bases: openmdao.drivers.doe_generators.DOEGenerator

DOE case generator that reads cases from a provided list of DOE cases.

This DOE case generator will accept an existing data set in the form of a list of DOE cases, each of which consists of a collection of name/value pairs specifying values for design variables.

__init__(data=[])[source]

Initialize the ListGenerator.

Parameters:
data : list

list of collections of name, value pairs for the design variables

class openmdao.drivers.doe_generators.PlackettBurmanGenerator[source]

Bases: openmdao.drivers.doe_generators._pyDOE_Generator

DOE case generator implementing the Plackett-Burman method.

__init__()[source]

Initialize the PlackettBurmanGenerator.

class openmdao.drivers.doe_generators.UniformGenerator(num_samples=1, seed=None)[source]

Bases: openmdao.drivers.doe_generators.DOEGenerator

DOE case generator implementing the Uniform method.

__init__(num_samples=1, seed=None)[source]

Initialize the UniformGenerator.

Parameters:
num_samples : int, optional

The number of samples to run. Defaults to 1.

seed : int or None, optional

Seed for randon number generator.