warnIfSizeExceedsInputLattice

protected fun warnIfSizeExceedsInputLattice(requestedSize: Int, sizeParameterName: String)(source)

Logs a warning at construction when a requested population or design size exceeds the number of distinct feasible input points (the problem's input lattice). No run can use more distinct feasible points than exist, so sampleInputFeasiblePoints supplies at most that many. Intended to be called from a population-based subclass's init block so the mismatch is surfaced before a run rather than only mid-run.

This is a best-effort early check: the size and the problem's granularities/bounds can change after construction, and any actual shortfall is reported again by sampleInputFeasiblePoints when it occurs. Does nothing when the lattice is effectively unbounded (a continuous input or a grid too large to count) — such a problem has ample distinct feasible points.

Parameters

requestedSize

the requested population/design size

sizeParameterName

the name of the solver parameter carrying that size, for the message