A method for comparing heuristics with applications in computational design of flexible systems