new gradient based minimization, including MPGraph based gradients; compiles, but untested