IntegerBounds#

class ioh.iohcpp.IntegerBounds#

Bases: AbstractIntegerConstraint

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.AbstractIntegerConstraint, arg0: List[int], 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.AbstractIntegerConstraint, arg0: List[int]) bool#
penalize(self: ioh.iohcpp.AbstractIntegerConstraint, arg0: float) float#
penalty(self: ioh.iohcpp.AbstractIntegerConstraint) float#
violation(self: ioh.iohcpp.AbstractIntegerConstraint) float#