gemseo.algos.aggregation.aggregation_func module#
Constraint aggregation methods.
Transform a constraint vector into one scalar equivalent or quasi equivalent constraint.
- aggregate_iks(constr_fct, indices=None, rho=100.0, scale=1.0, output_suffix='')[source]#
Constraints aggregation method for inequality constraints.
See [KH15].
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
rho (float) --
The multiplicative parameter in the exponential.
By default it is set to 100.0.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type:
- aggregate_lower_bound_ks(constr_fct, indices=None, rho=100.0, scale=1.0, output_suffix='')[source]#
Aggregate constraints for inequality constraints.
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
rho (float) --
The multiplicative parameter in the exponential.
By default it is set to 100.0.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type:
- aggregate_max(constr_fct, indices=None, scale=1.0, output_suffix='')[source]#
Transform a vector of equalities into a max of all values.
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type:
- aggregate_positive_sum_square(constr_fct, indices=None, scale=1.0, output_suffix='')[source]#
Transform a vector of equalities into a sum of squared constraints.
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type:
- aggregate_sum_square(constr_fct, indices=None, scale=1.0, output_suffix='')[source]#
Transform a vector of equalities into a sum of squared constraints.
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type:
- aggregate_upper_bound_ks(constr_fct, indices=None, rho=100.0, scale=1.0, output_suffix='')[source]#
Aggregate constraints for inequality constraints.
- Parameters:
constr_fct (MDOFunction) -- The initial constraint function.
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.
rho (float) --
The multiplicative parameter in the exponential.
By default it is set to 100.0.
output_suffix (str) --
The suffix to add to the output names. Useful for cases in which the same aggregation method is used multiple times on the same constraint function.
By default it is set to "".
- Returns:
The aggregated function.
- Return type: