RealBounds#

class ioh.iohcpp.RealBounds#

Bases: AbstractRealConstraint

Problem Bounds, defined as a Box Constraint

Parameters:
  • lb (list) – the lower bound of the search space/domain

  • ub (list) – the upper bound of the search space/domain

  • enforced (ConstraintEnforcement) – whether the constraint should be enforced

Problem Bounds, defined as a Box Constraint

Parameters:
  • size (int) – The size of the problem

  • lb (float) – the lower bound of the search space/domain

  • ub (float) – the upper bound of the search space/domain

  • enforced (ConstraintEnforcement) – whether the constraint should be enforced

Attributes Summary

enforced

The type of constraint enforcement applied.

exponent

The exponent for this constraint

lb

The lower bound (box constraint)

ub

The upper bound (box constraint)

weight

The weight given to this constraint

Methods Summary

__call__(self, arg0, arg1)

compute_violation

Check if a point is within the bounds or not.

is_feasible(self, arg0)

penalize(self, arg0)

penalty(self)

violation(self)

Attributes Documentation

enforced#

The type of constraint enforcement applied.

exponent#

The exponent for this constraint

lb#

The lower bound (box constraint)

ub#

The upper bound (box constraint)

weight#

The weight given to this constraint

Methods Documentation

__call__(self: ioh.iohcpp.AbstractRealConstraint, arg0: List[float], arg1: float) float#
compute_violation()#

Check if a point is within the bounds or not.

Parameters:
  • x (list | np.ndarray) – the search point to check

  • y (float) – the objective value

Returns:

Whether there is a constraint violation

Return type:

bool

is_feasible(self: ioh.iohcpp.AbstractRealConstraint, arg0: List[float]) bool#
penalize(self: ioh.iohcpp.AbstractRealConstraint, arg0: float) float#
penalty(self: ioh.iohcpp.AbstractRealConstraint) float#
violation(self: ioh.iohcpp.AbstractRealConstraint) float#