wbt_compactness_ratio function

Compactness ratio