A global optimization method using a random walk on a topological map and local variational inversions