Functional optimization in OR problems with very large numbers of variables