.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/api/plot_doe.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_api_plot_doe.py: DOE algorithms ============== In this example, we will discover the different functions of the API related to design of experiments. .. GENERATED FROM PYTHON SOURCE LINES 29-39 .. code-block:: Python from __future__ import annotations from gemseo import configure_logger from gemseo import get_algorithm_options_schema from gemseo import get_available_doe_algorithms configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 40-45 Get available DOE algorithms ---------------------------- The :func:`.get_available_doe_algorithms` function returns the list of optimization algorithms available in |g| or in external modules .. GENERATED FROM PYTHON SOURCE LINES 45-47 .. code-block:: Python get_available_doe_algorithms() .. rst-class:: sphx-glr-script-out .. code-block:: none ['CustomDOE', 'DiagonalDOE', 'OT_SOBOL', 'OT_RANDOM', 'OT_HASELGROVE', 'OT_REVERSE_HALTON', 'OT_HALTON', 'OT_FAURE', 'OT_MONTE_CARLO', 'OT_FACTORIAL', 'OT_COMPOSITE', 'OT_AXIAL', 'OT_OPT_LHS', 'OT_LHS', 'OT_LHSC', 'OT_FULLFACT', 'OT_SOBOL_INDICES', 'fullfact', 'ff2n', 'pbdesign', 'bbdesign', 'ccdesign', 'lhs', 'Halton', 'LHS', 'MC', 'PoissonDisk', 'Sobol'] .. GENERATED FROM PYTHON SOURCE LINES 48-52 Get options schema ------------------ For a given optimization algorithm, e.g. ``"DiagonalDOE"``, we can get the options; e.g. .. GENERATED FROM PYTHON SOURCE LINES 52-53 .. code-block:: Python get_algorithm_options_schema("DiagonalDOE") .. rst-class:: sphx-glr-script-out .. code-block:: none {'$schema': 'http://json-schema.org/draft-04/schema', 'additionalProperties': False, 'description': 'Diagonal DOE algorithm', 'type': 'object', 'properties': {'normalize_design_space': {'type': 'boolean'}, 'round_ints': {'type': 'boolean'}, 'use_database': {'type': 'boolean'}, 'reset_iteration_counters': {'type': 'boolean'}, 'eval_jac': {'description': 'Whether to evaluate the Jacobian.', 'type': 'boolean'}, 'n_processes': {'minimum': 1, 'description': 'The maximum simultaneous number of processes\nused to parallelize the execution.', 'type': 'integer'}, 'wait_time_between_samples': {'minimum': 0, 'description': 'The waiting time between two samples.', 'type': 'number'}, 'n_samples': {'minimum': 2, 'description': 'The number of samples.\nThe number of samples must be greater than or equal to 2.', 'type': 'integer'}, 'max_time': {'minimum': 0.0, 'description': 'The maximum runtime in seconds.\nIf 0, no maximum runtime is set.', 'type': 'number'}, 'reverse': {'anyOf': [{'description': 'The dimensions or variables to sample from their upper bounds to\ntheir lower bounds.\nIf ``None``, every dimension will be sampled from its lower bound to its\nupper bound.', 'type': 'null'}, {'description': 'The dimensions or variables to sample from their upper bounds to\ntheir lower bounds.\nIf ``None``, every dimension will be sampled from its lower bound to its\nupper bound.', 'type': 'array', 'items': {'minItems': 1, 'type': 'string'}}]}, 'callbacks': {'description': 'The functions to be evaluated\nafter each call to :meth:`.OptimizationProblem.evaluate_functions`;\nto be called as ``callback(index, (output, jacobian))``.'}}, 'required': ['n_samples']} .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.004 seconds) .. _sphx_glr_download_examples_api_plot_doe.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_doe.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_doe.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_