Deterministic and Stochastic Models in Optimization Theory