DOE algorithms

In this example, we will discover the different functions of the API related to design of experiments.

from __future__ import absolute_import, division, print_function, unicode_literals

from future import standard_library

from gemseo.api import (
    configure_logger,
    get_algorithm_options_schema,
    get_available_doe_algorithms,
)

configure_logger()

standard_library.install_aliases()

Get available DOE algorithms

The get_available_doe_algorithms() function returns the list of optimization algorithms available in GEMSEO or in external modules

print(get_available_doe_algorithms())

Out:

['CustomDOE', 'DiagonalDOE', 'OT_SOBOL', 'OT_HASELGROVE', 'OT_REVERSE_HALTON', 'OT_HALTON', 'OT_FAURE', 'OT_AXIAL', 'OT_FACTORIAL', 'OT_MONTE_CARLO', 'OT_LHS', 'OT_LHSC', 'OT_RANDOM', 'OT_FULLFACT', 'OT_COMPOSITE', 'OT_SOBOL_INDICES', 'fullfact', 'ff2n', 'pbdesign', 'bbdesign', 'ccdesign', 'lhs']

Get options schema

For a given optimization algorithm, e.g. "DiagonalDOE", we can get the options; e.g.

print(get_algorithm_options_schema("DiagonalDOE"))

Out:

{'name': 'DIAGONALDOE8options', '$schema': 'http://json-schema.org/draft-04/schema', 'type': 'object', 'description': 'Diagonal DOE algorithm', 'properties': {'eval_jac': {'type': 'boolean', 'description': 'evaluate jacobian\n:type eval_jac: bool\n'}, 'n_processes': {'minimum': 1, 'type': 'integer', 'description': 'number of processes\n:type n_processes: int\n'}, 'wait_time_between_samples': {'minimum': 0, 'type': 'number', 'description': 'waiting time between two samples\n:type wait_time_between_samples: float\n'}, 'n_samples': {'minimum': 1, 'type': 'integer', 'description': 'number of samples\n:type n_samples: int\n'}, 'reverse': {'type': 'array', 'description': 'list of dimensions or variables to sample from their\nupper bounds to their lower bounds. Default: None.\n:type reverse: list(str)\n', 'items': {'minItems': 1, 'type': 'string'}}}}

Total running time of the script: ( 0 minutes 0.002 seconds)

Gallery generated by Sphinx-Gallery