Performance and results of a computer program for optimizing magnets with iron