MDO formulations#

Warning

Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.

Warning

All the features of the wrapped libraries may not be exposed through GEMSEO.

Note

The algorithm settings can be passed to a function of the form

function(..., settings_model: Base | None = None, **settings: Any)

either one by one:

function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)

or using the argument name "settings" and the Pydantic model associated with the algorithm:

settings = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
function(..., settings_model=settings)

BiLevel#

Module: gemseo.formulations.bilevel

from gemseo.settings.formulations import BiLevel_Settings

Optional settings
  • apply_cstr_to_system : <class 'bool'>, optional

    Whether the add_constraint() method adds the constraint to the optimization problem of the system scenario.

    By default it is set to True.

  • apply_cstr_tosub_scenarios : <class 'bool'>, optional

    Whether the add_constraint() method adds the constraint to the optimization problem of the sub-scenario capable of computing the constraint.

    By default it is set to True.

  • differentiated_input_names_substitute : collections.abc.Sequence[str], optional

    The names of the discipline inputs against which to differentiate the discipline outputs used as objective, constraints and observables. If empty, consider the inputs of these functions. More precisely, for each function, an MDOFunction is built from the disciplines, which depend on input variables \(x_1,\ldots,x_d,x_{d+1}\), and over an input space spanned by the input variables \(x_1,\ldots,x_d\) and depending on both the MDO formulation and the design_space. Then, the methods MDOFunction.evaluate() and MDOFunction.jac() are called at a given point of the input space and return the output value and the Jacobian matrix, i.e. the matrix concatenating the partial derivatives with respect to the inputs \(x_1,\ldots,x_d\) at this point of the input space. This argument can be used to compute the matrix concatenating the partial derivatives at the same point of the input space but with respect to custom inputs, e.g. \(x_{d-1}\) and \(x_{d+1}\). Mathematically speaking, this matrix returned by MDOFunction.jac() is no longer a Jacobian.

    By default it is set to ().

  • main_mda_name : <class 'str'>, optional

    The name of the class of the main MDA.

    Typically the MDAChain, but one can force to use MDAGaussSeidel for instance.

    By default it is set to MDAChain.

  • main_mda_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.mda.base_mda_settings.BaseMDASettings], optional

    The settings of the main MDA.

    These settings may include those of the inner-MDA.

    By default it is set to {}.

  • multithread_scenarios : <class 'bool'>, optional

    If True and parallel_scenarios=True, the sub-scenarios are run in parallel using multi-threading; if False and parallel_scenarios=True, multiprocessing is used.

    By default it is set to True.

  • parallel_scenarios : <class 'bool'>, optional

    Whether to run the sub-scenarios in parallel.

    By default it is set to False.

  • reset_x0_before_opt : <class 'bool'>, optional

    Whether to restart the sub optimizations from the initial guesses, otherwise warm start them.

    By default it is set to False.

  • sub_scenarios_log_level : typing.Optional[int], optional

    The level of the root logger during the sub-scenarios executions. If None, do not change the level of the root logger.

    By default it is set to None.

DisciplinaryOpt#

Module: gemseo.formulations.disciplinary_opt

from gemseo.settings.formulations import DisciplinaryOpt_Settings

Optional settings
  • differentiated_input_names_substitute : collections.abc.Sequence[str], optional

    The names of the discipline inputs against which to differentiate the discipline outputs used as objective, constraints and observables. If empty, consider the inputs of these functions. More precisely, for each function, an MDOFunction is built from the disciplines, which depend on input variables \(x_1,\ldots,x_d,x_{d+1}\), and over an input space spanned by the input variables \(x_1,\ldots,x_d\) and depending on both the MDO formulation and the design_space. Then, the methods MDOFunction.evaluate() and MDOFunction.jac() are called at a given point of the input space and return the output value and the Jacobian matrix, i.e. the matrix concatenating the partial derivatives with respect to the inputs \(x_1,\ldots,x_d\) at this point of the input space. This argument can be used to compute the matrix concatenating the partial derivatives at the same point of the input space but with respect to custom inputs, e.g. \(x_{d-1}\) and \(x_{d+1}\). Mathematically speaking, this matrix returned by MDOFunction.jac() is no longer a Jacobian.

    By default it is set to ().

IDF#

Module: gemseo.formulations.idf

from gemseo.settings.formulations import IDF_Settings

Optional settings
  • differentiated_input_names_substitute : collections.abc.Sequence[str], optional

    The names of the discipline inputs against which to differentiate the discipline outputs used as objective, constraints and observables. If empty, consider the inputs of these functions. More precisely, for each function, an MDOFunction is built from the disciplines, which depend on input variables \(x_1,\ldots,x_d,x_{d+1}\), and over an input space spanned by the input variables \(x_1,\ldots,x_d\) and depending on both the MDO formulation and the design_space. Then, the methods MDOFunction.evaluate() and MDOFunction.jac() are called at a given point of the input space and return the output value and the Jacobian matrix, i.e. the matrix concatenating the partial derivatives with respect to the inputs \(x_1,\ldots,x_d\) at this point of the input space. This argument can be used to compute the matrix concatenating the partial derivatives at the same point of the input space but with respect to custom inputs, e.g. \(x_{d-1}\) and \(x_{d+1}\). Mathematically speaking, this matrix returned by MDOFunction.jac() is no longer a Jacobian.

    By default it is set to ().

  • mda_chain_settings_for_start_at_equilibrium : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.mda.mda_chain_settings.MDAChain_Settings], optional

    The settings for the MDA when start_at_equilibrium=True.

    See detailed settings in MDAChain.

    By default it is set to {}.

  • n_processes : <class 'int'>, optional

    The maximum simultaneous number of threads if use_threading is True, or processes otherwise, used to parallelize the execution.

    By default it is set to 1.

  • normalize_constraints : <class 'bool'>, optional

    Whether the outputs of the coupling consistency constraints are scaled.

    By default it is set to True.

  • start_at_equilibrium : <class 'bool'>, optional

    Whether an MDA is used to initialize the coupling variables.

    By default it is set to False.

  • use_threading : <class 'bool'>, optional

    Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory. This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.

    By default it is set to True.

MDF#

Module: gemseo.formulations.mdf

from gemseo.settings.formulations import MDF_Settings

Optional settings
  • differentiated_input_names_substitute : collections.abc.Sequence[str], optional

    The names of the discipline inputs against which to differentiate the discipline outputs used as objective, constraints and observables. If empty, consider the inputs of these functions. More precisely, for each function, an MDOFunction is built from the disciplines, which depend on input variables \(x_1,\ldots,x_d,x_{d+1}\), and over an input space spanned by the input variables \(x_1,\ldots,x_d\) and depending on both the MDO formulation and the design_space. Then, the methods MDOFunction.evaluate() and MDOFunction.jac() are called at a given point of the input space and return the output value and the Jacobian matrix, i.e. the matrix concatenating the partial derivatives with respect to the inputs \(x_1,\ldots,x_d\) at this point of the input space. This argument can be used to compute the matrix concatenating the partial derivatives at the same point of the input space but with respect to custom inputs, e.g. \(x_{d-1}\) and \(x_{d+1}\). Mathematically speaking, this matrix returned by MDOFunction.jac() is no longer a Jacobian.

    By default it is set to ().

  • main_mda_name : <class 'str'>, optional

    The name of the class of the main MDA.

    Typically the MDAChain, but one can force to use MDAGaussSeidel for instance.

    By default it is set to MDAChain.

  • main_mda_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.mda.base_mda_settings.BaseMDASettings], optional

    The settings of the main MDA.

    These settings may include those of the inner-MDA.

    By default it is set to {}.