Greedy permanent magnet optimization. (1st March 2023)