BoundaryHandlerIfc

fun interface BoundaryHandlerIfc(source)

Strategy interface for handling particles that move outside the input ranges. Given a continuous position, a boundary handler returns a position brought back within each input's [lowerBound, upperBound]. The handler returns a new array; it does not modify the supplied one. The result is still passed through ksl.simopt.problem.ProblemDefinition.toInputMap by the solver for granularity rounding before evaluation.

Inheritors

Functions

Link copied to clipboard
abstract fun enforce(x: DoubleArray, problemDefinition: ProblemDefinition): DoubleArray

Enforces the input-range bounds on the supplied continuous position.