gemseo.scenarios.mdo_scenario module#

A multidisciplinary scenario to be executed by an optimizer.

class MDOScenario(disciplines, objective_name, design_space, name='', maximize_objective=False, formulation_settings_model=None, **formulation_settings)[source]#

Bases: BaseScenario

A multidisciplinary scenario to be executed by an optimizer.

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

Parameters:
  • disciplines (Sequence[Discipline]) -- The disciplines used to compute the objective, constraints and observables from the design variables.

  • objective_name (str | Sequence[str]) -- The name(s) of the discipline output(s) used as objective. If multiple names are passed, the objective will be a vector.

  • design_space (DesignSpace) -- The search space including at least the design variables (some formulations requires additional variables, e.g. IDF with the coupling variables).

  • name (str) --

    The name to be given to this scenario. If empty, use the name of the class.

    By default it is set to "".

  • maximize_objective (bool) --

    Whether to maximize the objective.

    By default it is set to False.

  • formulation_settings_model (BaseFormulationSettings | None) -- The formulation settings as a Pydantic model. If None, use **settings.

  • **formulation_settings (Any) -- The formulation settings, including the formulation name (use the keyword "formulation_name"). These arguments are ignored when settings_model is not None.

Settings Settings(*, algo_name, algo_settings=None)#

Bases: _BaseSettings

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • algo_name (_algo_enum)

  • algo_settings (dict[str, Any])

Return type:

None

algo_name: cls._algo_enum [Required]#

The name of the algorithm.