In [47], an objective function based on the current-density boundary integral associated with standard finite-element formulations in two dimensions is used instead of measured potential differences, as the basis for optimization performed using the method of simulated annealing. The algorithm also enables user-defined target search regions to be incorporated. In this approach, the optimization objective is to vary the modelled dipole such that the Neumann boundary condition is satisfied, that is, the current density at each electrode approaches zero.