f: Function to be minimized: takes a single numeric value and returns a single numeric value.
constraint: Function of a single variable returning a single boolean value (must be TRUE to be at the optimum).
bounds: A numeric vector of length two which are the upper and lower bounds of the input to try.
nEach: Number of points n each round of grid searching to use.
shrink: Factor indicating how much (1/shrink) to narrow the search width by each round; highly recommended that shrink is at least half the size of nEach.