Optimizer function

Specify numerical optimizer as R6 object