gemseo / algos / aggregation

aggregation_func module

Constraint aggregation methods.

Transform a constraint vector into one scalar equivalent or quasi equivalent constraint.

Functions:

aggregate_iks(constr_fct[, indices, rho, scale])

Constraints aggregation method for inequality constraints.

aggregate_ks(constr_fct[, indices, rho, scale])

Aggregate constraints for inequality constraints.

aggregate_max(constr_fct[, indices, scale])

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

aggregate_sum_square(constr_fct[, indices, …])

Transform a vector of equalities into a sum of squared constraints.

check_constraint_type(function_type)

Decorate a function to check whether it is of the expected type.

gemseo.algos.aggregation.aggregation_func.aggregate_iks(constr_fct, indices=None, rho=100.0, scale=1.0)[source]

Constraints aggregation method for inequality constraints.

See :cite:t:`kennedy2015improved`.

Parameters
  • constr_fct (gemseo.core.function.MDOFunction) – The initial constraint function.

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

  • scale (Union[float, numpy.ndarray]) – The scaling factor for multiplying the constraints.

  • rho (float) – The multiplicative parameter in the exponential.

Returns

The aggregated function.

Return type

gemseo.core.function.MDOFunction

gemseo.algos.aggregation.aggregation_func.aggregate_ks(constr_fct, indices=None, rho=100.0, scale=1.0)[source]

Aggregate constraints for inequality constraints.

See :cite:t:`kennedy2015improved` and :cite:t:`kreisselmeier1983application`.

Parameters
  • constr_fct (gemseo.core.function.MDOFunction) – The initial constraint function.

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

  • scale (Union[float, numpy.ndarray]) – The scaling factor for multiplying the constraints.

  • rho (float) – The multiplicative parameter in the exponential.

Returns

The aggregated function.

Return type

gemseo.core.function.MDOFunction

gemseo.algos.aggregation.aggregation_func.aggregate_max(constr_fct, indices=None, scale=1.0)[source]

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

Parameters
  • constr_fct (gemseo.core.function.MDOFunction) – The initial constraint function.

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

  • scale (Union[float, numpy.ndarray]) – The scaling factor for multiplying the constraints.

Returns

The aggregated function.

Return type

gemseo.core.function.MDOFunction

gemseo.algos.aggregation.aggregation_func.aggregate_sum_square(constr_fct, indices=None, scale=1.0)[source]

Transform a vector of equalities into a sum of squared constraints.

Parameters
  • constr_fct (gemseo.core.function.MDOFunction) – The initial constraint function.

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

  • scale (Union[float, numpy.ndarray]) – The scaling factor for multiplying the constraints.

Returns

The aggregated function.

Return type

gemseo.core.function.MDOFunction

gemseo.algos.aggregation.aggregation_func.check_constraint_type(function_type)[source]

Decorate a function to check whether it is of the expected type.

Parameters

function_type (str) – The expected function type, "ineq" or "eq".

Returns

The decorated function.

Return type

Callable[[Callable[[Any], Any]], Callable[[Any], Any]]