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__(self, center=None)[source]

Initialize the BoxBehnkenGenerator.

Parameters
centerint, 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__(self, filename)[source]

Initialize the CSVGenerator.

Parameters
filenamestr

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__(self, levels=2)

Initialize the FullFactorialGenerator.

Parameters
levelsint, 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__(self, samples=None, criterion=None, iterations=5, seed=None)[source]

Initialize the LatinHypercubeGenerator.

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

Parameters
samplesint, optional

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

criterionstr, 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.

iterationsint, optional

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

seedint, 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__(self, data=[])[source]

Initialize the ListGenerator.

Parameters
datalist

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__(self)[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__(self, num_samples=1, seed=None)[source]

Initialize the UniformGenerator.

Parameters
num_samplesint, optional

The number of samples to run. Defaults to 1.

seedint or None, optional

Seed for randon number generator.