gemseo.algos.aggregation.core module#
Constraints aggregation core functions.
- compute_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:
- compute_lower_bound_ks_agg(orig_val, indices=None, rho=100.0, scale=1.0)[source]#
Transform a vector of constraint functions into a KS function.
The lower bound Kreisselmeier-Steinhauser function tends to the maximum operator when the aggregation parameter tends to infinity.
- 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:
- compute_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:
- Returns:
The maximum value.
- Return type:
- compute_max_agg_jac(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
- compute_partial_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.
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 Jacobian of IKS function with respect to constraints functions.
- Return type:
ndarray
- compute_partial_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.
- 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
- 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:
- Returns:
The Jacobian of positive sum squared function w.r.t. constraints.
- Return type:
ndarray
- compute_partial_sum_square_agg_jac(orig_val, indices=None, scale=1.0)[source]#
Compute the Jacobian of squared sum function with respect to constraints.
- Parameters:
- Returns:
The Jacobian of squared sum function with respect to constraints.
- Return type:
ndarray
- 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:
- Returns:
The positive sum squared function value.
- Return type:
ndarray
- compute_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:
- Returns:
The sum squared function value.
- Return type:
ndarray
- compute_total_iks_agg_jac(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
- compute_total_ks_agg_jac(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.
- 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
- compute_total_sum_square_agg_jac(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
- 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
- compute_upper_bound_ks_agg(orig_val, indices=None, rho=100.0, scale=1.0)[source]#
Transform a vector of constraint functions into a KS function.
The upper bound Kreisselmeier-Steinhauser function tends to the maximum operator when the aggregation parameter tends to infinity.
- 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: