gemseo / algos / aggregation

core module

Constraints aggregation core functions.

gemseo.algos.aggregation.core.compute_partial_sum_positive_square_agg_jac(orig_val, indices=None, scale=1.0)[source]

Compute the Jacobian of positive sum squared function w.r.t. constraints.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of positive sum squared function w.r.t. constraints.

Return type:

ndarray

gemseo.algos.aggregation.core.compute_sum_positive_square_agg(orig_val, indices=None, scale=1.0)[source]

Transform a vector of constraint functions into a positive sum squared function.

The positive sum squared function is the sum of the squares of the input vector

components that are positive.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, scale all the constraint values.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The positive sum squared function value.

Return type:

ndarray

gemseo.algos.aggregation.core.compute_total_sum_square_positive_agg_jac(orig_val, orig_jac, indices=None, scale=1.0)[source]

Compute the Jacobian of positive sum squared function w.r.t. constraints inputs.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • orig_jac (ndarray) – The original constraint jacobian.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of positive sum squared function w.r.t. constraints inputs.

Return type:

ndarray

gemseo.algos.aggregation.core.iks_agg(orig_val, indices=None, rho=100.0, scale=1.0)[source]

Transform a vector of constraint functions into an induces exponential function.

The induces exponential function (IKS) tends to the maximum operator when

the aggregation parameter tends to infinity.

See [KH15].

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The multiplicative parameter in the exponential.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The IKS function value.

Return type:

float

gemseo.algos.aggregation.core.iks_agg_jac(orig_val, indices=None, rho=100.0, scale=1.0)[source]

Compute the Jacobian of IKS function with respect to constraints functions.

Kennedy, Graeme J., and Jason E. Hicken. “Improved constraint-aggregation methods.” Computer Methods in Applied Mechanics and Engineering 289 (2015): 332-354.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The multiplicative parameter in the exponential.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of IKS function with respect to constraints functions.

Return type:

ndarray

gemseo.algos.aggregation.core.iks_agg_jac_v(orig_val, orig_jac, indices=None, rho=100.0, scale=1.0)[source]

Compute the Jacobian of IKS function with respect to constraints inputs.

See [KH15].

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • orig_jac (ndarray) – The original constraint jacobian.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The multiplicative parameter in the exponential.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of IKS function with respect to constraints inputs.

Return type:

ndarray

gemseo.algos.aggregation.core.ks_agg(orig_val, indices=None, rho=100.0, scale=1.0)[source]

Transform a vector of constraint functions into a KS function.

The Kreisselmeier–Steinhauser function tends to the maximum operator

when the aggregation parameter tends to infinity.

Kreisselmeier G, Steinhauser R (1983) Application of Vector Performance Optimization to a Robust Control Loop Design for a Fighter Aircraft. International Journal of Control 37(2):251–284, doi:10.1080/00207179.1983.9753066

Graeme J. Kennedy, Jason E. Hicken, Improved constraint-aggregation methods, Computer Methods in Applied Mechanics and Engineering, Volume 289, 2015, Pages 332-354, ISSN 0045-7825, https://doi.org/10.1016/j.cma.2015.02.017. (http://www.sciencedirect.com/science/article/pii/S0045782515000663)

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The aggregation parameter.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The KS function value.

Return type:

float

gemseo.algos.aggregation.core.ks_agg_jac(orig_val, indices=None, rho=100.0, scale=1.0)[source]

Compute the Jacobian of KS function with respect to constraint functions.

See [KH15] and [KS83].

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The multiplicative parameter in the exponential.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of KS function with respect to constraint functions.

Return type:

ndarray

gemseo.algos.aggregation.core.ks_agg_jac_v(orig_val, orig_jac, indices=None, rho=100.0, scale=1.0)[source]

Compute the Jacobian of KS function with respect to constraint function inputs.

See [KH15] and [KS83].

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • orig_jac (ndarray) – The original constraint jacobian.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • rho (float) –

    The multiplicative parameter in the exponential.

    By default it is set to 100.0.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of KS function with respect to constraint function inputs.

Return type:

ndarray

gemseo.algos.aggregation.core.max_agg(orig_val, indices=None, scale=1.0)[source]

Transform a vector of constraints into a max of all values.

The maximum function is not differentiable for all input values.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The maximum value.

Return type:

float

gemseo.algos.aggregation.core.max_agg_jac_v(orig_val, orig_jac, indices=None, scale=1.0)[source]

Compute the Jacobian of max function with respect to constraints inputs.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • orig_jac (ndarray) – The original constraint jacobian.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of max function with respect to constraints inputs.

Return type:

ndarray

gemseo.algos.aggregation.core.sum_square_agg(orig_val, indices=None, scale=1.0)[source]

Transform a vector of constraint functions into a sum squared function.

The sum squared function is the sum of the squares of the input vector components.

Parameters:
  • orig_val (ndarray) – The input vector.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, scale all the constraint values.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The sum squared function value.

Return type:

ndarray

gemseo.algos.aggregation.core.sum_square_agg_jac(orig_val, indices=None, scale=1.0)[source]

Compute the Jacobian of squared sum function with respect to constraints.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of squared sum function with respect to constraints.

Return type:

ndarray

gemseo.algos.aggregation.core.sum_square_agg_jac_v(orig_val, orig_jac, indices=None, scale=1.0)[source]

Compute the Jacobian of squared sum function with respect to constraints inputs.

Parameters:
  • orig_val (ndarray) – The original constraint values.

  • orig_jac (ndarray) – The original constraint jacobian.

  • indices (Sequence[int] | None) – The indices to generate a subset of the outputs to aggregate. If None, aggregate all the outputs.

  • scale (float | ndarray) –

    The scaling factor for multiplying the constraints.

    By default it is set to 1.0.

Returns:

The Jacobian of squared sum function with respect to constraints inputs.

Return type:

ndarray