added calc func and grad for deterministic problem, but deleted calc func for the stochastic. need to fix
optimization with ABM seems to work, results for the reviews for the paper were obtained from this code