gemseo.formulations.base_formulation_settings module#

Base class for the settings of the formulations.

Settings BaseFormulationSettings(*, differentiated_input_names_substitute=())[source]#

Bases: BaseModel

Base class for the settings of the formulations.

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:

differentiated_input_names_substitute (Sequence[str]) --

By default it is set to ().

Return type:

None

differentiated_input_names_substitute: Sequence[str] = ()#

The names of the discipline inputs with respect to 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.

model_post_init(context, /)#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that's what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) -- The BaseModel instance.

  • context (Any) -- The context.

Return type:

None