Solving discrete resource allocation problems using the Simultaneous Perturbation Stochastic Approximation (SPSA) algorithm