penalizedDifference

protected fun penalizedDifference(first: Solution, second: Solution): Double(source)

The difference between two solutions' penalized objective function values, both judged at a common evaluation number. See atCommonEvaluation for why the clock has to be shared.

Solvers that decide by the size of a difference rather than by its sign -- an acceptance probability, say -- need this rather than subtracting the two penalized values directly, because a difference inflated by mismatched clocks does not merely mislead about which solution is better; it distorts by how much.