Allowing user input of different optimizer algorithms.