gemseo / algos / aggregation

# core module¶

Constraints aggregation core functions.

Functions:

 iks_agg(orig_val[, indices, rho, scale]) Aggregate IKS Constraints for inequality constraints. iks_agg_jac(orig_val[, indices, rho, scale]) Jacobian of the IKS Constraints aggregation method for inequality constraints. iks_agg_jac_v(orig_val, orig_jac[, indices, …]) Aggregate inequality constraints. ks_agg(orig_val[, indices, rho, scale]) Transform a vector of equalities into a Kreisselmeier–Steinhauser function. ks_agg_jac(orig_val[, indices, rho, scale]) Transform a vector of equalities into a scalar equivalent constraint. ks_agg_jac_v(orig_val, orig_jac[, indices, …]) Aggregate inequality constraints. max_agg(orig_val[, indices, scale]) Transform a vector of equalities into a max of all values. max_agg_jac_v(orig_val, orig_jac[, indices, …]) Transform a vector of equalities into the max of all the values. sum_square_agg(orig_val[, indices, scale]) Transform a vector of equalities into a sum of squared constraints. sum_square_agg_jac(orig_val[, indices, scale]) Transform a vector of equalities into a sum of squared constraints. sum_square_agg_jac_v(orig_val, orig_jac[, …]) Transform a vector of equalities into a sum of squared constraints.
gemseo.algos.aggregation.core.iks_agg(orig_val, indices=None, rho=100.0, scale=1.0)[source]

Aggregate IKS Constraints for inequality constraints.

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

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated value.

Return type

float

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

Jacobian of the IKS Constraints aggregation method for inequality constraints.

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 (numpy.ndarray) – The original constraint values.

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated function Jacobian.

Return type

numpy.ndarray

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

Aggregate inequality constraints.

Jacobian vector product of the IKS Constraints aggregation method for inequality constraints.

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

• orig_jac (numpy.ndarray) – The original constraint jacobian.

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated function Jacobian vector product.

Return type

numpy.ndarray

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

Transform a vector of equalities into a Kreisselmeier–Steinhauser function.

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 (numpy.ndarray) – The original constraint values.

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated function value.

Return type

float

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

Transform a vector of equalities into a scalar equivalent constraint.

Jacobian of the Constraints aggregation method for inequality constraints.

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

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated function Jacobian.

Return type

numpy.ndarray

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

Aggregate inequality constraints.

Jacobian vector product of the constraints aggregation method for inequality constraints.

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

• orig_jac (numpy.ndarray) – The original constraint jacobian.

• indices (Optional[Sequence[int]]) – 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.

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

Returns

The aggregated function Jacobian vector product.

Return type

numpy.ndarray

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

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

Constraints aggregation method for inequality constraints.

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

• 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

float

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

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

Jacobian vector product of the max constraints aggregation method for inequality constraints.

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

• orig_jac (numpy.ndarray) – The original constraint jacobian.

• 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

numpy.ndarray

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

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

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

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

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

Returns

The aggregated function.

Return type

numpy.ndarray

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

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

Jacobian of the constraints aggregation method for equality constraints.

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

• 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 Jacobian.

Return type

numpy.ndarray

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

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

Jacobian vector product of the constraints aggregation method for equality constraints.

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

• orig_jac (numpy.ndarray) – The original constraint jacobian.

• 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 Jacobian vector product.

Return type

numpy.ndarray